Compare commits
350 Commits
master
...
xnest-24.2
Author | SHA1 | Date | |
---|---|---|---|
|
702b1687fd | ||
|
23040f3814 | ||
|
8eb6c1f173 | ||
|
d84bca91ec | ||
|
4898415c6b | ||
|
9747ade9b1 | ||
|
13fcc8f4c5 | ||
|
31bc28a36e | ||
|
1c31902425 | ||
|
c0de503adb | ||
|
00e23cb0d6 | ||
|
70a25209ac | ||
|
9d1937cd79 | ||
|
5c96b80a8d | ||
|
bbdef9336f | ||
|
7bbdd50103 | ||
|
c88abea2fe | ||
|
57d6c2477a | ||
|
76ad971c52 | ||
|
d49410d599 | ||
|
8dbd909d7b | ||
|
91b6453087 | ||
|
52de3c7fd2 | ||
|
8ca763453a | ||
|
488a97463f | ||
|
0c306f780f | ||
|
d2575b30dd | ||
|
2e74b2fde6 | ||
|
69bdc2c247 | ||
|
2d5c8090a8 | ||
|
7bd3006818 | ||
|
e063db8204 | ||
|
86ba735482 | ||
|
497e981348 | ||
|
421eeec9c5 | ||
|
4cd73b26c0 | ||
|
54632e9049 | ||
|
ac503cca59 | ||
|
af06dd35d7 | ||
|
691228d130 | ||
|
f7fdaf814b | ||
|
77f7e06508 | ||
|
ea563c714f | ||
|
556c8726ae | ||
|
3bd44734a4 | ||
|
913d6081e5 | ||
|
ba7d036718 | ||
|
3993de5346 | ||
|
b7c59f2dac | ||
|
b5ebbb2e3f | ||
|
0e054c32e3 | ||
|
63ceada731 | ||
|
87f2e80b05 | ||
|
3086ed6d31 | ||
|
de5ec979d5 | ||
|
edd4887cd3 | ||
|
65e814aaa1 | ||
|
8fa7192799 | ||
|
9032c194aa | ||
|
796c65001a | ||
|
2594a99829 | ||
|
a4e29e4f79 | ||
|
7e614e8c39 | ||
|
0260e13073 | ||
|
f4edaa6b64 | ||
|
7bcf65ea20 | ||
|
fae7389ba4 | ||
|
9e32358192 | ||
|
5743bd368a | ||
|
dabc766bba | ||
|
fb4422efe1 | ||
|
baf84073d1 | ||
|
cd3c6401bf | ||
|
360cfb39bf | ||
|
15054e4424 | ||
|
5546ca2c96 | ||
|
1068d6031e | ||
|
1201a6ed88 | ||
|
e21bc4c697 | ||
|
af72e10c8b | ||
|
c17f250d70 | ||
|
491ba2669a | ||
|
82a1cac173 | ||
|
ea8fda84b6 | ||
|
31c8867db4 | ||
|
a3349f3e31 | ||
|
0c27d5b102 | ||
|
b17cc82252 | ||
|
be5a9820d9 | ||
|
d14d63360b | ||
|
82521f4698 | ||
|
2dc806da2c | ||
|
eb6ebd9b46 | ||
|
dde546672e | ||
|
450b08c6f1 | ||
|
221803bcc9 | ||
|
5f863835e7 | ||
|
a7ce225546 | ||
|
b34802c7a2 | ||
|
a13d6c36bf | ||
|
b1690c9c65 | ||
|
f12740ee41 | ||
|
66f6f49263 | ||
|
d69250ac86 | ||
|
39300cc0bc | ||
|
53bc46fd2a | ||
|
32fcffa4bb | ||
|
f232ee9042 | ||
|
1d620bdaaf | ||
|
4a20614fcb | ||
|
09a934fc59 | ||
|
b3790a0c26 | ||
|
b27071b35f | ||
|
eb452fcecc | ||
|
5564d7585c | ||
|
90984e4c9a | ||
|
65e1b52484 | ||
|
ba80b2a91c | ||
|
00176a7433 | ||
|
88489e86b2 | ||
|
2909832ac8 | ||
|
b8d22a1306 | ||
|
baae5b19a6 | ||
|
00bedc4bbb | ||
|
e7291758ac | ||
|
e7797e713f | ||
|
8837a855bc | ||
|
43e988011f | ||
|
49927ddf82 | ||
|
52bb626cd7 | ||
|
89941e666d | ||
|
bb2713ce15 | ||
|
b25cc0e8d4 | ||
|
c4d9bd6b2a | ||
|
fc3b95012e | ||
|
94cf7bb153 | ||
|
3ab8f10b65 | ||
|
fc82a71e35 | ||
|
652c4c4f2d | ||
|
439d6977c3 | ||
|
8780c16441 | ||
|
bd00472bcb | ||
|
8be5b12eb5 | ||
|
e4be1e71fe | ||
|
da9bcd9a07 | ||
|
806f613d18 | ||
|
a5c42ba050 | ||
|
2e847c7b23 | ||
|
b487d2d77f | ||
|
05b748440f | ||
|
e6b2a9a9ac | ||
|
5bc3bc20d8 | ||
|
fe845676cc | ||
|
9046580fdd | ||
|
016b2f3b9f | ||
|
bad606c251 | ||
|
7f629ec502 | ||
|
b1f5a743ea | ||
|
51173435b6 | ||
|
97c4d66252 | ||
|
c9cc516cf7 | ||
|
c266f3ca83 | ||
|
99f02145f0 | ||
|
074b8223d5 | ||
|
b545728853 | ||
|
be4be0900c | ||
|
df57469f2a | ||
|
683f76224a | ||
|
047b7584f9 | ||
|
6992fbad67 | ||
|
44926e6d5f | ||
|
cdd6a62f3f | ||
|
dc2818ac84 | ||
|
80f4475682 | ||
|
3f2cad47a8 | ||
|
26fb8455f7 | ||
|
fd96a57294 | ||
|
e89a55acc5 | ||
|
f2ffdfed3d | ||
|
e5a3b8a385 | ||
|
c12a7656fa | ||
|
938db6decc | ||
|
2c8620a4ee | ||
|
57d8528ce5 | ||
|
8f42faa697 | ||
|
f1f73d4553 | ||
|
517756ecc1 | ||
|
111fd04bf1 | ||
|
504834d877 | ||
|
cef72a14b2 | ||
|
0d76ed8b2c | ||
|
d405ceb9a7 | ||
|
44fb38fdb2 | ||
|
a29aa98030 | ||
|
6a6f04bbe0 | ||
|
1aca289cb5 | ||
|
f30407135e | ||
|
9ed079ed2e | ||
|
7b0fb2d50b | ||
|
5d0f661588 | ||
|
21b38c2772 | ||
|
9768618ad0 | ||
|
8ebcbb5d92 | ||
|
4ebeaa025d | ||
|
e187ea816a | ||
|
2b7f53a0bf | ||
|
31e693ca2c | ||
|
0402e58cf3 | ||
|
f3520016b2 | ||
|
983a233d9c | ||
|
69ddd7624f | ||
|
15547148aa | ||
|
37362c5d1a | ||
|
b8985433a3 | ||
|
02d16aa845 | ||
|
3e0e188960 | ||
|
e6ade4f97d | ||
|
35dff2b784 | ||
|
8886fbcf43 | ||
|
9d9e09620f | ||
|
070a9b2318 | ||
|
e88d76fb69 | ||
|
3a054fccd1 | ||
|
f714b17888 | ||
|
b782711066 | ||
|
30badb7b83 | ||
|
6b97b55995 | ||
|
5bc713bb86 | ||
|
d66f67ba69 | ||
|
d402eb18f5 | ||
|
1dc7ced6a4 | ||
|
db48b04c90 | ||
|
87324c84b3 | ||
|
d8cff051d8 | ||
|
f78287f7b2 | ||
|
cc43e55005 | ||
|
7f72f7bb31 | ||
|
89b5b9bf83 | ||
|
1f54e50281 | ||
|
0606dce445 | ||
|
02a49d5c73 | ||
|
bfbc6752aa | ||
|
c830d73bf5 | ||
|
3a1aa6efe5 | ||
|
76e23c3705 | ||
|
65ce2b1c65 | ||
|
5e7c5d7432 | ||
|
2ca292bcdd | ||
|
c0272962ce | ||
|
b38bd025d3 | ||
|
2d3a61945c | ||
|
082db756c8 | ||
|
d4a593dde4 | ||
|
0a52553260 | ||
|
c9f03fccc6 | ||
|
9b9b7cbfc6 | ||
|
ef2121b126 | ||
|
650acbf38e | ||
|
b28bcffd55 | ||
|
6e435c5de2 | ||
|
b64fce9391 | ||
|
63bd3e1128 | ||
|
46db902717 | ||
|
643c9354a5 | ||
|
0bd5a4774c | ||
|
fa03432688 | ||
|
622d216aa1 | ||
|
f2760a2a3e | ||
|
4677bb6dfd | ||
|
48d27a4db5 | ||
|
b92a738cd9 | ||
|
502dcb55fc | ||
|
d3dc6c32a6 | ||
|
d93e9a8641 | ||
|
e7d539fdf8 | ||
|
e5950ac008 | ||
|
66a7f718d2 | ||
|
9ccba989a8 | ||
|
634d14aae5 | ||
|
ea8f0b3324 | ||
|
cddedeab01 | ||
|
c151a5e9ed | ||
|
b510e2cf75 | ||
|
389e3eca37 | ||
|
fad7540c75 | ||
|
d191d06820 | ||
|
573e9fd044 | ||
|
f563877363 | ||
|
0eb425be18 | ||
|
fbc61db6cf | ||
|
62cb6492ff | ||
|
edb34c8cc5 | ||
|
3f8ef629ff | ||
|
c6866f8f85 | ||
|
8205a253c4 | ||
|
cc6d94c528 | ||
|
90d7ee7d0f | ||
|
0b0ffeaeb2 | ||
|
b910f4b83f | ||
|
b57a566849 | ||
|
e395112ffe | ||
|
c4c696a1ef | ||
|
3818fab928 | ||
|
fe43e9ca60 | ||
|
6dc5526552 | ||
|
a346e1998e | ||
|
dcc0169c8a | ||
|
86cccef9bc | ||
|
b8240ab3e1 | ||
|
9754a9d6db | ||
|
d85d6e7dfb | ||
|
cdc18a6013 | ||
|
44f947b9cb | ||
|
eb0baa881c | ||
|
fd889145a0 | ||
|
41f9f33660 | ||
|
ca62578352 | ||
|
4c42242339 | ||
|
1946545f86 | ||
|
e105ec7009 | ||
|
14304a851a | ||
|
3ac32208f6 | ||
|
5743c16b3b | ||
|
fe804dfc1c | ||
|
67bf0944d3 | ||
|
e9340013c3 | ||
|
1f3179ac9d | ||
|
a33003a2c4 | ||
|
4f337a2760 | ||
|
cd0b9ff4e9 | ||
|
8e87055bb5 | ||
|
a51225ea61 | ||
|
00363c8840 | ||
|
7d6464e029 | ||
|
e8b6bd4731 | ||
|
630b3144b8 | ||
|
5d115439ca | ||
|
3763bcab18 | ||
|
16e4bcb019 | ||
|
50df7ed4a6 | ||
|
82667ad3ae | ||
|
4510b21b76 | ||
|
ac22cf2d45 | ||
|
754dbbb73a | ||
|
f59440d82f | ||
|
c92d7037db | ||
|
e305638cc9 | ||
|
c2e0309612 | ||
|
a4d09ecc82 | ||
|
9f0395bfe9 |
103
.gitlab-ci.yml
103
.gitlab-ci.yml
|
@ -21,10 +21,10 @@ variables:
|
|||
REPO_URL_XORGPROTO: 'https://gitlab.freedesktop.org/xorg/proto/xorgproto.git'
|
||||
XORG_DEBIAN_VERSION: 'bullseye-slim'
|
||||
XORG_DEBIAN_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/debian-install.sh'
|
||||
XORG_DEBIAN_TAG: '2024-09-09-meson-backport'
|
||||
XORG_DEBIAN_TAG: '2024-09-13-xvmc'
|
||||
XORG_FREEBSD_VERSION: '14.0'
|
||||
XORG_FREEBSD_EXEC: ''
|
||||
XORG_FREEBSD_TAG: '2024-06-10.0'
|
||||
XORG_FREEBSD_TAG: '2024-09-10-fix-freebsd-xcb'
|
||||
|
||||
include:
|
||||
- project: 'freedesktop/ci-templates'
|
||||
|
@ -109,7 +109,7 @@ stages:
|
|||
FDO_DISTRIBUTION_TAG: '$XORG_FREEBSD_TAG'
|
||||
FDO_DISTRIBUTION_VERSION: '$XORG_FREEBSD_VERSION'
|
||||
FDO_DISTRIBUTION_EXEC: ''
|
||||
FDO_DISTRIBUTION_PACKAGES: 'git gcc pkgconf autoconf automake libtool xorg-macros xorgproto bash meson ninja pixman xtrans libXau libXdmcp libXfont2 libxkbfile libxcvt libpciaccess font-util libepoll-shim'
|
||||
FDO_DISTRIBUTION_PACKAGES: 'git gcc pkgconf autoconf automake libtool xorg-macros xorgproto bash meson ninja pixman xtrans libXau libXdmcp libXfont2 libxkbfile libxcvt libpciaccess font-util libepoll-shim libxvmc xcb-util xcb-util-wm'
|
||||
|
||||
debian-bullseye:
|
||||
extends:
|
||||
|
@ -152,7 +152,7 @@ freebsd-image:
|
|||
- $MESON_BUILDDIR/meson-logs/
|
||||
- $MESON_BUILDDIR/test/piglit-results/
|
||||
variables:
|
||||
MESON_ARGS: -Dc_args="-fno-common" -Dprefix=/usr -Dxephyr=true -Dwerror=true -Dxcsecurity=true
|
||||
MESON_ARGS: -Dc_args="-fno-common" -Dprefix=/usr -Dxephyr=true -Dwerror=true -Dxcsecurity=true -Dxv=true -Dxvmc=true
|
||||
CCACHE_COMPILERCHECK: content
|
||||
CCACHE_DIR: /cache/xserver/cache
|
||||
LC_ALL: C.UTF-8
|
||||
|
@ -191,14 +191,14 @@ mingw-cross-build:
|
|||
script:
|
||||
- .gitlab-ci/meson-build.sh --run-install
|
||||
variables:
|
||||
MESON_ARGS: --cross-file=.gitlab-ci/cross-i686-w64-mingw32.txt -Dglx=false -Dlisten_tcp=true
|
||||
MESON_ARGS: --cross-file=.gitlab-ci/cross-i686-w64-mingw32.txt -Dglx=false -Dlisten_tcp=true -Dxvmc=true -Dxv=true
|
||||
|
||||
freebsd:
|
||||
stage: build-and-test
|
||||
extends:
|
||||
- .xorg-image@freebsd
|
||||
variables:
|
||||
MESON_ARGS: -Dglx=false -Dglamor=false -Dudev=false -Dudev_kms=false
|
||||
MESON_ARGS: -Dglx=false -Dglamor=false -Dudev=false -Dudev_kms=false -Dxvmc=true -Dxv=true
|
||||
script:
|
||||
# running of of disk space without this
|
||||
# needed until https://gitlab.freedesktop.org/freedesktop/ci-templates/-/issues/67 is fixed
|
||||
|
@ -222,41 +222,119 @@ meson-dist:
|
|||
when: always
|
||||
paths:
|
||||
- $MESON_BUILDDIR/meson-logs/
|
||||
- $MESON_BUILDDIR/xserver-*/$MESON_BUILDDIR/meson-logs/
|
||||
- $MESON_BUILDDIR/xlibre-xnest-*/$MESON_BUILDDIR/meson-logs/
|
||||
script:
|
||||
- .gitlab-ci/meson-build.sh --run-dist
|
||||
- mkdir xserver-tarball
|
||||
- tar xf $MESON_BUILDDIR/meson-dist/xserver-*.tar.xz -C xserver-tarball --strip-components=1
|
||||
- tar xf $MESON_BUILDDIR/meson-dist/xlibre-xnest-*.tar.xz -C xserver-tarball --strip-components=1
|
||||
- .gitlab-ci/meson-build.sh -C xserver-tarball --skip-test --skip-dist --run-install
|
||||
variables:
|
||||
MESON_DIST_ARGS: --no-tests
|
||||
DESTDIR: xserver-tarball/install/
|
||||
|
||||
xf86-driver-build-test:
|
||||
.xf86-driver-build-test:
|
||||
extends:
|
||||
- .xorg-image@debian
|
||||
- .ci-run-policy
|
||||
stage: drivers
|
||||
parallel:
|
||||
matrix:
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-elographics
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev
|
||||
SHA: xf86-input-evdev-2.10.6
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-joystick
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput
|
||||
SHA: xf86-input-libinput-1.4.0
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse
|
||||
SHA: xf86-input-mouse-1.9.5
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-synaptics
|
||||
SHA: xf86-input-synaptics-1.9.2
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-vmmouse
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-void
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu
|
||||
SHA: xf86-video-amdgpu-23.0.0
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-apm
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-ark
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-armsoc
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-ast
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati
|
||||
SHA: xf86-video-ati-22.0.0
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-chips
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-cirrus
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-dummy
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-fbdev
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-i128
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-i740
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-mach64
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-mga
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-neomagic
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-nested
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-nv
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-rendition
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-s3virge
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-savage
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-siliconmotion
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-sis
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-sisusb
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-suncg14
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-suncg3
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-suncg6
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-sunffb
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-sunleo
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-suntcx
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-tdfx
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-trident
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-v4l
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-vbox
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-vesa
|
||||
SHA: xf86-video-vesa-2.6.0
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-vmware
|
||||
SHA: xf86-video-vmware-13.4.0
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-voodoo
|
||||
SHA: master
|
||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-xgi
|
||||
SHA: master
|
||||
script:
|
||||
# Install the server first
|
||||
- .gitlab-ci/meson-build.sh --skip-test --run-install
|
||||
|
@ -277,13 +355,6 @@ xf86-driver-build-test:
|
|||
GIT_DEPTH: 1
|
||||
MESON_ARGS: -Dprefix=/usr/
|
||||
MESON_EXTRA_ARGS: -Dxwayland=false -Dxnest=false -Dxvfb=false -Dxquartz=false -Ddocs=false
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
changes:
|
||||
*dix_paths
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
changes:
|
||||
*xorg_paths
|
||||
|
||||
#
|
||||
# Verify that commit messages are as expected
|
||||
|
|
|
@ -65,6 +65,7 @@ apt-get install -y \
|
|||
libx11-xcb-dev \
|
||||
libxau-dev \
|
||||
libxaw7-dev \
|
||||
libxcb-dri2-0-dev \
|
||||
libxcb-glx0-dev \
|
||||
libxcb-icccm4-dev \
|
||||
libxcb-image0-dev \
|
||||
|
@ -96,6 +97,7 @@ apt-get install -y \
|
|||
libxt-dev \
|
||||
libxtst-dev \
|
||||
libxv-dev \
|
||||
libxvmc-dev \
|
||||
libz-mingw-w64-dev \
|
||||
linux-libc-dev/bullseye-backports \
|
||||
mesa-common-dev \
|
||||
|
|
|
@ -26,22 +26,20 @@ from The Open Group.
|
|||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/bigreqsproto.h>
|
||||
|
||||
#include "dix/dix_priv.h"
|
||||
#include "miext/extinit_priv.h"
|
||||
|
||||
#include "misc.h"
|
||||
#include "os.h"
|
||||
#include "dixstruct.h"
|
||||
#include "extnsionst.h"
|
||||
#include "opaque.h"
|
||||
#include "extinit_priv.h"
|
||||
|
||||
static int
|
||||
ProcBigReqDispatch(ClientPtr client)
|
||||
|
@ -49,9 +47,6 @@ ProcBigReqDispatch(ClientPtr client)
|
|||
REQUEST(xBigReqEnableReq);
|
||||
xBigReqEnableReply rep;
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&stuff->length);
|
||||
}
|
||||
if (stuff->brReqType != X_BigReqEnable)
|
||||
return BadRequest;
|
||||
REQUEST_SIZE_MATCH(xBigReqEnableReq);
|
||||
|
|
80
Xext/dpms.c
80
Xext/dpms.c
|
@ -26,13 +26,13 @@ Equipment Corporation.
|
|||
|
||||
******************************************************************/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/dpmsproto.h>
|
||||
|
||||
#include "miext/extinit_priv.h"
|
||||
#include "os/screensaver.h"
|
||||
|
||||
#include "misc.h"
|
||||
|
@ -40,13 +40,13 @@ Equipment Corporation.
|
|||
#include "dixstruct.h"
|
||||
#include "extnsionst.h"
|
||||
#include "opaque.h"
|
||||
#include <X11/extensions/dpmsproto.h>
|
||||
#include "dpmsproc.h"
|
||||
#include "extinit_priv.h"
|
||||
#include "scrnintstr.h"
|
||||
#include "windowstr.h"
|
||||
#include "protocol-versions.h"
|
||||
|
||||
Bool noDPMSExtension = FALSE;
|
||||
|
||||
CARD16 DPMSPowerLevel = 0;
|
||||
Bool DPMSDisabledSwitch = FALSE;
|
||||
CARD32 DPMSStandbyTime = -1;
|
||||
|
@ -495,42 +495,16 @@ static int _X_COLD
|
|||
SProcDPMSGetVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDPMSGetVersionReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDPMSGetVersionReq);
|
||||
swaps(&stuff->majorVersion);
|
||||
swaps(&stuff->minorVersion);
|
||||
return ProcDPMSGetVersion(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcDPMSCapable(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDPMSCapableReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDPMSCapableReq);
|
||||
|
||||
return ProcDPMSCapable(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcDPMSGetTimeouts(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDPMSGetTimeoutsReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq);
|
||||
|
||||
return ProcDPMSGetTimeouts(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcDPMSSetTimeouts(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDPMSSetTimeoutsReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq);
|
||||
|
||||
swaps(&stuff->standby);
|
||||
|
@ -539,34 +513,10 @@ SProcDPMSSetTimeouts(ClientPtr client)
|
|||
return ProcDPMSSetTimeouts(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcDPMSEnable(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDPMSEnableReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDPMSEnableReq);
|
||||
|
||||
return ProcDPMSEnable(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcDPMSDisable(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDPMSDisableReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDPMSDisableReq);
|
||||
|
||||
return ProcDPMSDisable(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcDPMSForceLevel(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDPMSForceLevelReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDPMSForceLevelReq);
|
||||
|
||||
swaps(&stuff->level);
|
||||
|
@ -574,22 +524,10 @@ SProcDPMSForceLevel(ClientPtr client)
|
|||
return ProcDPMSForceLevel(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcDPMSInfo(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDPMSInfoReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDPMSInfoReq);
|
||||
|
||||
return ProcDPMSInfo(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcDPMSSelectInput(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDPMSSelectInputReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDPMSSelectInputReq);
|
||||
swapl(&stuff->eventMask);
|
||||
return ProcDPMSSelectInput(client);
|
||||
|
@ -605,19 +543,19 @@ SProcDPMSDispatch(ClientPtr client)
|
|||
case X_DPMSGetVersion:
|
||||
return SProcDPMSGetVersion(client);
|
||||
case X_DPMSCapable:
|
||||
return SProcDPMSCapable(client);
|
||||
return ProcDPMSCapable(client);
|
||||
case X_DPMSGetTimeouts:
|
||||
return SProcDPMSGetTimeouts(client);
|
||||
return ProcDPMSGetTimeouts(client);
|
||||
case X_DPMSSetTimeouts:
|
||||
return SProcDPMSSetTimeouts(client);
|
||||
case X_DPMSEnable:
|
||||
return SProcDPMSEnable(client);
|
||||
return ProcDPMSEnable(client);
|
||||
case X_DPMSDisable:
|
||||
return SProcDPMSDisable(client);
|
||||
return ProcDPMSDisable(client);
|
||||
case X_DPMSForceLevel:
|
||||
return SProcDPMSForceLevel(client);
|
||||
case X_DPMSInfo:
|
||||
return SProcDPMSInfo(client);
|
||||
return ProcDPMSInfo(client);
|
||||
case X_DPMSSelectInput:
|
||||
return SProcDPMSSelectInput(client);
|
||||
default:
|
||||
|
|
76
Xext/geext.c
76
Xext/geext.c
|
@ -23,27 +23,24 @@
|
|||
* 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 "windowstr.h"
|
||||
|
||||
#include "miext/extinit_priv.h"
|
||||
|
||||
#include "geint.h"
|
||||
#include "geext.h"
|
||||
#include "protocol-versions.h"
|
||||
#include "extinit_priv.h"
|
||||
|
||||
Bool noGEExtension = FALSE;
|
||||
|
||||
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);
|
||||
|
||||
|
@ -89,11 +86,6 @@ ProcGEQueryVersion(ClientPtr client)
|
|||
return Success;
|
||||
}
|
||||
|
||||
static int (*ProcGEVector[GENumberRequests]) (ClientPtr) = {
|
||||
/* Version 1.0 */
|
||||
ProcGEQueryVersion,
|
||||
};
|
||||
|
||||
/************************************************************/
|
||||
/* swapped request handlers */
|
||||
/************************************************************/
|
||||
|
@ -101,19 +93,12 @@ static int _X_COLD
|
|||
SProcGEQueryVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGEQueryVersionReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xGEQueryVersionReq);
|
||||
swaps(&stuff->majorVersion);
|
||||
swaps(&stuff->minorVersion);
|
||||
return (*ProcGEVector[stuff->ReqType]) (client);
|
||||
return SProcGEQueryVersion(client);
|
||||
}
|
||||
|
||||
static int (*SProcGEVector[GENumberRequests]) (ClientPtr) = {
|
||||
/* Version 1.0 */
|
||||
SProcGEQueryVersion
|
||||
};
|
||||
|
||||
/************************************************************/
|
||||
/* callbacks */
|
||||
/************************************************************/
|
||||
|
@ -122,32 +107,29 @@ static int (*SProcGEVector[GENumberRequests]) (ClientPtr) = {
|
|||
static int
|
||||
ProcGEDispatch(ClientPtr client)
|
||||
{
|
||||
GEClientInfoPtr pGEClient = GEGetClient(client);
|
||||
REQUEST(xReq);
|
||||
|
||||
REQUEST(xGEReq);
|
||||
|
||||
if (pGEClient->major_version >= ARRAY_SIZE(version_requests))
|
||||
switch (stuff->data) {
|
||||
case X_GEQueryVersion:
|
||||
return ProcGEQueryVersion(client);
|
||||
default:
|
||||
return BadRequest;
|
||||
if (stuff->ReqType > version_requests[pGEClient->major_version])
|
||||
return BadRequest;
|
||||
|
||||
return (ProcGEVector[stuff->ReqType]) (client);
|
||||
}
|
||||
}
|
||||
|
||||
/* dispatch swapped requests */
|
||||
static int _X_COLD
|
||||
SProcGEDispatch(ClientPtr client)
|
||||
{
|
||||
GEClientInfoPtr pGEClient = GEGetClient(client);
|
||||
REQUEST(xReq);
|
||||
swaps(&stuff->length);
|
||||
|
||||
REQUEST(xGEReq);
|
||||
|
||||
if (pGEClient->major_version >= ARRAY_SIZE(version_requests))
|
||||
switch (stuff->data) {
|
||||
case X_GEQueryVersion:
|
||||
return SProcGEQueryVersion(client);
|
||||
default:
|
||||
return BadRequest;
|
||||
if (stuff->ReqType > version_requests[pGEClient->major_version])
|
||||
return BadRequest;
|
||||
|
||||
return (*SProcGEVector[stuff->ReqType]) (client);
|
||||
}
|
||||
}
|
||||
|
||||
/* Reset extension. Called on server shutdown. */
|
||||
|
@ -186,24 +168,16 @@ SGEGenericEvent(xEvent *from, xEvent *to)
|
|||
void
|
||||
GEExtensionInit(void)
|
||||
{
|
||||
ExtensionEntry *extEntry;
|
||||
|
||||
if (!dixRegisterPrivateKey
|
||||
(&GEClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(GEClientInfoRec)))
|
||||
FatalError("GEExtensionInit: GE private request failed.\n");
|
||||
|
||||
if ((extEntry = AddExtension(GE_NAME,
|
||||
0, GENumberErrors,
|
||||
ProcGEDispatch, SProcGEDispatch,
|
||||
GEResetProc, StandardMinorOpcode)) != 0) {
|
||||
memset(GEExtensions, 0, sizeof(GEExtensions));
|
||||
|
||||
EventSwapVector[GenericEvent] = (EventSwapPtr) SGEGenericEvent;
|
||||
}
|
||||
else {
|
||||
if (!AddExtension(GE_NAME, 0, GENumberErrors, ProcGEDispatch, SProcGEDispatch,
|
||||
GEResetProc, StandardMinorOpcode))
|
||||
FatalError("GEInit: AddExtensions failed.\n");
|
||||
}
|
||||
|
||||
memset(GEExtensions, 0, sizeof(GEExtensions));
|
||||
EventSwapVector[GenericEvent] = (EventSwapPtr) SGEGenericEvent;
|
||||
}
|
||||
|
||||
/************************************************************/
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "misc.h"
|
||||
|
|
|
@ -23,9 +23,7 @@ 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>
|
||||
|
@ -34,6 +32,7 @@ Equipment Corporation.
|
|||
#include <X11/extensions/panoramiXproto.h>
|
||||
|
||||
#include "dix/dix_priv.h"
|
||||
#include "miext/extinit_priv.h"
|
||||
|
||||
#include "misc.h"
|
||||
#include "cursor.h"
|
||||
|
@ -57,7 +56,6 @@ Equipment Corporation.
|
|||
#ifdef COMPOSITE
|
||||
#include "compint.h"
|
||||
#endif
|
||||
#include "extinit_priv.h"
|
||||
#include "protocol-versions.h"
|
||||
|
||||
#ifdef GLXPROXY
|
||||
|
@ -65,6 +63,9 @@ extern VisualPtr glxMatchVisual(ScreenPtr pScreen,
|
|||
VisualPtr pVisual, ScreenPtr pMatchScreen);
|
||||
#endif
|
||||
|
||||
/* Xinerama is disabled by default unless enabled via +xinerama */
|
||||
Bool noPanoramiXExtension = TRUE;
|
||||
|
||||
/*
|
||||
* PanoramiX data declarations
|
||||
*/
|
||||
|
|
|
@ -23,9 +23,7 @@ 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>
|
||||
|
@ -47,22 +45,10 @@ Equipment Corporation.
|
|||
#include "globals.h"
|
||||
#include "panoramiXh.h"
|
||||
|
||||
static int _X_COLD
|
||||
SProcPanoramiXQueryVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST(xPanoramiXQueryVersionReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq);
|
||||
return ProcPanoramiXQueryVersion(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcPanoramiXGetState(ClientPtr client)
|
||||
{
|
||||
REQUEST(xPanoramiXGetStateReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
||||
swapl(&stuff->window);
|
||||
return ProcPanoramiXGetState(client);
|
||||
|
@ -72,8 +58,6 @@ static int _X_COLD
|
|||
SProcPanoramiXGetScreenCount(ClientPtr client)
|
||||
{
|
||||
REQUEST(xPanoramiXGetScreenCountReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
||||
swapl(&stuff->window);
|
||||
return ProcPanoramiXGetScreenCount(client);
|
||||
|
@ -83,41 +67,19 @@ static int _X_COLD
|
|||
SProcPanoramiXGetScreenSize(ClientPtr client)
|
||||
{
|
||||
REQUEST(xPanoramiXGetScreenSizeReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
||||
swapl(&stuff->window);
|
||||
swapl(&stuff->screen);
|
||||
return ProcPanoramiXGetScreenSize(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcXineramaIsActive(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXineramaIsActiveReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
|
||||
return ProcXineramaIsActive(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcXineramaQueryScreens(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXineramaQueryScreensReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
|
||||
return ProcXineramaQueryScreens(client);
|
||||
}
|
||||
|
||||
int _X_COLD
|
||||
SProcPanoramiXDispatch(ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
switch (stuff->data) {
|
||||
case X_PanoramiXQueryVersion:
|
||||
return SProcPanoramiXQueryVersion(client);
|
||||
return ProcPanoramiXQueryVersion(client);
|
||||
case X_PanoramiXGetState:
|
||||
return SProcPanoramiXGetState(client);
|
||||
case X_PanoramiXGetScreenCount:
|
||||
|
@ -125,9 +87,9 @@ SProcPanoramiXDispatch(ClientPtr client)
|
|||
case X_PanoramiXGetScreenSize:
|
||||
return SProcPanoramiXGetScreenSize(client);
|
||||
case X_XineramaIsActive:
|
||||
return SProcXineramaIsActive(client);
|
||||
return ProcXineramaIsActive(client);
|
||||
case X_XineramaQueryScreens:
|
||||
return SProcXineramaQueryScreens(client);
|
||||
return ProcXineramaQueryScreens(client);
|
||||
}
|
||||
return BadRequest;
|
||||
}
|
||||
|
|
|
@ -25,15 +25,14 @@ 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 "dix/dix_priv.h"
|
||||
#include "os/osdep.h"
|
||||
|
||||
#include "windowstr.h"
|
||||
#include "dixfontstr.h"
|
||||
|
|
147
Xext/saver.c
147
Xext/saver.c
|
@ -26,9 +26,7 @@ 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 <stdio.h>
|
||||
#include <X11/X.h>
|
||||
|
@ -38,6 +36,8 @@ in this Software without prior written authorization from the X Consortium.
|
|||
#include "dix/colormap_priv.h"
|
||||
#include "dix/cursor_priv.h"
|
||||
#include "dix/dix_priv.h"
|
||||
#include "miext/extinit_priv.h"
|
||||
#include "os/osdep.h"
|
||||
#include "os/screensaver.h"
|
||||
|
||||
#include "misc.h"
|
||||
|
@ -53,16 +53,21 @@ in this Software without prior written authorization from the X Consortium.
|
|||
#include "colormapst.h"
|
||||
#include "xace.h"
|
||||
#include "inputstr.h"
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#endif
|
||||
#endif /* XINERAMA */
|
||||
#ifdef DPMSExtension
|
||||
#include <X11/extensions/dpmsconst.h>
|
||||
#include "dpmsproc.h"
|
||||
#endif
|
||||
#include "protocol-versions.h"
|
||||
#include "extinit_priv.h"
|
||||
|
||||
Bool noScreenSaverExtension = FALSE;
|
||||
|
||||
// temporary workaround for win32/mingw32 name clash
|
||||
// see: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1355
|
||||
#undef CreateWindow
|
||||
|
||||
static int ScreenSaverEventBase = 0;
|
||||
|
||||
|
@ -585,9 +590,9 @@ ScreenSaverHandle(ScreenPtr pScreen, int xstate, Bool force)
|
|||
ret = TRUE;
|
||||
|
||||
}
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
if (noPanoramiXExtension || !pScreen->myNum)
|
||||
#endif
|
||||
#endif /* XINERAMA */
|
||||
SendScreenSaverNotify(pScreen, state, force);
|
||||
return ret;
|
||||
}
|
||||
|
@ -598,7 +603,6 @@ ProcScreenSaverQueryVersion(ClientPtr client)
|
|||
xScreenSaverQueryVersionReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0,
|
||||
.majorVersion = SERVER_SAVER_MAJOR_VERSION,
|
||||
.minorVersion = SERVER_SAVER_MINOR_VERSION
|
||||
};
|
||||
|
@ -607,7 +611,8 @@ ProcScreenSaverQueryVersion(ClientPtr client)
|
|||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swaps(&rep.majorVersion);
|
||||
swaps(&rep.minorVersion);
|
||||
}
|
||||
WriteToClient(client, sizeof(xScreenSaverQueryVersionReply), &rep);
|
||||
return Success;
|
||||
|
@ -617,7 +622,6 @@ static int
|
|||
ProcScreenSaverQueryInfo(ClientPtr client)
|
||||
{
|
||||
REQUEST(xScreenSaverQueryInfoReq);
|
||||
xScreenSaverQueryInfoReply rep;
|
||||
int rc;
|
||||
ScreenSaverStuffPtr pSaver;
|
||||
DrawablePtr pDraw;
|
||||
|
@ -639,30 +643,24 @@ ProcScreenSaverQueryInfo(ClientPtr client)
|
|||
UpdateCurrentTime();
|
||||
lastInput = GetTimeInMillis() - LastEventTime(XIAllDevices).milliseconds;
|
||||
|
||||
rep = (xScreenSaverQueryInfoReply) {
|
||||
xScreenSaverQueryInfoReply rep = {
|
||||
.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
|
||||
if (ScreenSaverTime >= lastInput)
|
||||
rep.tilOrSince = ScreenSaverTime - lastInput;
|
||||
}
|
||||
else {
|
||||
rep.state = ScreenSaverDisabled;
|
||||
rep.tilOrSince = 0;
|
||||
}
|
||||
}
|
||||
rep.idle = lastInput;
|
||||
|
@ -675,7 +673,6 @@ ProcScreenSaverQueryInfo(ClientPtr client)
|
|||
rep.kind = ScreenSaverInternal;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.window);
|
||||
swapl(&rep.tilOrSince);
|
||||
swapl(&rep.idle);
|
||||
|
@ -708,9 +705,8 @@ ProcScreenSaverSelectInput(ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
ScreenSaverSetAttributes(ClientPtr client)
|
||||
ScreenSaverSetAttributes(ClientPtr client, xScreenSaverSetAttributesReq *stuff)
|
||||
{
|
||||
REQUEST(xScreenSaverSetAttributesReq);
|
||||
DrawablePtr pDraw;
|
||||
WindowPtr pParent;
|
||||
ScreenPtr pScreen;
|
||||
|
@ -733,7 +729,6 @@ ScreenSaverSetAttributes(ClientPtr client)
|
|||
Colormap cmap;
|
||||
ColormapPtr pCmap;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq);
|
||||
ret = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
|
||||
DixGetAttrAccess);
|
||||
if (ret != Success)
|
||||
|
@ -745,7 +740,7 @@ ScreenSaverSetAttributes(ClientPtr client)
|
|||
if (ret != Success)
|
||||
return ret;
|
||||
|
||||
len = stuff->length - bytes_to_int32(sizeof(xScreenSaverSetAttributesReq));
|
||||
len = client->req_len - bytes_to_int32(sizeof(xScreenSaverSetAttributesReq));
|
||||
if (Ones(stuff->mask) != len)
|
||||
return BadLength;
|
||||
if (!stuff->width || !stuff->height) {
|
||||
|
@ -1050,16 +1045,13 @@ ScreenSaverSetAttributes(ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
ScreenSaverUnsetAttributes(ClientPtr client)
|
||||
ScreenSaverUnsetAttributes(ClientPtr client, Drawable drawable)
|
||||
{
|
||||
REQUEST(xScreenSaverSetAttributesReq);
|
||||
DrawablePtr pDraw;
|
||||
ScreenSaverScreenPrivatePtr pPriv;
|
||||
int rc;
|
||||
|
||||
REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
|
||||
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
|
||||
DixGetAttrAccess);
|
||||
rc = dixLookupDrawable(&pDraw, drawable, client, 0, DixGetAttrAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
pPriv = GetScreenPrivate(pDraw->pScreen);
|
||||
|
@ -1075,9 +1067,11 @@ ScreenSaverUnsetAttributes(ClientPtr client)
|
|||
static int
|
||||
ProcScreenSaverSetAttributes(ClientPtr client)
|
||||
{
|
||||
#ifdef PANORAMIX
|
||||
REQUEST(xScreenSaverSetAttributesReq);
|
||||
REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq);
|
||||
|
||||
#ifdef XINERAMA
|
||||
if (!noPanoramiXExtension) {
|
||||
REQUEST(xScreenSaverSetAttributesReq);
|
||||
PanoramiXRes *draw;
|
||||
PanoramiXRes *backPix = NULL;
|
||||
PanoramiXRes *bordPix = NULL;
|
||||
|
@ -1086,15 +1080,13 @@ ProcScreenSaverSetAttributes(ClientPtr client)
|
|||
int pback_offset = 0, pbord_offset = 0, cmap_offset = 0;
|
||||
XID orig_visual, tmp;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq);
|
||||
|
||||
status = dixLookupResourceByClass((void **) &draw, stuff->drawable,
|
||||
XRC_DRAWABLE, client, DixWriteAccess);
|
||||
if (status != Success)
|
||||
return (status == BadValue) ? BadDrawable : status;
|
||||
|
||||
len =
|
||||
stuff->length -
|
||||
client->req_len -
|
||||
bytes_to_int32(sizeof(xScreenSaverSetAttributesReq));
|
||||
if (Ones(stuff->mask) != len)
|
||||
return BadLength;
|
||||
|
@ -1149,26 +1141,27 @@ ProcScreenSaverSetAttributes(ClientPtr client)
|
|||
if (orig_visual != CopyFromParent)
|
||||
stuff->visualID = PanoramiXTranslateVisualID(i, orig_visual);
|
||||
|
||||
status = ScreenSaverSetAttributes(client);
|
||||
status = ScreenSaverSetAttributes(client, stuff);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
#endif /* XINERAMA */
|
||||
|
||||
return ScreenSaverSetAttributes(client);
|
||||
return ScreenSaverSetAttributes(client, stuff);
|
||||
}
|
||||
|
||||
static int
|
||||
ProcScreenSaverUnsetAttributes(ClientPtr client)
|
||||
{
|
||||
#ifdef PANORAMIX
|
||||
REQUEST(xScreenSaverUnsetAttributesReq);
|
||||
REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
|
||||
|
||||
#ifdef XINERAMA
|
||||
if (!noPanoramiXExtension) {
|
||||
REQUEST(xScreenSaverUnsetAttributesReq);
|
||||
PanoramiXRes *draw;
|
||||
int rc, i;
|
||||
|
||||
REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
|
||||
|
||||
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
|
||||
XRC_DRAWABLE, client, DixWriteAccess);
|
||||
|
@ -1176,15 +1169,14 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
|
|||
return (rc == BadValue) ? BadDrawable : rc;
|
||||
|
||||
for (i = PanoramiXNumScreens - 1; i > 0; i--) {
|
||||
stuff->drawable = draw->info[i].id;
|
||||
ScreenSaverUnsetAttributes(client);
|
||||
ScreenSaverUnsetAttributes(client, draw->info[i].id);
|
||||
}
|
||||
|
||||
stuff->drawable = draw->info[0].id;
|
||||
}
|
||||
#endif
|
||||
#endif /* XINERAMA */
|
||||
|
||||
return ScreenSaverUnsetAttributes(client);
|
||||
return ScreenSaverUnsetAttributes(client, stuff->drawable);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1252,37 +1244,32 @@ ProcScreenSaverSuspend(ClientPtr client)
|
|||
return Success;
|
||||
}
|
||||
|
||||
static int (*NormalVector[]) (ClientPtr /* client */ ) = {
|
||||
ProcScreenSaverQueryVersion,
|
||||
ProcScreenSaverQueryInfo,
|
||||
ProcScreenSaverSelectInput,
|
||||
ProcScreenSaverSetAttributes,
|
||||
ProcScreenSaverUnsetAttributes, ProcScreenSaverSuspend,};
|
||||
|
||||
static int
|
||||
ProcScreenSaverDispatch(ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
|
||||
if (stuff->data < ARRAY_SIZE(NormalVector))
|
||||
return (*NormalVector[stuff->data]) (client);
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcScreenSaverQueryVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST(xScreenSaverQueryVersionReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xScreenSaverQueryVersionReq);
|
||||
return ProcScreenSaverQueryVersion(client);
|
||||
switch (stuff->data) {
|
||||
case X_ScreenSaverQueryVersion:
|
||||
return ProcScreenSaverQueryVersion(client);
|
||||
case X_ScreenSaverQueryInfo:
|
||||
return ProcScreenSaverQueryInfo(client);
|
||||
case X_ScreenSaverSelectInput:
|
||||
return ProcScreenSaverSelectInput(client);
|
||||
case X_ScreenSaverSetAttributes:
|
||||
return ProcScreenSaverSetAttributes(client);
|
||||
case X_ScreenSaverUnsetAttributes:
|
||||
return ProcScreenSaverUnsetAttributes(client);
|
||||
case X_ScreenSaverSuspend:
|
||||
return ProcScreenSaverSuspend(client);
|
||||
default:
|
||||
return BadRequest;
|
||||
}
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcScreenSaverQueryInfo(ClientPtr client)
|
||||
{
|
||||
REQUEST(xScreenSaverQueryInfoReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq);
|
||||
swapl(&stuff->drawable);
|
||||
return ProcScreenSaverQueryInfo(client);
|
||||
|
@ -1292,7 +1279,6 @@ static int _X_COLD
|
|||
SProcScreenSaverSelectInput(ClientPtr client)
|
||||
{
|
||||
REQUEST(xScreenSaverSelectInputReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xScreenSaverSelectInputReq);
|
||||
swapl(&stuff->drawable);
|
||||
swapl(&stuff->eventMask);
|
||||
|
@ -1303,7 +1289,6 @@ static int _X_COLD
|
|||
SProcScreenSaverSetAttributes(ClientPtr client)
|
||||
{
|
||||
REQUEST(xScreenSaverSetAttributesReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq);
|
||||
swapl(&stuff->drawable);
|
||||
swaps(&stuff->x);
|
||||
|
@ -1321,7 +1306,6 @@ static int _X_COLD
|
|||
SProcScreenSaverUnsetAttributes(ClientPtr client)
|
||||
{
|
||||
REQUEST(xScreenSaverUnsetAttributesReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
|
||||
swapl(&stuff->drawable);
|
||||
return ProcScreenSaverUnsetAttributes(client);
|
||||
|
@ -1331,28 +1315,31 @@ static int _X_COLD
|
|||
SProcScreenSaverSuspend(ClientPtr client)
|
||||
{
|
||||
REQUEST(xScreenSaverSuspendReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xScreenSaverSuspendReq);
|
||||
swapl(&stuff->suspend);
|
||||
return ProcScreenSaverSuspend(client);
|
||||
}
|
||||
|
||||
static int (*SwappedVector[]) (ClientPtr /* client */ ) = {
|
||||
SProcScreenSaverQueryVersion,
|
||||
SProcScreenSaverQueryInfo,
|
||||
SProcScreenSaverSelectInput,
|
||||
SProcScreenSaverSetAttributes,
|
||||
SProcScreenSaverUnsetAttributes, SProcScreenSaverSuspend,};
|
||||
|
||||
static int _X_COLD
|
||||
SProcScreenSaverDispatch(ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
|
||||
if (stuff->data < ARRAY_SIZE(NormalVector))
|
||||
return (*SwappedVector[stuff->data]) (client);
|
||||
return BadRequest;
|
||||
switch (stuff->data) {
|
||||
case X_ScreenSaverQueryVersion:
|
||||
return ProcScreenSaverQueryVersion(client);
|
||||
case X_ScreenSaverQueryInfo:
|
||||
return SProcScreenSaverQueryInfo(client);
|
||||
case X_ScreenSaverSelectInput:
|
||||
return SProcScreenSaverSelectInput(client);
|
||||
case X_ScreenSaverSetAttributes:
|
||||
return SProcScreenSaverSetAttributes(client);
|
||||
case X_ScreenSaverUnsetAttributes:
|
||||
return SProcScreenSaverUnsetAttributes(client);
|
||||
case X_ScreenSaverSuspend:
|
||||
return SProcScreenSaverSuspend(client);
|
||||
default:
|
||||
return BadRequest;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -24,9 +24,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/Xmd.h>
|
||||
#include <X11/extensions/securproto.h>
|
||||
|
@ -34,9 +32,10 @@ in this Software without prior written authorization from The Open Group.
|
|||
|
||||
#include "dix/dix_priv.h"
|
||||
#include "dix/registry_priv.h"
|
||||
#include "include/extinit_priv.h"
|
||||
#include "miext/extinit_priv.h"
|
||||
#include "os/audit.h"
|
||||
#include "os/auth.h"
|
||||
#include "os/osdep.h"
|
||||
|
||||
#include "scrnintstr.h"
|
||||
#include "inputstr.h"
|
||||
|
@ -46,9 +45,10 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include "privates.h"
|
||||
#include "xacestr.h"
|
||||
#include "securitysrv.h"
|
||||
#include "extinit.h"
|
||||
#include "protocol-versions.h"
|
||||
|
||||
Bool noSecurityExtension = FALSE;
|
||||
|
||||
/* Extension stuff */
|
||||
static int SecurityErrorBase; /* first Security error number */
|
||||
static int SecurityEventBase; /* first Security event number */
|
||||
|
@ -613,8 +613,6 @@ static int _X_COLD
|
|||
SProcSecurityQueryVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSecurityQueryVersionReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSecurityQueryVersionReq);
|
||||
swaps(&stuff->majorVersion);
|
||||
swaps(&stuff->minorVersion);
|
||||
|
@ -628,8 +626,6 @@ SProcSecurityGenerateAuthorization(ClientPtr client)
|
|||
CARD32 *values;
|
||||
unsigned long nvalues;
|
||||
int values_offset;
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xSecurityGenerateAuthorizationReq);
|
||||
swaps(&stuff->nbytesAuthProto);
|
||||
swaps(&stuff->nbytesAuthData);
|
||||
|
@ -637,10 +633,10 @@ SProcSecurityGenerateAuthorization(ClientPtr client)
|
|||
values_offset = bytes_to_int32(stuff->nbytesAuthProto) +
|
||||
bytes_to_int32(stuff->nbytesAuthData);
|
||||
if (values_offset >
|
||||
stuff->length - bytes_to_int32(sz_xSecurityGenerateAuthorizationReq))
|
||||
client->req_len - bytes_to_int32(sz_xSecurityGenerateAuthorizationReq))
|
||||
return BadLength;
|
||||
values = (CARD32 *) (&stuff[1]) + values_offset;
|
||||
nvalues = (((CARD32 *) stuff) + stuff->length) - values;
|
||||
nvalues = (((CARD32 *) stuff) + client->req_len) - values;
|
||||
SwapLongs(values, nvalues);
|
||||
return ProcSecurityGenerateAuthorization(client);
|
||||
} /* SProcSecurityGenerateAuthorization */
|
||||
|
@ -649,8 +645,6 @@ static int _X_COLD
|
|||
SProcSecurityRevokeAuthorization(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSecurityRevokeAuthorizationReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq);
|
||||
swapl(&stuff->authId);
|
||||
return ProcSecurityRevokeAuthorization(client);
|
||||
|
|
169
Xext/shape.c
169
Xext/shape.c
|
@ -24,9 +24,7 @@ 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>
|
||||
|
@ -35,6 +33,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
|
||||
#include "dix/dix_priv.h"
|
||||
#include "dix/gc_priv.h"
|
||||
#include "miext/extinit_priv.h"
|
||||
|
||||
#include "misc.h"
|
||||
#include "os.h"
|
||||
|
@ -47,7 +46,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include "opaque.h"
|
||||
#include "regionstr.h"
|
||||
#include "gcstruct.h"
|
||||
#include "extinit_priv.h"
|
||||
#include "protocol-versions.h"
|
||||
|
||||
typedef RegionPtr (*CreateDftPtr) (WindowPtr /* pWin */
|
||||
|
@ -67,10 +65,12 @@ static void SShapeNotifyEvent(xShapeNotifyEvent * /* from */ ,
|
|||
* externally by the Xfixes extension and are now defined in window.h
|
||||
*/
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#endif
|
||||
#endif /* XINERAMA */
|
||||
|
||||
Bool noShapeExtension = FALSE;
|
||||
|
||||
static int ShapeEventBase = 0;
|
||||
static RESTYPE ClientType, ShapeEventType; /* resource types for event masks */
|
||||
|
@ -227,24 +227,16 @@ ProcShapeQueryVersion(ClientPtr client)
|
|||
return Success;
|
||||
}
|
||||
|
||||
/*****************
|
||||
* ProcShapeRectangles
|
||||
*
|
||||
*****************/
|
||||
|
||||
static int
|
||||
ProcShapeRectangles(ClientPtr client)
|
||||
ShapeRectangles(ClientPtr client, xShapeRectanglesReq *stuff)
|
||||
{
|
||||
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)
|
||||
|
@ -268,7 +260,7 @@ ProcShapeRectangles(ClientPtr client)
|
|||
client->errorValue = stuff->ordering;
|
||||
return BadValue;
|
||||
}
|
||||
nrects = ((stuff->length << 2) - sizeof(xShapeRectanglesReq));
|
||||
nrects = ((client->req_len << 2) - sizeof(xShapeRectanglesReq));
|
||||
if (nrects & 4)
|
||||
return BadLength;
|
||||
nrects >>= 3;
|
||||
|
@ -299,16 +291,19 @@ ProcShapeRectangles(ClientPtr client)
|
|||
stuff->xOff, stuff->yOff, createDefault);
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
static int
|
||||
ProcPanoramiXShapeRectangles(ClientPtr client)
|
||||
ProcShapeRectangles(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShapeRectanglesReq);
|
||||
REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq);
|
||||
|
||||
#ifdef XINERAMA
|
||||
if (noPanoramiXExtension)
|
||||
return ShapeRectangles(client, stuff);
|
||||
|
||||
PanoramiXRes *win;
|
||||
int j, result;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq);
|
||||
|
||||
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
||||
client, DixWriteAccess);
|
||||
if (result != Success)
|
||||
|
@ -316,32 +311,27 @@ ProcPanoramiXShapeRectangles(ClientPtr client)
|
|||
|
||||
FOR_NSCREENS(j) {
|
||||
stuff->dest = win->info[j].id;
|
||||
result = ProcShapeRectangles(client);
|
||||
result = ShapeRectangles(client, stuff);
|
||||
if (result != Success)
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#else
|
||||
return ShapeRectangles(client);
|
||||
#endif
|
||||
|
||||
/**************
|
||||
* ProcShapeMask
|
||||
**************/
|
||||
}
|
||||
|
||||
static int
|
||||
ProcShapeMask(ClientPtr client)
|
||||
ShapeMask(ClientPtr client, xShapeMaskReq *stuff)
|
||||
{
|
||||
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)
|
||||
|
@ -397,16 +387,19 @@ ProcShapeMask(ClientPtr client)
|
|||
stuff->xOff, stuff->yOff, createDefault);
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
static int
|
||||
ProcPanoramiXShapeMask(ClientPtr client)
|
||||
ProcShapeMask(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShapeMaskReq);
|
||||
REQUEST_SIZE_MATCH(xShapeMaskReq);
|
||||
|
||||
#ifdef XINERAMA
|
||||
if (noPanoramiXExtension)
|
||||
return ShapeMask(client, stuff);
|
||||
|
||||
PanoramiXRes *win, *pmap;
|
||||
int j, result;
|
||||
|
||||
REQUEST_SIZE_MATCH(xShapeMaskReq);
|
||||
|
||||
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
||||
client, DixWriteAccess);
|
||||
if (result != Success)
|
||||
|
@ -425,24 +418,20 @@ ProcPanoramiXShapeMask(ClientPtr client)
|
|||
stuff->dest = win->info[j].id;
|
||||
if (pmap)
|
||||
stuff->src = pmap->info[j].id;
|
||||
result = ProcShapeMask(client);
|
||||
result = ShapeMask(client, stuff);
|
||||
if (result != Success)
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#else
|
||||
return ShapeMask(client, stuff);
|
||||
#endif
|
||||
|
||||
/************
|
||||
* ProcShapeCombine
|
||||
************/
|
||||
}
|
||||
|
||||
static int
|
||||
ProcShapeCombine(ClientPtr client)
|
||||
ShapeCombine(ClientPtr client, xShapeCombineReq *stuff)
|
||||
{
|
||||
WindowPtr pSrcWin, pDestWin;
|
||||
|
||||
REQUEST(xShapeCombineReq);
|
||||
RegionPtr srcRgn;
|
||||
RegionPtr *destRgn;
|
||||
CreateDftPtr createDefault;
|
||||
|
@ -450,7 +439,6 @@ ProcShapeCombine(ClientPtr client)
|
|||
RegionPtr tmp;
|
||||
int rc;
|
||||
|
||||
REQUEST_SIZE_MATCH(xShapeCombineReq);
|
||||
UpdateCurrentTime();
|
||||
rc = dixLookupWindow(&pDestWin, stuff->dest, client, DixSetAttrAccess);
|
||||
if (rc != Success)
|
||||
|
@ -525,16 +513,19 @@ ProcShapeCombine(ClientPtr client)
|
|||
stuff->xOff, stuff->yOff, createDefault);
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
static int
|
||||
ProcPanoramiXShapeCombine(ClientPtr client)
|
||||
ProcShapeCombine(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShapeCombineReq);
|
||||
REQUEST_AT_LEAST_SIZE(xShapeCombineReq);
|
||||
|
||||
#ifdef XINERAMA
|
||||
if (noPanoramiXExtension)
|
||||
return ShapeCombine(client, stuff);
|
||||
|
||||
PanoramiXRes *win, *win2;
|
||||
int j, result;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xShapeCombineReq);
|
||||
|
||||
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
||||
client, DixWriteAccess);
|
||||
if (result != Success)
|
||||
|
@ -548,28 +539,23 @@ ProcPanoramiXShapeCombine(ClientPtr client)
|
|||
FOR_NSCREENS(j) {
|
||||
stuff->dest = win->info[j].id;
|
||||
stuff->src = win2->info[j].id;
|
||||
result = ProcShapeCombine(client);
|
||||
result = ShapeCombine(client, stuff);
|
||||
if (result != Success)
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#else
|
||||
return ShapeCombine(client, stuff);
|
||||
#endif
|
||||
|
||||
/*************
|
||||
* ProcShapeOffset
|
||||
*************/
|
||||
}
|
||||
|
||||
static int
|
||||
ProcShapeOffset(ClientPtr client)
|
||||
ShapeOffset(ClientPtr client, xShapeOffsetReq *stuff)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
|
||||
REQUEST(xShapeOffsetReq);
|
||||
RegionPtr srcRgn;
|
||||
int rc;
|
||||
|
||||
REQUEST_SIZE_MATCH(xShapeOffsetReq);
|
||||
UpdateCurrentTime();
|
||||
rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess);
|
||||
if (rc != Success)
|
||||
|
@ -596,15 +582,18 @@ ProcShapeOffset(ClientPtr client)
|
|||
return Success;
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
static int
|
||||
ProcPanoramiXShapeOffset(ClientPtr client)
|
||||
ProcShapeOffset(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShapeOffsetReq);
|
||||
REQUEST_AT_LEAST_SIZE(xShapeOffsetReq);
|
||||
|
||||
#ifdef XINERAMA
|
||||
PanoramiXRes *win;
|
||||
int j, result;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xShapeOffsetReq);
|
||||
if (noPanoramiXExtension)
|
||||
return ShapeOffset(client, stuff);
|
||||
|
||||
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
||||
client, DixWriteAccess);
|
||||
|
@ -613,13 +602,15 @@ ProcPanoramiXShapeOffset(ClientPtr client)
|
|||
|
||||
FOR_NSCREENS(j) {
|
||||
stuff->dest = win->info[j].id;
|
||||
result = ProcShapeOffset(client);
|
||||
result = ShapeOffset(client, stuff);
|
||||
if (result != Success)
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#else
|
||||
return ShapeOffset(client, stuff);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
ProcShapeQueryExtents(ClientPtr client)
|
||||
|
@ -1037,33 +1028,13 @@ ProcShapeDispatch(ClientPtr client)
|
|||
case X_ShapeQueryVersion:
|
||||
return ProcShapeQueryVersion(client);
|
||||
case X_ShapeRectangles:
|
||||
#ifdef PANORAMIX
|
||||
if (!noPanoramiXExtension)
|
||||
return ProcPanoramiXShapeRectangles(client);
|
||||
else
|
||||
#endif
|
||||
return ProcShapeRectangles(client);
|
||||
return ProcShapeRectangles(client);
|
||||
case X_ShapeMask:
|
||||
#ifdef PANORAMIX
|
||||
if (!noPanoramiXExtension)
|
||||
return ProcPanoramiXShapeMask(client);
|
||||
else
|
||||
#endif
|
||||
return ProcShapeMask(client);
|
||||
return ProcShapeMask(client);
|
||||
case X_ShapeCombine:
|
||||
#ifdef PANORAMIX
|
||||
if (!noPanoramiXExtension)
|
||||
return ProcPanoramiXShapeCombine(client);
|
||||
else
|
||||
#endif
|
||||
return ProcShapeCombine(client);
|
||||
return ProcShapeCombine(client);
|
||||
case X_ShapeOffset:
|
||||
#ifdef PANORAMIX
|
||||
if (!noPanoramiXExtension)
|
||||
return ProcPanoramiXShapeOffset(client);
|
||||
else
|
||||
#endif
|
||||
return ProcShapeOffset(client);
|
||||
return ProcShapeOffset(client);
|
||||
case X_ShapeQueryExtents:
|
||||
return ProcShapeQueryExtents(client);
|
||||
case X_ShapeSelectInput:
|
||||
|
@ -1092,21 +1063,10 @@ SShapeNotifyEvent(xShapeNotifyEvent * from, xShapeNotifyEvent * to)
|
|||
to->shaped = from->shaped;
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcShapeQueryVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShapeQueryVersionReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
return ProcShapeQueryVersion(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcShapeRectangles(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShapeRectanglesReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq);
|
||||
swapl(&stuff->dest);
|
||||
swaps(&stuff->xOff);
|
||||
|
@ -1119,8 +1079,6 @@ static int _X_COLD
|
|||
SProcShapeMask(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShapeMaskReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xShapeMaskReq);
|
||||
swapl(&stuff->dest);
|
||||
swaps(&stuff->xOff);
|
||||
|
@ -1133,8 +1091,6 @@ static int _X_COLD
|
|||
SProcShapeCombine(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShapeCombineReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xShapeCombineReq);
|
||||
swapl(&stuff->dest);
|
||||
swaps(&stuff->xOff);
|
||||
|
@ -1147,8 +1103,6 @@ static int _X_COLD
|
|||
SProcShapeOffset(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShapeOffsetReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xShapeOffsetReq);
|
||||
swapl(&stuff->dest);
|
||||
swaps(&stuff->xOff);
|
||||
|
@ -1160,8 +1114,6 @@ static int _X_COLD
|
|||
SProcShapeQueryExtents(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShapeQueryExtentsReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xShapeQueryExtentsReq);
|
||||
swapl(&stuff->window);
|
||||
return ProcShapeQueryExtents(client);
|
||||
|
@ -1171,8 +1123,6 @@ static int _X_COLD
|
|||
SProcShapeSelectInput(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShapeSelectInputReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xShapeSelectInputReq);
|
||||
swapl(&stuff->window);
|
||||
return ProcShapeSelectInput(client);
|
||||
|
@ -1182,8 +1132,6 @@ static int _X_COLD
|
|||
SProcShapeInputSelected(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShapeInputSelectedReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xShapeInputSelectedReq);
|
||||
swapl(&stuff->window);
|
||||
return ProcShapeInputSelected(client);
|
||||
|
@ -1193,7 +1141,6 @@ static int _X_COLD
|
|||
SProcShapeGetRectangles(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShapeGetRectanglesReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xShapeGetRectanglesReq);
|
||||
swapl(&stuff->window);
|
||||
return ProcShapeGetRectangles(client);
|
||||
|
@ -1205,7 +1152,7 @@ SProcShapeDispatch(ClientPtr client)
|
|||
REQUEST(xReq);
|
||||
switch (stuff->data) {
|
||||
case X_ShapeQueryVersion:
|
||||
return SProcShapeQueryVersion(client);
|
||||
return ProcShapeQueryVersion(client);
|
||||
case X_ShapeRectangles:
|
||||
return SProcShapeRectangles(client);
|
||||
case X_ShapeMask:
|
||||
|
|
170
Xext/shm.c
170
Xext/shm.c
|
@ -28,9 +28,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
|
||||
#define SHM
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
|
@ -45,8 +43,10 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include <X11/Xfuncproto.h>
|
||||
|
||||
#include "dix/dix_priv.h"
|
||||
#include "miext/extinit_priv.h"
|
||||
#include "os/auth.h"
|
||||
#include "os/busfault.h"
|
||||
#include "os/log_priv.h"
|
||||
#include "os/osdep.h"
|
||||
|
||||
#include "misc.h"
|
||||
|
@ -61,7 +61,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include "servermd.h"
|
||||
#include "shmint.h"
|
||||
#include "xace.h"
|
||||
#include "extinit_priv.h"
|
||||
#include "protocol-versions.h"
|
||||
|
||||
/* Needed for Solaris cross-zone shared memory extension */
|
||||
|
@ -91,10 +90,10 @@ in this Software without prior written authorization from The Open Group.
|
|||
#define SHMPERM_MODE(p) p->mode
|
||||
#endif
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#endif
|
||||
#endif /* XINERAMA */
|
||||
|
||||
typedef struct _ShmScrPrivateRec {
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
|
@ -109,6 +108,9 @@ static void SShmCompletionEvent(xShmCompletionEvent *from,
|
|||
xShmCompletionEvent *to);
|
||||
|
||||
static Bool ShmDestroyPixmap(PixmapPtr pPixmap);
|
||||
static int ShmCreatePixmap(ClientPtr client, xShmCreatePixmapReq *stuff);
|
||||
|
||||
Bool noMITShmExtension = FALSE;
|
||||
|
||||
static unsigned char ShmReqCode;
|
||||
int ShmCompletionCode;
|
||||
|
@ -156,7 +158,7 @@ static ShmFuncs fbFuncs = { fbShmCreatePixmap, NULL };
|
|||
} \
|
||||
}
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) || defined(__DragonFly__)
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
|
||||
static Bool badSysCall = FALSE;
|
||||
|
||||
|
@ -372,12 +374,15 @@ shm_access(ClientPtr client, SHMPERM_TYPE * perm, int readonly)
|
|||
static int
|
||||
ProcShmAttach(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShmAttachReq);
|
||||
REQUEST_SIZE_MATCH(xShmAttachReq);
|
||||
|
||||
if (!client->local)
|
||||
return BadRequest;
|
||||
|
||||
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;
|
||||
|
@ -454,11 +459,14 @@ ShmDetachSegment(void *value, /* must conform to DeleteType */
|
|||
static int
|
||||
ProcShmDetach(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShmDetachReq);
|
||||
REQUEST_SIZE_MATCH(xShmDetachReq);
|
||||
|
||||
if (!client->local)
|
||||
return BadRequest;
|
||||
|
||||
ShmDescPtr shmdesc;
|
||||
|
||||
REQUEST(xShmDetachReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xShmDetachReq);
|
||||
VERIFY_SHMSEG(stuff->shmseg, shmdesc, client);
|
||||
FreeResource(stuff->shmseg, X11_RESTYPE_NONE);
|
||||
return Success;
|
||||
|
@ -515,16 +523,13 @@ doShmPutImage(DrawablePtr dst, GCPtr pGC,
|
|||
}
|
||||
|
||||
static int
|
||||
ProcShmPutImage(ClientPtr client)
|
||||
ShmPutImage(ClientPtr client, xShmPutImageReq *stuff)
|
||||
{
|
||||
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))
|
||||
|
@ -614,7 +619,7 @@ ProcShmPutImage(ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
ProcShmGetImage(ClientPtr client)
|
||||
ShmGetImage(ClientPtr client, xShmGetImageReq *stuff)
|
||||
{
|
||||
DrawablePtr pDraw;
|
||||
long lenPer = 0, length;
|
||||
|
@ -625,9 +630,6 @@ ProcShmGetImage(ClientPtr client)
|
|||
RegionPtr pVisibleRegion = NULL;
|
||||
int rc;
|
||||
|
||||
REQUEST(xShmGetImageReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xShmGetImageReq);
|
||||
if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) {
|
||||
client->errorValue = stuff->format;
|
||||
return BadValue;
|
||||
|
@ -732,16 +734,22 @@ ProcShmGetImage(ClientPtr client)
|
|||
return Success;
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
static int
|
||||
ProcPanoramiXShmPutImage(ClientPtr client)
|
||||
ProcShmPutImage(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShmPutImageReq);
|
||||
REQUEST_SIZE_MATCH(xShmPutImageReq);
|
||||
|
||||
if (!client->local)
|
||||
return BadRequest;
|
||||
|
||||
#ifdef XINERAMA
|
||||
int j, result, orig_x, orig_y;
|
||||
PanoramiXRes *draw, *gc;
|
||||
Bool sendEvent, isRoot;
|
||||
|
||||
REQUEST(xShmPutImageReq);
|
||||
REQUEST_SIZE_MATCH(xShmPutImageReq);
|
||||
if (noPanoramiXExtension)
|
||||
return ShmPutImage(client, stuff);
|
||||
|
||||
result = dixLookupResourceByClass((void **) &draw, stuff->drawable,
|
||||
XRC_DRAWABLE, client, DixWriteAccess);
|
||||
|
@ -768,16 +776,26 @@ ProcPanoramiXShmPutImage(ClientPtr client)
|
|||
stuff->dstX = orig_x - screenInfo.screens[j]->x;
|
||||
stuff->dstY = orig_y - screenInfo.screens[j]->y;
|
||||
}
|
||||
result = ProcShmPutImage(client);
|
||||
result = ShmPutImage(client, stuff);
|
||||
if (result != Success)
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
#else
|
||||
return ShmPutImage(client, stuff);
|
||||
#endif /* XINERAMA */
|
||||
}
|
||||
|
||||
static int
|
||||
ProcPanoramiXShmGetImage(ClientPtr client)
|
||||
ProcShmGetImage(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShmGetImageReq);
|
||||
REQUEST_SIZE_MATCH(xShmGetImageReq);
|
||||
|
||||
if (!client->local)
|
||||
return BadRequest;
|
||||
|
||||
#ifdef XINERAMA
|
||||
PanoramiXRes *draw;
|
||||
DrawablePtr *drawables;
|
||||
DrawablePtr pDraw;
|
||||
|
@ -788,9 +806,8 @@ ProcPanoramiXShmGetImage(ClientPtr client)
|
|||
long lenPer = 0, length, widthBytesLine;
|
||||
Bool isRoot;
|
||||
|
||||
REQUEST(xShmGetImageReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xShmGetImageReq);
|
||||
if (noPanoramiXExtension)
|
||||
return ShmGetImage(client, stuff);
|
||||
|
||||
if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) {
|
||||
client->errorValue = stuff->format;
|
||||
|
@ -803,7 +820,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
|
|||
return (rc == BadValue) ? BadDrawable : rc;
|
||||
|
||||
if (draw->type == XRT_PIXMAP)
|
||||
return ProcShmGetImage(client);
|
||||
return ShmGetImage(client, stuff);
|
||||
|
||||
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixReadAccess);
|
||||
if (rc != Success)
|
||||
|
@ -914,24 +931,34 @@ ProcPanoramiXShmGetImage(ClientPtr client)
|
|||
WriteToClient(client, sizeof(xShmGetImageReply), &xgi);
|
||||
|
||||
return Success;
|
||||
#else
|
||||
return ShmGetImage(client, stuff);
|
||||
#endif /* XINERAMA */
|
||||
}
|
||||
|
||||
static int
|
||||
ProcPanoramiXShmCreatePixmap(ClientPtr client)
|
||||
ProcShmCreatePixmap(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShmCreatePixmapReq);
|
||||
REQUEST_SIZE_MATCH(xShmCreatePixmapReq);
|
||||
|
||||
if (!client->local)
|
||||
return BadRequest;
|
||||
|
||||
#ifdef XINERAMA
|
||||
if (noPanoramiXExtension)
|
||||
return ShmCreatePixmap(client, stuff);
|
||||
|
||||
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;
|
||||
|
@ -1027,8 +1054,10 @@ ProcPanoramiXShmCreatePixmap(ClientPtr client)
|
|||
AddResource(stuff->pid, XRT_PIXMAP, newPix);
|
||||
|
||||
return result;
|
||||
#else
|
||||
return ShmCreatePixmap(client, stuff);
|
||||
#endif /* XINERAMA */
|
||||
}
|
||||
#endif
|
||||
|
||||
static PixmapPtr
|
||||
fbShmCreatePixmap(ScreenPtr pScreen,
|
||||
|
@ -1051,7 +1080,7 @@ fbShmCreatePixmap(ScreenPtr pScreen,
|
|||
}
|
||||
|
||||
static int
|
||||
ProcShmCreatePixmap(ClientPtr client)
|
||||
ShmCreatePixmap(ClientPtr client, xShmCreatePixmapReq *stuff)
|
||||
{
|
||||
PixmapPtr pMap;
|
||||
DrawablePtr pDraw;
|
||||
|
@ -1059,12 +1088,9 @@ ProcShmCreatePixmap(ClientPtr client)
|
|||
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;
|
||||
|
@ -1146,19 +1172,24 @@ ShmBusfaultNotify(void *context)
|
|||
static int
|
||||
ProcShmAttachFd(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShmAttachFdReq);
|
||||
REQUEST_SIZE_MATCH(xShmAttachFdReq);
|
||||
|
||||
if (!client->local)
|
||||
return BadRequest;
|
||||
|
||||
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);
|
||||
fd = client->recv_fd_list[0];
|
||||
client->recv_fd_list[0] = -1;
|
||||
|
||||
if (fd < 0)
|
||||
return BadMatch;
|
||||
|
||||
|
@ -1261,9 +1292,14 @@ shm_tmpfile(void)
|
|||
static int
|
||||
ProcShmCreateSegment(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShmCreateSegmentReq);
|
||||
REQUEST_SIZE_MATCH(xShmCreateSegmentReq);
|
||||
|
||||
if (!client->local)
|
||||
return BadRequest;
|
||||
|
||||
int fd;
|
||||
ShmDescPtr shmdesc;
|
||||
REQUEST(xShmCreateSegmentReq);
|
||||
xShmCreateSegmentReply rep = {
|
||||
.type = X_Reply,
|
||||
.nfd = 1,
|
||||
|
@ -1271,7 +1307,6 @@ ProcShmCreateSegment(ClientPtr client)
|
|||
.length = 0,
|
||||
};
|
||||
|
||||
REQUEST_SIZE_MATCH(xShmCreateSegmentReq);
|
||||
LEGAL_NEW_RESOURCE(stuff->shmseg, client);
|
||||
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
|
||||
client->errorValue = stuff->readOnly;
|
||||
|
@ -1336,34 +1371,18 @@ ProcShmDispatch(ClientPtr client)
|
|||
{
|
||||
REQUEST(xReq);
|
||||
|
||||
if (stuff->data == X_ShmQueryVersion)
|
||||
return ProcShmQueryVersion(client);
|
||||
|
||||
if (!client->local)
|
||||
return BadRequest;
|
||||
|
||||
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:
|
||||
|
@ -1388,20 +1407,10 @@ SShmCompletionEvent(xShmCompletionEvent * from, xShmCompletionEvent * to)
|
|||
cpswapl(from->offset, to->offset);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcShmQueryVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShmQueryVersionReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
return ProcShmQueryVersion(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcShmAttach(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShmAttachReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xShmAttachReq);
|
||||
swapl(&stuff->shmseg);
|
||||
swapl(&stuff->shmid);
|
||||
|
@ -1412,7 +1421,6 @@ static int _X_COLD
|
|||
SProcShmDetach(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShmDetachReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xShmDetachReq);
|
||||
swapl(&stuff->shmseg);
|
||||
return ProcShmDetach(client);
|
||||
|
@ -1422,7 +1430,6 @@ static int _X_COLD
|
|||
SProcShmPutImage(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShmPutImageReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xShmPutImageReq);
|
||||
swapl(&stuff->drawable);
|
||||
swapl(&stuff->gc);
|
||||
|
@ -1443,7 +1450,6 @@ static int _X_COLD
|
|||
SProcShmGetImage(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShmGetImageReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xShmGetImageReq);
|
||||
swapl(&stuff->drawable);
|
||||
swaps(&stuff->x);
|
||||
|
@ -1460,7 +1466,6 @@ static int _X_COLD
|
|||
SProcShmCreatePixmap(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShmCreatePixmapReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xShmCreatePixmapReq);
|
||||
swapl(&stuff->pid);
|
||||
swapl(&stuff->drawable);
|
||||
|
@ -1476,8 +1481,6 @@ static int _X_COLD
|
|||
SProcShmAttachFd(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShmAttachFdReq);
|
||||
SetReqFds(client, 1);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xShmAttachFdReq);
|
||||
swapl(&stuff->shmseg);
|
||||
return ProcShmAttachFd(client);
|
||||
|
@ -1487,7 +1490,6 @@ static int _X_COLD
|
|||
SProcShmCreateSegment(ClientPtr client)
|
||||
{
|
||||
REQUEST(xShmCreateSegmentReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xShmCreateSegmentReq);
|
||||
swapl(&stuff->shmseg);
|
||||
swapl(&stuff->size);
|
||||
|
@ -1500,13 +1502,9 @@ SProcShmDispatch(ClientPtr client)
|
|||
{
|
||||
REQUEST(xReq);
|
||||
|
||||
if (stuff->data == X_ShmQueryVersion)
|
||||
return SProcShmQueryVersion(client);
|
||||
|
||||
if (!client->local)
|
||||
return BadRequest;
|
||||
|
||||
switch (stuff->data) {
|
||||
case X_ShmQueryVersion:
|
||||
return ProcShmQueryVersion(client);
|
||||
case X_ShmAttach:
|
||||
return SProcShmAttach(client);
|
||||
case X_ShmDetach:
|
||||
|
|
|
@ -27,9 +27,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
|
||||
/* 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>
|
||||
|
|
48
Xext/sync.c
48
Xext/sync.c
|
@ -49,9 +49,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
@ -61,6 +59,8 @@ PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <X11/extensions/syncproto.h>
|
||||
|
||||
#include "dix/dix_priv.h"
|
||||
#include "miext/extinit_priv.h"
|
||||
#include "os/osdep.h"
|
||||
|
||||
#include "scrnintstr.h"
|
||||
#include "os.h"
|
||||
|
@ -78,8 +78,6 @@ PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include "extinit_priv.h"
|
||||
|
||||
/*
|
||||
* Local Global Variables
|
||||
*/
|
||||
|
@ -2152,31 +2150,10 @@ ProcSyncDispatch(ClientPtr client)
|
|||
* Boring Swapping stuff ...
|
||||
*/
|
||||
|
||||
static int _X_COLD
|
||||
SProcSyncInitialize(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncInitializeReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSyncInitializeReq);
|
||||
|
||||
return ProcSyncInitialize(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcSyncListSystemCounters(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncListSystemCountersReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSyncListSystemCountersReq);
|
||||
|
||||
return ProcSyncListSystemCounters(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcSyncCreateCounter(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncCreateCounterReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSyncCreateCounterReq);
|
||||
swapl(&stuff->cid);
|
||||
swapl(&stuff->initial_value_lo);
|
||||
|
@ -2189,7 +2166,6 @@ static int _X_COLD
|
|||
SProcSyncSetCounter(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncSetCounterReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSyncSetCounterReq);
|
||||
swapl(&stuff->cid);
|
||||
swapl(&stuff->value_lo);
|
||||
|
@ -2202,7 +2178,6 @@ static int _X_COLD
|
|||
SProcSyncChangeCounter(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncChangeCounterReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSyncChangeCounterReq);
|
||||
swapl(&stuff->cid);
|
||||
swapl(&stuff->value_lo);
|
||||
|
@ -2215,7 +2190,6 @@ static int _X_COLD
|
|||
SProcSyncQueryCounter(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncQueryCounterReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSyncQueryCounterReq);
|
||||
swapl(&stuff->counter);
|
||||
|
||||
|
@ -2226,7 +2200,6 @@ static int _X_COLD
|
|||
SProcSyncDestroyCounter(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncDestroyCounterReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSyncDestroyCounterReq);
|
||||
swapl(&stuff->counter);
|
||||
|
||||
|
@ -2237,7 +2210,6 @@ static int _X_COLD
|
|||
SProcSyncAwait(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncAwaitReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xSyncAwaitReq);
|
||||
SwapRestL(stuff);
|
||||
|
||||
|
@ -2248,7 +2220,6 @@ static int _X_COLD
|
|||
SProcSyncCreateAlarm(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncCreateAlarmReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xSyncCreateAlarmReq);
|
||||
swapl(&stuff->id);
|
||||
swapl(&stuff->valueMask);
|
||||
|
@ -2261,7 +2232,6 @@ static int _X_COLD
|
|||
SProcSyncChangeAlarm(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncChangeAlarmReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq);
|
||||
swapl(&stuff->alarm);
|
||||
swapl(&stuff->valueMask);
|
||||
|
@ -2273,7 +2243,6 @@ static int _X_COLD
|
|||
SProcSyncQueryAlarm(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncQueryAlarmReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSyncQueryAlarmReq);
|
||||
swapl(&stuff->alarm);
|
||||
|
||||
|
@ -2284,7 +2253,6 @@ static int _X_COLD
|
|||
SProcSyncDestroyAlarm(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncDestroyAlarmReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSyncDestroyAlarmReq);
|
||||
swapl(&stuff->alarm);
|
||||
|
||||
|
@ -2295,7 +2263,6 @@ static int _X_COLD
|
|||
SProcSyncSetPriority(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncSetPriorityReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSyncSetPriorityReq);
|
||||
swapl(&stuff->id);
|
||||
swapl(&stuff->priority);
|
||||
|
@ -2307,7 +2274,6 @@ static int _X_COLD
|
|||
SProcSyncGetPriority(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncGetPriorityReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSyncGetPriorityReq);
|
||||
swapl(&stuff->id);
|
||||
|
||||
|
@ -2318,7 +2284,6 @@ static int _X_COLD
|
|||
SProcSyncCreateFence(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncCreateFenceReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSyncCreateFenceReq);
|
||||
swapl(&stuff->d);
|
||||
swapl(&stuff->fid);
|
||||
|
@ -2330,7 +2295,6 @@ static int _X_COLD
|
|||
SProcSyncTriggerFence(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncTriggerFenceReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSyncTriggerFenceReq);
|
||||
swapl(&stuff->fid);
|
||||
|
||||
|
@ -2341,7 +2305,6 @@ static int _X_COLD
|
|||
SProcSyncResetFence(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncResetFenceReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSyncResetFenceReq);
|
||||
swapl(&stuff->fid);
|
||||
|
||||
|
@ -2352,7 +2315,6 @@ static int _X_COLD
|
|||
SProcSyncDestroyFence(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncDestroyFenceReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSyncDestroyFenceReq);
|
||||
swapl(&stuff->fid);
|
||||
|
||||
|
@ -2363,7 +2325,6 @@ static int _X_COLD
|
|||
SProcSyncQueryFence(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncQueryFenceReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSyncQueryFenceReq);
|
||||
swapl(&stuff->fid);
|
||||
|
||||
|
@ -2374,7 +2335,6 @@ static int _X_COLD
|
|||
SProcSyncAwaitFence(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSyncAwaitFenceReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xSyncAwaitFenceReq);
|
||||
SwapRestL(stuff);
|
||||
|
||||
|
@ -2388,9 +2348,9 @@ SProcSyncDispatch(ClientPtr client)
|
|||
|
||||
switch (stuff->data) {
|
||||
case X_SyncInitialize:
|
||||
return SProcSyncInitialize(client);
|
||||
return ProcSyncInitialize(client);
|
||||
case X_SyncListSystemCounters:
|
||||
return SProcSyncListSystemCounters(client);
|
||||
return ProcSyncListSystemCounters(client);
|
||||
case X_SyncCreateCounter:
|
||||
return SProcSyncCreateCounter(client);
|
||||
case X_SyncSetCounter:
|
||||
|
|
745
Xext/vidmode.c
745
Xext/vidmode.c
File diff suppressed because it is too large
Load Diff
14
Xext/xace.c
14
Xext/xace.c
|
@ -17,9 +17,7 @@ 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"
|
||||
|
@ -280,3 +278,15 @@ XaceIsLocal(ClientPtr client)
|
|||
{
|
||||
return ClientIsLocal(client);
|
||||
}
|
||||
|
||||
Bool
|
||||
XaceRegisterCallback(int hook, CallbackProcPtr callback, void *data)
|
||||
{
|
||||
return AddCallback(XaceHooks+(hook), callback, data);
|
||||
}
|
||||
|
||||
Bool
|
||||
XaceDeleteCallback(int hook, CallbackProcPtr callback, void *data)
|
||||
{
|
||||
return DeleteCallback(XaceHooks+(hook), callback, data);
|
||||
}
|
||||
|
|
20
Xext/xace.h
20
Xext/xace.h
|
@ -25,12 +25,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#define XACE_MAJOR_VERSION 2
|
||||
#define XACE_MINOR_VERSION 0
|
||||
|
||||
#include "dix/selection_priv.h"
|
||||
|
||||
#include "extnsionst.h"
|
||||
#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)
|
||||
|
@ -58,11 +59,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
extern CallbackListPtr XaceHooks[XACE_NUM_HOOKS];
|
||||
|
||||
/* Entry point for hook functions. Called by Xserver.
|
||||
* Required by libdbe and libextmod
|
||||
* Required by several modules
|
||||
*/
|
||||
/* needs to be exported for in-tree modsetting driver, but not part
|
||||
of public API for external modules */
|
||||
_X_EXPORT int XaceHook(int hook, ... /* appropriate args for hook */);
|
||||
_X_EXPORT Bool XaceRegisterCallback(int hook, CallbackProcPtr callback, void *data);
|
||||
_X_EXPORT Bool XaceDeleteCallback(int hook, CallbackProcPtr callback, void *data);
|
||||
|
||||
/* determine whether any callbacks are present for the XACE hook */
|
||||
int XaceHookIsSet(int hook);
|
||||
|
@ -96,16 +97,7 @@ int XaceHookScreensaverAccess(ClientPtr client, ScreenPtr screen, Mask access_mo
|
|||
int XaceHookAuthAvail(ClientPtr client, XID authId);
|
||||
int XaceHookKeyAvail(xEventPtr ev, DeviceIntPtr dev, int count);
|
||||
|
||||
|
||||
/* 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)
|
||||
/* Register / unregister a callback for a given hook. */
|
||||
|
||||
/* XTrans wrappers for use by security modules
|
||||
*/
|
||||
|
|
|
@ -20,13 +20,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#ifndef _XACESTR_H
|
||||
#define _XACESTR_H
|
||||
|
||||
#include "dix/selection_priv.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 */
|
||||
|
|
|
@ -26,21 +26,20 @@ from The Open Group.
|
|||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/xcmiscproto.h>
|
||||
|
||||
#include "miext/extinit_priv.h"
|
||||
|
||||
#include "misc.h"
|
||||
#include "os.h"
|
||||
#include "dixstruct.h"
|
||||
#include "extnsionst.h"
|
||||
#include "swaprep.h"
|
||||
#include <X11/extensions/xcmiscproto.h>
|
||||
#include "extinit_priv.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static int
|
||||
ProcXCMiscGetVersion(ClientPtr client)
|
||||
|
@ -146,30 +145,18 @@ static int _X_COLD
|
|||
SProcXCMiscGetVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXCMiscGetVersionReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXCMiscGetVersionReq);
|
||||
swaps(&stuff->majorVersion);
|
||||
swaps(&stuff->minorVersion);
|
||||
return ProcXCMiscGetVersion(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcXCMiscGetXIDRange(ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
return ProcXCMiscGetXIDRange(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcXCMiscGetXIDList(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXCMiscGetXIDListReq);
|
||||
REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->count);
|
||||
return ProcXCMiscGetXIDList(client);
|
||||
}
|
||||
|
@ -182,7 +169,7 @@ SProcXCMiscDispatch(ClientPtr client)
|
|||
case X_XCMiscGetVersion:
|
||||
return SProcXCMiscGetVersion(client);
|
||||
case X_XCMiscGetXIDRange:
|
||||
return SProcXCMiscGetXIDRange(client);
|
||||
return ProcXCMiscGetXIDRange(client);
|
||||
case X_XCMiscGetXIDList:
|
||||
return SProcXCMiscGetXIDList(client);
|
||||
default:
|
||||
|
|
|
@ -34,19 +34,13 @@
|
|||
* XLoadQueryFont).
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef MITSHM
|
||||
#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>
|
||||
|
@ -60,17 +54,20 @@
|
|||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/xf86bigfproto.h>
|
||||
|
||||
#include "miext/extinit_priv.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 "xf86bigfontsrv.h"
|
||||
|
||||
Bool noXFree86BigfontExtension = FALSE;
|
||||
|
||||
static void XF86BigfontResetProc(ExtensionEntry *extEntry );
|
||||
|
||||
#ifdef MITSHM
|
||||
|
@ -87,7 +84,7 @@ static unsigned int pagesize;
|
|||
|
||||
static Bool badSysCall = FALSE;
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) || defined(__DragonFly__)
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
|
||||
static void
|
||||
SigSysHandler(int signo)
|
||||
|
@ -266,13 +263,11 @@ XF86BigfontResetProc(ExtensionEntry * extEntry)
|
|||
static int
|
||||
ProcXF86BigfontQueryVersion(ClientPtr client)
|
||||
{
|
||||
xXF86BigfontQueryVersionReply reply;
|
||||
|
||||
REQUEST_SIZE_MATCH(xXF86BigfontQueryVersionReq);
|
||||
reply = (xXF86BigfontQueryVersionReply) {
|
||||
|
||||
xXF86BigfontQueryVersionReply reply = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0,
|
||||
.majorVersion = SERVER_XF86BIGFONT_MAJOR_VERSION,
|
||||
.minorVersion = SERVER_XF86BIGFONT_MINOR_VERSION,
|
||||
.uid = geteuid(),
|
||||
|
@ -281,9 +276,6 @@ ProcXF86BigfontQueryVersion(ClientPtr client)
|
|||
.signature = signature,
|
||||
.capabilities = (client->local && !client->swapped)
|
||||
? XF86Bigfont_CAP_LocalShm : 0
|
||||
#else
|
||||
.signature = 0,
|
||||
.capabilities = 0
|
||||
#endif
|
||||
};
|
||||
if (client->swapped) {
|
||||
|
@ -654,8 +646,6 @@ static int _X_COLD
|
|||
SProcXF86BigfontQueryVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXF86BigfontQueryVersionReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
return ProcXF86BigfontQueryVersion(client);
|
||||
}
|
||||
|
||||
|
@ -663,8 +653,6 @@ static int _X_COLD
|
|||
SProcXF86BigfontQueryFont(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXF86BigfontQueryFontReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq);
|
||||
swapl(&stuff->id);
|
||||
return ProcXF86BigfontQueryFont(client);
|
||||
|
@ -716,7 +704,7 @@ XFree86BigfontExtensionInit(void)
|
|||
|
||||
FontShmdescIndex = xfont2_allocate_font_private_index();
|
||||
|
||||
#if !defined(CSRG_BASED) && !defined(__CYGWIN__)
|
||||
#if !defined(CSRG_BASED)
|
||||
pagesize = SHMLBA;
|
||||
#else
|
||||
#ifdef _SC_PAGESIZE
|
||||
|
|
164
Xext/xres.c
164
Xext/xres.c
|
@ -2,33 +2,30 @@
|
|||
Copyright (c) 2002 XFree86 Inc
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <assert.h>
|
||||
#include <X11/extensions/XResproto.h>
|
||||
|
||||
#include "dix/registry_priv.h"
|
||||
#include "miext/extinit_priv.h"
|
||||
#include "os/client_priv.h"
|
||||
|
||||
#include "misc.h"
|
||||
#include "os.h"
|
||||
#include "dixstruct.h"
|
||||
#include "extnsionst.h"
|
||||
#include "swaprep.h"
|
||||
#include <X11/extensions/XResproto.h>
|
||||
#include "pixmapstr.h"
|
||||
#include "windowstr.h"
|
||||
#include "gcstruct.h"
|
||||
#include "extinit_priv.h"
|
||||
#include "protocol-versions.h"
|
||||
#include "client.h"
|
||||
#include "list.h"
|
||||
#include "misc.h"
|
||||
#include <string.h>
|
||||
#include "hashtable.h"
|
||||
#include "picturestr.h"
|
||||
|
||||
|
@ -36,6 +33,8 @@
|
|||
#include "compint.h"
|
||||
#endif
|
||||
|
||||
Bool noResExtension = FALSE;
|
||||
|
||||
/** @brief Holds fragments of responses for ConstructClientIds.
|
||||
*
|
||||
* note: there is no consideration for data alignment */
|
||||
|
@ -113,21 +112,6 @@ AddFragment(struct xorg_list *frags, int bytes)
|
|||
}
|
||||
}
|
||||
|
||||
/** @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
|
||||
|
@ -195,16 +179,15 @@ DestroyConstructResourceBytesCtx(ConstructResourceBytesCtx *ctx)
|
|||
static int
|
||||
ProcXResQueryVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST_SIZE_MATCH(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);
|
||||
|
@ -218,16 +201,12 @@ ProcXResQueryVersion(ClientPtr client)
|
|||
static int
|
||||
ProcXResQueryClients(ClientPtr client)
|
||||
{
|
||||
/* REQUEST(xXResQueryClientsReq); */
|
||||
xXResQueryClientsReply rep;
|
||||
int *current_clients;
|
||||
int i, num_clients;
|
||||
int i, num_clients = 0;
|
||||
|
||||
REQUEST_SIZE_MATCH(xXResQueryClientsReq);
|
||||
|
||||
current_clients = xallocarray(currentMaxClients, sizeof(int));
|
||||
int current_clients[currentMaxClients];
|
||||
|
||||
num_clients = 0;
|
||||
for (i = 0; i < currentMaxClients; i++) {
|
||||
if (clients[i]) {
|
||||
current_clients[num_clients] = i;
|
||||
|
@ -235,7 +214,7 @@ ProcXResQueryClients(ClientPtr client)
|
|||
}
|
||||
}
|
||||
|
||||
rep = (xXResQueryClientsReply) {
|
||||
xXResQueryClientsReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = bytes_to_int32(num_clients * sz_xXResClient),
|
||||
|
@ -248,22 +227,21 @@ ProcXResQueryClients(ClientPtr client)
|
|||
}
|
||||
WriteToClient(client, sizeof(xXResQueryClientsReply), &rep);
|
||||
|
||||
if (num_clients) {
|
||||
xXResClient scratch;
|
||||
xXResClient scratch[num_clients];
|
||||
|
||||
if (num_clients) {
|
||||
for (i = 0; i < num_clients; i++) {
|
||||
scratch.resource_base = clients[current_clients[i]]->clientAsMask;
|
||||
scratch.resource_mask = RESOURCE_ID_MASK;
|
||||
scratch[i].resource_base = clients[current_clients[i]]->clientAsMask;
|
||||
scratch[i].resource_mask = RESOURCE_ID_MASK;
|
||||
|
||||
if (client->swapped) {
|
||||
swapl(&scratch.resource_base);
|
||||
swapl(&scratch.resource_mask);
|
||||
swapl(&scratch[i].resource_base);
|
||||
swapl(&scratch[i].resource_mask);
|
||||
}
|
||||
WriteToClient(client, sz_xXResClient, &scratch);
|
||||
}
|
||||
}
|
||||
|
||||
free(current_clients);
|
||||
WriteToClient(client, sizeof(scratch), scratch);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
@ -298,12 +276,10 @@ static int
|
|||
ProcXResQueryClientResources(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXResQueryClientResourcesReq);
|
||||
xXResQueryClientResourcesReply rep;
|
||||
int i, clientID, num_types;
|
||||
int *counts;
|
||||
|
||||
REQUEST_SIZE_MATCH(xXResQueryClientResourcesReq);
|
||||
|
||||
int i, clientID, num_types = 0;
|
||||
|
||||
clientID = CLIENT_ID(stuff->xid);
|
||||
|
||||
if ((clientID >= currentMaxClients) || !clients[clientID]) {
|
||||
|
@ -311,18 +287,21 @@ ProcXResQueryClientResources(ClientPtr client)
|
|||
return BadValue;
|
||||
}
|
||||
|
||||
counts = calloc(lastResourceType + 1, sizeof(int));
|
||||
int counts[lastResourceType + 1];
|
||||
memset(counts, 0, sizeof(counts));
|
||||
|
||||
FindAllClientResources(clients[clientID], ResFindAllRes, counts);
|
||||
|
||||
num_types = 0;
|
||||
int cnt[lastResourceType + 1];
|
||||
|
||||
for (i = 0; i <= lastResourceType; i++) {
|
||||
if (counts[i])
|
||||
if (counts[i]) {
|
||||
cnt[num_types] = counts[i];
|
||||
num_types++;
|
||||
}
|
||||
}
|
||||
|
||||
rep = (xXResQueryClientResourcesReply) {
|
||||
xXResQueryClientResourcesReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = bytes_to_int32(num_types * sz_xXResType),
|
||||
|
@ -334,28 +313,20 @@ ProcXResQueryClientResources(ClientPtr client)
|
|||
swapl(&rep.num_types);
|
||||
}
|
||||
|
||||
WriteToClient(client, sizeof(xXResQueryClientResourcesReply), &rep);
|
||||
xXResType scratch[num_types];
|
||||
|
||||
if (num_types) {
|
||||
xXResType scratch;
|
||||
for (i = 0; i < num_types; i++) {
|
||||
scratch[i].resource_type = resourceTypeAtom(i + 1);
|
||||
scratch[i].count = cnt[i];
|
||||
|
||||
for (i = 0; i < lastResourceType; i++) {
|
||||
if (!counts[i])
|
||||
continue;
|
||||
|
||||
scratch.resource_type = resourceTypeAtom(i + 1);
|
||||
scratch.count = counts[i];
|
||||
|
||||
if (client->swapped) {
|
||||
swapl(&scratch.resource_type);
|
||||
swapl(&scratch.count);
|
||||
}
|
||||
WriteToClient(client, sz_xXResType, &scratch);
|
||||
if (client->swapped) {
|
||||
swapl(&scratch[i].resource_type);
|
||||
swapl(&scratch[i].count);
|
||||
}
|
||||
}
|
||||
|
||||
free(counts);
|
||||
|
||||
WriteToClient(client, sizeof(xXResQueryClientResourcesReply), &rep);
|
||||
WriteToClient(client, sizeof(scratch), scratch);
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
@ -374,12 +345,11 @@ static int
|
|||
ProcXResQueryClientPixmapBytes(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXResQueryClientPixmapBytesReq);
|
||||
xXResQueryClientPixmapBytesReply rep;
|
||||
int clientID;
|
||||
unsigned long bytes;
|
||||
|
||||
REQUEST_SIZE_MATCH(xXResQueryClientPixmapBytesReq);
|
||||
|
||||
int clientID;
|
||||
unsigned long bytes = 0;
|
||||
|
||||
clientID = CLIENT_ID(stuff->xid);
|
||||
|
||||
if ((clientID >= currentMaxClients) || !clients[clientID]) {
|
||||
|
@ -387,20 +357,15 @@ ProcXResQueryClientPixmapBytes(ClientPtr client)
|
|||
return BadValue;
|
||||
}
|
||||
|
||||
bytes = 0;
|
||||
|
||||
FindAllClientResources(clients[clientID], ResFindResourcePixmaps,
|
||||
(void *) (&bytes));
|
||||
|
||||
rep = (xXResQueryClientPixmapBytesReply) {
|
||||
xXResQueryClientPixmapBytesReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0,
|
||||
.bytes = bytes,
|
||||
#ifdef _XSERVER64
|
||||
.bytes_overflow = bytes >> 32
|
||||
#else
|
||||
.bytes_overflow = 0
|
||||
#endif
|
||||
};
|
||||
if (client->swapped) {
|
||||
|
@ -459,9 +424,10 @@ static Bool
|
|||
ConstructClientIdValue(ClientPtr sendClient, ClientPtr client, CARD32 mask,
|
||||
ConstructClientIdCtx *ctx)
|
||||
{
|
||||
xXResClientIdValue rep;
|
||||
xXResClientIdValue rep = {
|
||||
.spec.client = client->clientAsMask,
|
||||
};
|
||||
|
||||
rep.spec.client = client->clientAsMask;
|
||||
if (client->swapped) {
|
||||
swapl (&rep.spec.client);
|
||||
}
|
||||
|
@ -473,7 +439,6 @@ ConstructClientIdValue(ClientPtr sendClient, ClientPtr client, CARD32 mask,
|
|||
}
|
||||
|
||||
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 */
|
||||
|
@ -502,9 +467,6 @@ ConstructClientIdValue(ClientPtr sendClient, ClientPtr client, CARD32 mask,
|
|||
if (sendClient->swapped) {
|
||||
swapl (&rep.spec.mask);
|
||||
swapl (&rep.length);
|
||||
}
|
||||
|
||||
if (sendClient->swapped) {
|
||||
swapl (value);
|
||||
}
|
||||
memcpy(ptr, &rep, sizeof(rep));
|
||||
|
@ -587,15 +549,26 @@ ProcXResQueryClientIds (ClientPtr client)
|
|||
rc = ConstructClientIds(client, stuff->numSpecs, specs, &ctx);
|
||||
|
||||
if (rc == Success) {
|
||||
xXResQueryClientIdsReply rep = {
|
||||
char *buf = calloc(1, ctx.resultBytes);
|
||||
if (!buf) {
|
||||
rc = BadAlloc;
|
||||
goto out;
|
||||
}
|
||||
char *walk = buf;
|
||||
|
||||
FragmentList *it;
|
||||
xorg_list_for_each_entry(it, &ctx.response, l) {
|
||||
memcpy(walk, FRAGMENT_DATA(it), it->bytes);
|
||||
walk += it->bytes;
|
||||
}
|
||||
|
||||
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);
|
||||
|
@ -603,9 +576,11 @@ ProcXResQueryClientIds (ClientPtr client)
|
|||
}
|
||||
|
||||
WriteToClient(client, sizeof(rep), &rep);
|
||||
WriteFragmentsToClient(client, &ctx.response);
|
||||
WriteToClient(client, ctx.resultBytes, buf);
|
||||
free(buf);
|
||||
}
|
||||
|
||||
out:
|
||||
DestroyConstructClientIdCtx(&ctx);
|
||||
|
||||
return rc;
|
||||
|
@ -952,11 +927,11 @@ static int
|
|||
ProcXResQueryResourceBytes (ClientPtr client)
|
||||
{
|
||||
REQUEST(xXResQueryResourceBytesReq);
|
||||
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
|
||||
|
||||
int rc;
|
||||
ConstructResourceBytesCtx ctx;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
|
||||
if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
|
||||
return BadLength;
|
||||
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
|
||||
|
@ -987,10 +962,24 @@ ProcXResQueryResourceBytes (ClientPtr client)
|
|||
SwapXResQueryResourceBytes(&ctx.response);
|
||||
}
|
||||
|
||||
char *buf = calloc(1, ctx.resultBytes);
|
||||
if (!buf) {
|
||||
rc = BadAlloc;
|
||||
goto out;
|
||||
}
|
||||
|
||||
char *walk = buf;
|
||||
FragmentList *it;
|
||||
xorg_list_for_each_entry(it, &ctx.response, l) {
|
||||
memcpy(walk, FRAGMENT_DATA(it), it->bytes);
|
||||
walk += it->bytes;
|
||||
}
|
||||
WriteToClient(client, sizeof(rep), &rep);
|
||||
WriteFragmentsToClient(client, &ctx.response);
|
||||
WriteToClient(client, ctx.resultBytes, buf);
|
||||
free(buf);
|
||||
}
|
||||
|
||||
out:
|
||||
DestroyConstructResourceBytesCtx(&ctx);
|
||||
|
||||
return rc;
|
||||
|
@ -1080,7 +1069,6 @@ static int _X_COLD
|
|||
SProcResDispatch (ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
swaps(&stuff->length);
|
||||
|
||||
switch (stuff->data) {
|
||||
case X_XResQueryVersion:
|
||||
|
|
|
@ -17,19 +17,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
********************************************************/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "dix/dix_priv.h"
|
||||
#include "dix/property_priv.h"
|
||||
#include "dix/selection_priv.h"
|
||||
#include "miext/extinit_priv.h"
|
||||
|
||||
#include "selection.h"
|
||||
#include "inputstr.h"
|
||||
#include "windowstr.h"
|
||||
#include "propertyst.h"
|
||||
#include "extnsionst.h"
|
||||
#include "extinit_priv.h"
|
||||
#include "xselinuxint.h"
|
||||
|
||||
#define CTX_DEV offsetof(SELinuxSubjectRec, dev_create_sid)
|
||||
|
@ -627,8 +625,6 @@ SProcSELinuxDispatch(ClientPtr client)
|
|||
{
|
||||
REQUEST(xReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
|
||||
switch (stuff->data) {
|
||||
case X_SELinuxQueryVersion:
|
||||
return SProcSELinuxQueryVersion(client);
|
||||
|
|
|
@ -22,9 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
* All rights reserved.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/socket.h>
|
||||
|
@ -35,15 +33,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include <X11/Xfuncproto.h>
|
||||
|
||||
#include "dix/registry_priv.h"
|
||||
#include "dix/selection_priv.h"
|
||||
#include "os/client_priv.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"
|
||||
#define _XSELINUX_NEED_FLASK_MAP
|
||||
#include "xselinuxint.h"
|
||||
|
||||
|
|
|
@ -17,9 +17,7 @@ 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>
|
||||
|
||||
|
|
32
Xext/xtest.c
32
Xext/xtest.c
|
@ -26,9 +26,7 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xproto.h>
|
||||
|
@ -40,6 +38,7 @@
|
|||
#include "dix/input_priv.h"
|
||||
#include "dix/dix_priv.h"
|
||||
#include "dix/exevents_priv.h"
|
||||
#include "miext/extinit_priv.h"
|
||||
#include "os/osdep.h"
|
||||
|
||||
#include "misc.h"
|
||||
|
@ -59,7 +58,8 @@
|
|||
#include "xserver-properties.h"
|
||||
#include "eventstr.h"
|
||||
#include "inpututils.h"
|
||||
#include "extinit_priv.h"
|
||||
|
||||
Bool noTestExtensions = FALSE;
|
||||
|
||||
/* XTest events are sent during request processing and may be interrupted by
|
||||
* a SIGIO. We need a separate event list to avoid events overwriting each
|
||||
|
@ -79,10 +79,10 @@ static InternalEvent *xtest_evlist;
|
|||
*/
|
||||
DeviceIntPtr xtestpointer, xtestkeyboard;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#endif
|
||||
#endif /* XINERAMA */
|
||||
|
||||
static int XTestSwapFakeInput(ClientPtr /* client */ ,
|
||||
xReq * /* req */
|
||||
|
@ -198,7 +198,7 @@ ProcXTestFakeInput(ClientPtr client)
|
|||
int flags = 0;
|
||||
int need_ptr_update = 1;
|
||||
|
||||
nev = (stuff->length << 2) - sizeof(xReq);
|
||||
nev = (client->req_len << 2) - sizeof(xReq);
|
||||
if ((nev % sizeof(xEvent)) || !nev)
|
||||
return BadLength;
|
||||
nev /= sizeof(xEvent);
|
||||
|
@ -374,7 +374,6 @@ ProcXTestFakeInput(ClientPtr client)
|
|||
/* 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--;
|
||||
|
@ -488,8 +487,6 @@ static int _X_COLD
|
|||
SProcXTestGetVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXTestGetVersionReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXTestGetVersionReq);
|
||||
swaps(&stuff->minorVersion);
|
||||
return ProcXTestGetVersion(client);
|
||||
|
@ -499,8 +496,6 @@ static int _X_COLD
|
|||
SProcXTestCompareCursor(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXTestCompareCursorReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXTestCompareCursorReq);
|
||||
swapl(&stuff->window);
|
||||
swapl(&stuff->cursor);
|
||||
|
@ -515,7 +510,7 @@ XTestSwapFakeInput(ClientPtr client, xReq * req)
|
|||
xEvent sev;
|
||||
EventSwapPtr proc;
|
||||
|
||||
nev = ((req->length << 2) - sizeof(xReq)) / sizeof(xEvent);
|
||||
nev = ((client->req_len << 2) - sizeof(xReq)) / sizeof(xEvent);
|
||||
for (ev = (xEvent *) &req[1]; --nev >= 0; ev++) {
|
||||
int evtype = ev->u.u.type & 0177;
|
||||
/* Swap event */
|
||||
|
@ -538,23 +533,12 @@ SProcXTestFakeInput(ClientPtr client)
|
|||
|
||||
REQUEST(xReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
n = XTestSwapFakeInput(client, stuff);
|
||||
if (n != Success)
|
||||
return n;
|
||||
return ProcXTestFakeInput(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcXTestGrabControl(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXTestGrabControlReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXTestGrabControlReq);
|
||||
return ProcXTestGrabControl(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcXTestDispatch(ClientPtr client)
|
||||
{
|
||||
|
@ -567,7 +551,7 @@ SProcXTestDispatch(ClientPtr client)
|
|||
case X_XTestFakeInput:
|
||||
return SProcXTestFakeInput(client);
|
||||
case X_XTestGrabControl:
|
||||
return SProcXTestGrabControl(client);
|
||||
return ProcXTestGrabControl(client);
|
||||
default:
|
||||
return BadRequest;
|
||||
}
|
||||
|
|
388
Xext/xvdisp.c
388
Xext/xvdisp.c
|
@ -21,9 +21,7 @@ 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>
|
||||
|
||||
|
@ -50,12 +48,12 @@ SOFTWARE.
|
|||
|
||||
#include "xvdisp.h"
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
|
||||
unsigned long XvXRTPort;
|
||||
#endif
|
||||
#endif /* XINERAMA */
|
||||
|
||||
static int
|
||||
SWriteQueryExtensionReply(ClientPtr client, xvQueryExtensionReply * rep)
|
||||
|
@ -323,7 +321,6 @@ ProcXvQueryAdaptors(ClientPtr client)
|
|||
{
|
||||
xvFormat format;
|
||||
xvAdaptorInfo ainfo;
|
||||
xvQueryAdaptorsReply rep;
|
||||
int totalSize, na, nf, rc;
|
||||
int nameSize;
|
||||
XvAdaptorPtr pa;
|
||||
|
@ -339,27 +336,20 @@ ProcXvQueryAdaptors(ClientPtr client)
|
|||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
xvQueryAdaptorsReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
};
|
||||
|
||||
pScreen = pWin->drawable.pScreen;
|
||||
pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
|
||||
XvGetScreenKey());
|
||||
if (!pxvs) {
|
||||
rep = (xvQueryAdaptorsReply) {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0,
|
||||
.num_adaptors = 0
|
||||
};
|
||||
|
||||
_WriteQueryAdaptorsReply(client, &rep);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
rep = (xvQueryAdaptorsReply) {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.num_adaptors = pxvs->nAdaptors
|
||||
};
|
||||
rep.num_adaptors = pxvs->nAdaptors;
|
||||
|
||||
/* CALCULATE THE TOTAL SIZE OF THE REPLY IN BYTES */
|
||||
|
||||
|
@ -413,7 +403,6 @@ static int
|
|||
ProcXvQueryEncodings(ClientPtr client)
|
||||
{
|
||||
xvEncodingInfo einfo;
|
||||
xvQueryEncodingsReply rep;
|
||||
int totalSize;
|
||||
int nameSize;
|
||||
XvPortPtr pPort;
|
||||
|
@ -425,12 +414,6 @@ ProcXvQueryEncodings(ClientPtr client)
|
|||
|
||||
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
|
||||
|
||||
rep = (xvQueryEncodingsReply) {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.num_encodings = pPort->pAdaptor->nEncodings
|
||||
};
|
||||
|
||||
/* FOR EACH ENCODING ADD UP THE BYTES FOR ENCODING NAMES */
|
||||
|
||||
ne = pPort->pAdaptor->nEncodings;
|
||||
|
@ -441,7 +424,12 @@ ProcXvQueryEncodings(ClientPtr client)
|
|||
pe++;
|
||||
}
|
||||
|
||||
rep.length = bytes_to_int32(totalSize);
|
||||
xvQueryEncodingsReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.num_encodings = pPort->pAdaptor->nEncodings,
|
||||
.length = bytes_to_int32(totalSize),
|
||||
};
|
||||
|
||||
_WriteQueryEncodingsReply(client, &rep);
|
||||
|
||||
|
@ -463,7 +451,7 @@ ProcXvQueryEncodings(ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
ProcXvPutVideo(ClientPtr client)
|
||||
SingleXvPutVideo(ClientPtr client)
|
||||
{
|
||||
DrawablePtr pDraw;
|
||||
XvPortPtr pPort;
|
||||
|
@ -492,8 +480,20 @@ ProcXvPutVideo(ClientPtr client)
|
|||
stuff->drw_w, stuff->drw_h);
|
||||
}
|
||||
|
||||
static int XineramaXvPutVideo(ClientPtr client);
|
||||
|
||||
static int
|
||||
ProcXvPutStill(ClientPtr client)
|
||||
ProcXvPutVideo(ClientPtr client)
|
||||
{
|
||||
#ifdef XINERAMA
|
||||
if (xvUseXinerama)
|
||||
return XineramaXvPutVideo(client);
|
||||
#endif
|
||||
return SingleXvPutVideo(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SingleXvPutStill(ClientPtr client)
|
||||
{
|
||||
DrawablePtr pDraw;
|
||||
XvPortPtr pPort;
|
||||
|
@ -522,6 +522,18 @@ ProcXvPutStill(ClientPtr client)
|
|||
stuff->drw_w, stuff->drw_h);
|
||||
}
|
||||
|
||||
static int XineramaXvPutStill(ClientPtr client);
|
||||
|
||||
static int
|
||||
ProcXvPutStill(ClientPtr client)
|
||||
{
|
||||
#ifdef XINERAMA
|
||||
if (xvUseXinerama)
|
||||
return XineramaXvPutStill(client);
|
||||
#endif
|
||||
return SingleXvPutStill(client);
|
||||
}
|
||||
|
||||
static int
|
||||
ProcXvGetVideo(ClientPtr client)
|
||||
{
|
||||
|
@ -617,7 +629,6 @@ ProcXvGrabPort(ClientPtr client)
|
|||
{
|
||||
int result, status;
|
||||
XvPortPtr pPort;
|
||||
xvGrabPortReply rep;
|
||||
|
||||
REQUEST(xvGrabPortReq);
|
||||
REQUEST_SIZE_MATCH(xvGrabPortReq);
|
||||
|
@ -629,10 +640,9 @@ ProcXvGrabPort(ClientPtr client)
|
|||
if (status != Success) {
|
||||
return status;
|
||||
}
|
||||
rep = (xvGrabPortReply) {
|
||||
xvGrabPortReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0,
|
||||
.result = result
|
||||
};
|
||||
|
||||
|
@ -655,7 +665,7 @@ ProcXvUngrabPort(ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
ProcXvStopVideo(ClientPtr client)
|
||||
SingleXvStopVideo(ClientPtr client)
|
||||
{
|
||||
int ret;
|
||||
DrawablePtr pDraw;
|
||||
|
@ -673,8 +683,20 @@ ProcXvStopVideo(ClientPtr client)
|
|||
return XvdiStopVideo(client, pPort, pDraw);
|
||||
}
|
||||
|
||||
static int XineramaXvStopVideo(ClientPtr client);
|
||||
|
||||
static int
|
||||
ProcXvSetPortAttribute(ClientPtr client)
|
||||
ProcXvStopVideo(ClientPtr client)
|
||||
{
|
||||
#ifdef XINERAMA
|
||||
if (xvUseXinerama)
|
||||
return XineramaXvStopVideo(client);
|
||||
#endif
|
||||
return SingleXvStopVideo(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SingleXvSetPortAttribute(ClientPtr client)
|
||||
{
|
||||
int status;
|
||||
XvPortPtr pPort;
|
||||
|
@ -700,13 +722,24 @@ ProcXvSetPortAttribute(ClientPtr client)
|
|||
return status;
|
||||
}
|
||||
|
||||
static int XineramaXvSetPortAttribute(ClientPtr client);
|
||||
|
||||
static int
|
||||
ProcXvSetPortAttribute(ClientPtr client)
|
||||
{
|
||||
#ifdef XINERAMA
|
||||
if (xvUseXinerama)
|
||||
return XineramaXvSetPortAttribute(client);
|
||||
#endif
|
||||
return SingleXvSetPortAttribute(client);
|
||||
}
|
||||
|
||||
static int
|
||||
ProcXvGetPortAttribute(ClientPtr client)
|
||||
{
|
||||
INT32 value;
|
||||
int status;
|
||||
XvPortPtr pPort;
|
||||
xvGetPortAttributeReply rep;
|
||||
|
||||
REQUEST(xvGetPortAttributeReq);
|
||||
REQUEST_SIZE_MATCH(xvGetPortAttributeReq);
|
||||
|
@ -724,10 +757,9 @@ ProcXvGetPortAttribute(ClientPtr client)
|
|||
return status;
|
||||
}
|
||||
|
||||
rep = (xvGetPortAttributeReply) {
|
||||
xvGetPortAttributeReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0,
|
||||
.value = value
|
||||
};
|
||||
|
||||
|
@ -741,7 +773,6 @@ ProcXvQueryBestSize(ClientPtr client)
|
|||
{
|
||||
unsigned int actual_width, actual_height;
|
||||
XvPortPtr pPort;
|
||||
xvQueryBestSizeReply rep;
|
||||
|
||||
REQUEST(xvQueryBestSizeReq);
|
||||
REQUEST_SIZE_MATCH(xvQueryBestSizeReq);
|
||||
|
@ -753,10 +784,9 @@ ProcXvQueryBestSize(ClientPtr client)
|
|||
stuff->drw_w, stuff->drw_h,
|
||||
&actual_width, &actual_height);
|
||||
|
||||
rep = (xvQueryBestSizeReply) {
|
||||
xvQueryBestSizeReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0,
|
||||
.actual_width = actual_width,
|
||||
.actual_height = actual_height
|
||||
};
|
||||
|
@ -772,7 +802,6 @@ ProcXvQueryPortAttributes(ClientPtr client)
|
|||
int size, i;
|
||||
XvPortPtr pPort;
|
||||
XvAttributePtr pAtt;
|
||||
xvQueryPortAttributesReply rep;
|
||||
xvAttributeInfo Info;
|
||||
|
||||
REQUEST(xvQueryPortAttributesReq);
|
||||
|
@ -780,11 +809,10 @@ ProcXvQueryPortAttributes(ClientPtr client)
|
|||
|
||||
VALIDATE_XV_PORT(stuff->port, pPort, DixGetAttrAccess);
|
||||
|
||||
rep = (xvQueryPortAttributesReply) {
|
||||
xvQueryPortAttributesReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.num_attributes = pPort->pAdaptor->nAttributes,
|
||||
.text_size = 0
|
||||
};
|
||||
|
||||
for (i = 0, pAtt = pPort->pAdaptor->pAttributes;
|
||||
|
@ -815,7 +843,7 @@ ProcXvQueryPortAttributes(ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
ProcXvPutImage(ClientPtr client)
|
||||
SingleXvPutImage(ClientPtr client)
|
||||
{
|
||||
DrawablePtr pDraw;
|
||||
XvPortPtr pPort;
|
||||
|
@ -871,10 +899,23 @@ ProcXvPutImage(ClientPtr client)
|
|||
stuff->width, stuff->height);
|
||||
}
|
||||
|
||||
static int
|
||||
XineramaXvPutImage(ClientPtr client);
|
||||
|
||||
static int
|
||||
ProcXvPutImage(ClientPtr client)
|
||||
{
|
||||
#ifdef XINERAMA
|
||||
if (xvUseXinerama)
|
||||
return XineramaXvPutImage(client);
|
||||
#endif
|
||||
return SingleXvPutImage(client);
|
||||
}
|
||||
|
||||
#ifdef MITSHM
|
||||
|
||||
static int
|
||||
ProcXvShmPutImage(ClientPtr client)
|
||||
SingleXvShmPutImage(ClientPtr client)
|
||||
{
|
||||
ShmDescPtr shmdesc;
|
||||
DrawablePtr pDraw;
|
||||
|
@ -947,13 +988,24 @@ ProcXvShmPutImage(ClientPtr client)
|
|||
|
||||
return status;
|
||||
}
|
||||
#else /* !MITSHM */
|
||||
|
||||
static int XineramaXvShmPutImage(ClientPtr client);
|
||||
|
||||
#endif /* MITSHM */
|
||||
|
||||
static int
|
||||
ProcXvShmPutImage(ClientPtr client)
|
||||
{
|
||||
return BadImplementation;
|
||||
}
|
||||
#ifdef MITSHM
|
||||
#ifdef XINERAMA
|
||||
if (xvUseXinerama)
|
||||
return XineramaXvShmPutImage(client);
|
||||
#endif
|
||||
return SingleXvShmPutImage(client);
|
||||
#else
|
||||
return BadImplementation;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef XvMCExtension
|
||||
#include "xvmcext.h"
|
||||
|
@ -1031,7 +1083,6 @@ ProcXvListImageFormats(ClientPtr client)
|
|||
XvPortPtr pPort;
|
||||
XvImagePtr pImage;
|
||||
int i;
|
||||
xvListImageFormatsReply rep;
|
||||
xvImageFormatInfo info;
|
||||
|
||||
REQUEST(xvListImageFormatsReq);
|
||||
|
@ -1040,7 +1091,7 @@ ProcXvListImageFormats(ClientPtr client)
|
|||
|
||||
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
|
||||
|
||||
rep = (xvListImageFormatsReply) {
|
||||
xvListImageFormatsReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.num_formats = pPort->pAdaptor->nImages,
|
||||
|
@ -1081,26 +1132,6 @@ ProcXvListImageFormats(ClientPtr client)
|
|||
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)
|
||||
{
|
||||
|
@ -1108,32 +1139,61 @@ ProcXvDispatch(ClientPtr client)
|
|||
|
||||
UpdateCurrentTime();
|
||||
|
||||
if (stuff->data >= xvNumRequests) {
|
||||
return BadRequest;
|
||||
switch (stuff->data) {
|
||||
case xv_QueryExtension:
|
||||
return ProcXvQueryExtension(client);
|
||||
case xv_QueryAdaptors:
|
||||
return ProcXvQueryAdaptors(client);
|
||||
case xv_QueryEncodings:
|
||||
return ProcXvQueryEncodings(client);
|
||||
case xv_GrabPort:
|
||||
return ProcXvGrabPort(client);
|
||||
case xv_UngrabPort:
|
||||
return ProcXvUngrabPort(client);
|
||||
case xv_PutVideo:
|
||||
return ProcXvPutVideo(client);
|
||||
case xv_PutStill:
|
||||
return ProcXvPutStill(client);
|
||||
case xv_GetVideo:
|
||||
return ProcXvGetVideo(client);
|
||||
case xv_GetStill:
|
||||
return ProcXvGetStill(client);
|
||||
case xv_StopVideo:
|
||||
return ProcXvStopVideo(client);
|
||||
case xv_SelectVideoNotify:
|
||||
return ProcXvSelectVideoNotify(client);
|
||||
case xv_SelectPortNotify:
|
||||
return ProcXvSelectPortNotify(client);
|
||||
case xv_QueryBestSize:
|
||||
return ProcXvQueryBestSize(client);
|
||||
case xv_SetPortAttribute:
|
||||
return ProcXvSetPortAttribute(client);
|
||||
case xv_GetPortAttribute:
|
||||
return ProcXvGetPortAttribute(client);
|
||||
case xv_QueryPortAttributes:
|
||||
return ProcXvQueryPortAttributes(client);
|
||||
case xv_ListImageFormats:
|
||||
return ProcXvListImageFormats(client);
|
||||
case xv_QueryImageAttributes:
|
||||
return ProcXvQueryImageAttributes(client);
|
||||
case xv_PutImage:
|
||||
return ProcXvPutImage(client);
|
||||
case xv_ShmPutImage:
|
||||
return ProcXvShmPutImage(client);
|
||||
default:
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
return XvProcVector[stuff->data] (client);
|
||||
}
|
||||
|
||||
/* Swapped Procs */
|
||||
|
||||
static int _X_COLD
|
||||
SProcXvQueryExtension(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvQueryExtensionReq);
|
||||
REQUEST_SIZE_MATCH(xvQueryExtensionReq);
|
||||
swaps(&stuff->length);
|
||||
return XvProcVector[xv_QueryExtension] (client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcXvQueryAdaptors(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvQueryAdaptorsReq);
|
||||
REQUEST_SIZE_MATCH(xvQueryAdaptorsReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->window);
|
||||
return XvProcVector[xv_QueryAdaptors] (client);
|
||||
return ProcXvQueryAdaptors(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
|
@ -1141,9 +1201,8 @@ SProcXvQueryEncodings(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvQueryEncodingsReq);
|
||||
REQUEST_SIZE_MATCH(xvQueryEncodingsReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
return XvProcVector[xv_QueryEncodings] (client);
|
||||
return ProcXvQueryEncodings(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
|
@ -1151,10 +1210,9 @@ SProcXvGrabPort(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvGrabPortReq);
|
||||
REQUEST_SIZE_MATCH(xvGrabPortReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->time);
|
||||
return XvProcVector[xv_GrabPort] (client);
|
||||
return ProcXvGrabPort(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
|
@ -1162,10 +1220,9 @@ SProcXvUngrabPort(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvUngrabPortReq);
|
||||
REQUEST_SIZE_MATCH(xvUngrabPortReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->time);
|
||||
return XvProcVector[xv_UngrabPort] (client);
|
||||
return ProcXvUngrabPort(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
|
@ -1173,7 +1230,6 @@ SProcXvPutVideo(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvPutVideoReq);
|
||||
REQUEST_SIZE_MATCH(xvPutVideoReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->drawable);
|
||||
swapl(&stuff->gc);
|
||||
|
@ -1185,7 +1241,7 @@ SProcXvPutVideo(ClientPtr client)
|
|||
swaps(&stuff->drw_y);
|
||||
swaps(&stuff->drw_w);
|
||||
swaps(&stuff->drw_h);
|
||||
return XvProcVector[xv_PutVideo] (client);
|
||||
return ProcXvPutVideo(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
|
@ -1193,7 +1249,6 @@ SProcXvPutStill(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvPutStillReq);
|
||||
REQUEST_SIZE_MATCH(xvPutStillReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->drawable);
|
||||
swapl(&stuff->gc);
|
||||
|
@ -1205,7 +1260,7 @@ SProcXvPutStill(ClientPtr client)
|
|||
swaps(&stuff->drw_y);
|
||||
swaps(&stuff->drw_w);
|
||||
swaps(&stuff->drw_h);
|
||||
return XvProcVector[xv_PutStill] (client);
|
||||
return ProcXvPutStill(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
|
@ -1213,7 +1268,6 @@ SProcXvGetVideo(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvGetVideoReq);
|
||||
REQUEST_SIZE_MATCH(xvGetVideoReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->drawable);
|
||||
swapl(&stuff->gc);
|
||||
|
@ -1225,7 +1279,7 @@ SProcXvGetVideo(ClientPtr client)
|
|||
swaps(&stuff->drw_y);
|
||||
swaps(&stuff->drw_w);
|
||||
swaps(&stuff->drw_h);
|
||||
return XvProcVector[xv_GetVideo] (client);
|
||||
return ProcXvGetVideo(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
|
@ -1233,7 +1287,6 @@ SProcXvGetStill(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvGetStillReq);
|
||||
REQUEST_SIZE_MATCH(xvGetStillReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->drawable);
|
||||
swapl(&stuff->gc);
|
||||
|
@ -1245,7 +1298,7 @@ SProcXvGetStill(ClientPtr client)
|
|||
swaps(&stuff->drw_y);
|
||||
swaps(&stuff->drw_w);
|
||||
swaps(&stuff->drw_h);
|
||||
return XvProcVector[xv_GetStill] (client);
|
||||
return ProcXvGetStill(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
|
@ -1253,7 +1306,6 @@ SProcXvPutImage(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvPutImageReq);
|
||||
REQUEST_AT_LEAST_SIZE(xvPutImageReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->drawable);
|
||||
swapl(&stuff->gc);
|
||||
|
@ -1268,7 +1320,7 @@ SProcXvPutImage(ClientPtr client)
|
|||
swaps(&stuff->drw_h);
|
||||
swaps(&stuff->width);
|
||||
swaps(&stuff->height);
|
||||
return XvProcVector[xv_PutImage] (client);
|
||||
return ProcXvPutImage(client);
|
||||
}
|
||||
|
||||
#ifdef MITSHM
|
||||
|
@ -1277,7 +1329,6 @@ SProcXvShmPutImage(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvShmPutImageReq);
|
||||
REQUEST_SIZE_MATCH(xvShmPutImageReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->drawable);
|
||||
swapl(&stuff->gc);
|
||||
|
@ -1294,7 +1345,7 @@ SProcXvShmPutImage(ClientPtr client)
|
|||
swaps(&stuff->drw_h);
|
||||
swaps(&stuff->width);
|
||||
swaps(&stuff->height);
|
||||
return XvProcVector[xv_ShmPutImage] (client);
|
||||
return ProcXvShmPutImage(client);
|
||||
}
|
||||
#else /* MITSHM */
|
||||
#define SProcXvShmPutImage ProcXvShmPutImage
|
||||
|
@ -1305,9 +1356,8 @@ SProcXvSelectVideoNotify(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvSelectVideoNotifyReq);
|
||||
REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->drawable);
|
||||
return XvProcVector[xv_SelectVideoNotify] (client);
|
||||
return ProcXvSelectVideoNotify(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
|
@ -1315,9 +1365,8 @@ SProcXvSelectPortNotify(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvSelectPortNotifyReq);
|
||||
REQUEST_SIZE_MATCH(xvSelectPortNotifyReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
return XvProcVector[xv_SelectPortNotify] (client);
|
||||
return ProcXvSelectPortNotify(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
|
@ -1325,10 +1374,9 @@ SProcXvStopVideo(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvStopVideoReq);
|
||||
REQUEST_SIZE_MATCH(xvStopVideoReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->drawable);
|
||||
return XvProcVector[xv_StopVideo] (client);
|
||||
return ProcXvStopVideo(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
|
@ -1336,11 +1384,10 @@ SProcXvSetPortAttribute(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvSetPortAttributeReq);
|
||||
REQUEST_SIZE_MATCH(xvSetPortAttributeReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->attribute);
|
||||
swapl(&stuff->value);
|
||||
return XvProcVector[xv_SetPortAttribute] (client);
|
||||
return ProcXvSetPortAttribute(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
|
@ -1348,10 +1395,9 @@ SProcXvGetPortAttribute(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvGetPortAttributeReq);
|
||||
REQUEST_SIZE_MATCH(xvGetPortAttributeReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->attribute);
|
||||
return XvProcVector[xv_GetPortAttribute] (client);
|
||||
return ProcXvGetPortAttribute(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
|
@ -1359,13 +1405,12 @@ SProcXvQueryBestSize(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvQueryBestSizeReq);
|
||||
REQUEST_SIZE_MATCH(xvQueryBestSizeReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swaps(&stuff->vid_w);
|
||||
swaps(&stuff->vid_h);
|
||||
swaps(&stuff->drw_w);
|
||||
swaps(&stuff->drw_h);
|
||||
return XvProcVector[xv_QueryBestSize] (client);
|
||||
return ProcXvQueryBestSize(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
|
@ -1373,9 +1418,8 @@ SProcXvQueryPortAttributes(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvQueryPortAttributesReq);
|
||||
REQUEST_SIZE_MATCH(xvQueryPortAttributesReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
return XvProcVector[xv_QueryPortAttributes] (client);
|
||||
return ProcXvQueryPortAttributes(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
|
@ -1383,12 +1427,11 @@ SProcXvQueryImageAttributes(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvQueryImageAttributesReq);
|
||||
REQUEST_SIZE_MATCH(xvQueryImageAttributesReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->id);
|
||||
swaps(&stuff->width);
|
||||
swaps(&stuff->height);
|
||||
return XvProcVector[xv_QueryImageAttributes] (client);
|
||||
return ProcXvQueryImageAttributes(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
|
@ -1396,31 +1439,10 @@ SProcXvListImageFormats(ClientPtr client)
|
|||
{
|
||||
REQUEST(xvListImageFormatsReq);
|
||||
REQUEST_SIZE_MATCH(xvListImageFormatsReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
return XvProcVector[xv_ListImageFormats] (client);
|
||||
return ProcXvListImageFormats(client);
|
||||
}
|
||||
|
||||
static int (*SXvProcVector[xvNumRequests]) (ClientPtr) = {
|
||||
SProcXvQueryExtension,
|
||||
SProcXvQueryAdaptors,
|
||||
SProcXvQueryEncodings,
|
||||
SProcXvGrabPort,
|
||||
SProcXvUngrabPort,
|
||||
SProcXvPutVideo,
|
||||
SProcXvPutStill,
|
||||
SProcXvGetVideo,
|
||||
SProcXvGetStill,
|
||||
SProcXvStopVideo,
|
||||
SProcXvSelectVideoNotify,
|
||||
SProcXvSelectPortNotify,
|
||||
SProcXvQueryBestSize,
|
||||
SProcXvSetPortAttribute,
|
||||
SProcXvGetPortAttribute,
|
||||
SProcXvQueryPortAttributes,
|
||||
SProcXvListImageFormats,
|
||||
SProcXvQueryImageAttributes, SProcXvPutImage, SProcXvShmPutImage,};
|
||||
|
||||
int _X_COLD
|
||||
SProcXvDispatch(ClientPtr client)
|
||||
{
|
||||
|
@ -1428,14 +1450,53 @@ SProcXvDispatch(ClientPtr client)
|
|||
|
||||
UpdateCurrentTime();
|
||||
|
||||
if (stuff->data >= xvNumRequests) {
|
||||
return BadRequest;
|
||||
switch (stuff->data) {
|
||||
case xv_QueryExtension:
|
||||
return ProcXvQueryExtension(client);
|
||||
case xv_QueryAdaptors:
|
||||
return SProcXvQueryAdaptors(client);
|
||||
case xv_QueryEncodings:
|
||||
return SProcXvQueryEncodings(client);
|
||||
case xv_GrabPort:
|
||||
return SProcXvGrabPort(client);
|
||||
case xv_UngrabPort:
|
||||
return SProcXvUngrabPort(client);
|
||||
case xv_PutVideo:
|
||||
return SProcXvPutVideo(client);
|
||||
case xv_PutStill:
|
||||
return SProcXvPutStill(client);
|
||||
case xv_GetVideo:
|
||||
return SProcXvGetVideo(client);
|
||||
case xv_GetStill:
|
||||
return SProcXvGetStill(client);
|
||||
case xv_StopVideo:
|
||||
return SProcXvStopVideo(client);
|
||||
case xv_SelectVideoNotify:
|
||||
return SProcXvSelectVideoNotify(client);
|
||||
case xv_SelectPortNotify:
|
||||
return SProcXvSelectPortNotify(client);
|
||||
case xv_QueryBestSize:
|
||||
return SProcXvQueryBestSize(client);
|
||||
case xv_SetPortAttribute:
|
||||
return SProcXvSetPortAttribute(client);
|
||||
case xv_GetPortAttribute:
|
||||
return SProcXvGetPortAttribute(client);
|
||||
case xv_QueryPortAttributes:
|
||||
return SProcXvQueryPortAttributes(client);
|
||||
case xv_ListImageFormats:
|
||||
return SProcXvListImageFormats(client);
|
||||
case xv_QueryImageAttributes:
|
||||
return SProcXvQueryImageAttributes(client);
|
||||
case xv_PutImage:
|
||||
return SProcXvPutImage(client);
|
||||
case xv_ShmPutImage:
|
||||
return SProcXvShmPutImage(client);
|
||||
default:
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
return SXvProcVector[stuff->data] (client);
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
static int
|
||||
XineramaXvStopVideo(ClientPtr client)
|
||||
{
|
||||
|
@ -1459,7 +1520,7 @@ XineramaXvStopVideo(ClientPtr client)
|
|||
if (port->info[i].id) {
|
||||
stuff->drawable = draw->info[i].id;
|
||||
stuff->port = port->info[i].id;
|
||||
result = ProcXvStopVideo(client);
|
||||
result = SingleXvStopVideo(client);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1483,7 +1544,7 @@ XineramaXvSetPortAttribute(ClientPtr client)
|
|||
FOR_NSCREENS_BACKWARD(i) {
|
||||
if (port->info[i].id) {
|
||||
stuff->port = port->info[i].id;
|
||||
result = ProcXvSetPortAttribute(client);
|
||||
result = SingleXvSetPortAttribute(client);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -1536,14 +1597,14 @@ XineramaXvShmPutImage(ClientPtr client)
|
|||
}
|
||||
stuff->send_event = (send_event && !i) ? 1 : 0;
|
||||
|
||||
result = ProcXvShmPutImage(client);
|
||||
result = SingleXvShmPutImage(client);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#else
|
||||
#define XineramaXvShmPutImage ProcXvShmPutImage
|
||||
#endif
|
||||
#endif /* MITSHM */
|
||||
|
||||
static int
|
||||
XineramaXvPutImage(ClientPtr client)
|
||||
|
@ -1587,7 +1648,7 @@ XineramaXvPutImage(ClientPtr client)
|
|||
stuff->drw_y -= screenInfo.screens[i]->y;
|
||||
}
|
||||
|
||||
result = ProcXvPutImage(client);
|
||||
result = SingleXvPutImage(client);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -1635,7 +1696,7 @@ XineramaXvPutVideo(ClientPtr client)
|
|||
stuff->drw_y -= screenInfo.screens[i]->y;
|
||||
}
|
||||
|
||||
result = ProcXvPutVideo(client);
|
||||
result = SingleXvPutVideo(client);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -1683,7 +1744,7 @@ XineramaXvPutStill(ClientPtr client)
|
|||
stuff->drw_y -= screenInfo.screens[i]->y;
|
||||
}
|
||||
|
||||
result = ProcXvPutStill(client);
|
||||
result = SingleXvPutStill(client);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -1790,25 +1851,6 @@ XineramifyXv(void)
|
|||
}
|
||||
}
|
||||
|
||||
/* 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
|
||||
xvUseXinerama = 1;
|
||||
}
|
||||
#endif /* XINERAMA */
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
extern void XineramifyXv(void);
|
||||
extern void XvResetProcVector(void);
|
||||
extern int xvUseXinerama;
|
||||
|
|
|
@ -169,6 +169,15 @@ typedef struct _XvPortRec {
|
|||
DevUnion devPriv;
|
||||
} XvPortRec, *XvPortPtr;
|
||||
|
||||
typedef struct {
|
||||
int version, revision;
|
||||
int nAdaptors;
|
||||
XvAdaptorPtr pAdaptors;
|
||||
DestroyWindowProcPtr DestroyWindow;
|
||||
DestroyPixmapProcPtr DestroyPixmap;
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
} XvScreenRec, *XvScreenPtr;
|
||||
|
||||
extern _X_EXPORT int XvScreenInit(ScreenPtr);
|
||||
extern _X_EXPORT DevPrivateKey XvGetScreenKey(void);
|
||||
extern _X_EXPORT unsigned long XvGetRTPort(void);
|
||||
|
|
|
@ -22,15 +22,6 @@
|
|||
|
||||
#define _XvBadPort (XvBadPort+XvErrorBase)
|
||||
|
||||
typedef struct {
|
||||
int version, revision;
|
||||
int nAdaptors;
|
||||
XvAdaptorPtr pAdaptors;
|
||||
DestroyWindowProcPtr DestroyWindow;
|
||||
DestroyPixmapProcPtr DestroyPixmap;
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
} XvScreenRec, *XvScreenPtr;
|
||||
|
||||
typedef struct _XvPortNotifyRec {
|
||||
struct _XvPortNotifyRec *next;
|
||||
ClientPtr client;
|
||||
|
@ -88,4 +79,6 @@ int XvdiMatchPort(XvPortPtr pPort, DrawablePtr pDraw);
|
|||
int XvdiGrabPort(ClientPtr client, XvPortPtr pPort, Time ctime, int *p_result);
|
||||
int XvdiUngrabPort(ClientPtr client, XvPortPtr pPort, Time ctime);
|
||||
|
||||
XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id);
|
||||
|
||||
#endif /* _XORG_XVDIX_PRIV_H */
|
||||
|
|
|
@ -73,9 +73,7 @@ SOFTWARE.
|
|||
**
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <X11/X.h>
|
||||
|
@ -83,6 +81,7 @@ SOFTWARE.
|
|||
#include <X11/extensions/Xv.h>
|
||||
#include <X11/extensions/Xvproto.h>
|
||||
|
||||
#include "miext/extinit_priv.h"
|
||||
#include "Xext/xvdix_priv.h"
|
||||
|
||||
#include "misc.h"
|
||||
|
@ -92,16 +91,15 @@ SOFTWARE.
|
|||
#include "pixmapstr.h"
|
||||
#include "gcstruct.h"
|
||||
#include "extnsionst.h"
|
||||
#include "extinit_priv.h"
|
||||
#include "dixstruct.h"
|
||||
#include "resource.h"
|
||||
#include "opaque.h"
|
||||
#include "input.h"
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#endif
|
||||
#endif /* XINERAMA */
|
||||
#include "xvdisp.h"
|
||||
|
||||
#define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = ((XvScreenPtr) \
|
||||
|
@ -130,6 +128,8 @@ int XvReqCode;
|
|||
static int XvEventBase;
|
||||
int XvErrorBase;
|
||||
|
||||
int xvUseXinerama = 0;
|
||||
|
||||
RESTYPE XvRTPort;
|
||||
static RESTYPE XvRTEncoding;
|
||||
static RESTYPE XvRTGrab;
|
||||
|
@ -176,9 +176,9 @@ XvExtensionInit(void)
|
|||
ErrorF("XvExtensionInit: Unable to allocate resource types\n");
|
||||
return;
|
||||
}
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
XineramaRegisterConnectionBlockCallback(XineramifyXv);
|
||||
#endif
|
||||
#endif /* XINERAMA */
|
||||
XvScreenGeneration = serverGeneration;
|
||||
}
|
||||
|
||||
|
@ -269,9 +269,9 @@ XvScreenInit(ScreenPtr pScreen)
|
|||
ErrorF("XvScreenInit: Unable to allocate resource types\n");
|
||||
return BadAlloc;
|
||||
}
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
XineramaRegisterConnectionBlockCallback(XineramifyXv);
|
||||
#endif
|
||||
#endif /* XINERAMA */
|
||||
XvScreenGeneration = serverGeneration;
|
||||
}
|
||||
|
||||
|
@ -325,7 +325,7 @@ XvCloseScreen(ScreenPtr pScreen)
|
|||
static void
|
||||
XvResetProc(ExtensionEntry * extEntry)
|
||||
{
|
||||
XvResetProcVector();
|
||||
xvUseXinerama = 0;
|
||||
}
|
||||
|
||||
DevPrivateKey
|
||||
|
|
18
Xext/xvmc.c
18
Xext/xvmc.c
|
@ -1,12 +1,15 @@
|
|||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/XvMC.h>
|
||||
#include <X11/extensions/Xvproto.h>
|
||||
#include <X11/extensions/XvMCproto.h>
|
||||
|
||||
#include "miext/extinit_priv.h"
|
||||
#include "Xext/xvdix_priv.h"
|
||||
|
||||
#include "misc.h"
|
||||
|
@ -15,14 +18,8 @@
|
|||
#include "resource.h"
|
||||
#include "scrnintstr.h"
|
||||
#include "extnsionst.h"
|
||||
#include "extinit_priv.h"
|
||||
#include "servermd.h"
|
||||
#include <X11/Xfuncproto.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>
|
||||
|
@ -30,6 +27,9 @@
|
|||
#include <sys/shm.h>
|
||||
#endif /* HAS_XVMCSHM */
|
||||
|
||||
#define SERVER_XVMC_MAJOR_VERSION 1
|
||||
#define SERVER_XVMC_MINOR_VERSION 1
|
||||
|
||||
#define DR_CLIENT_DRIVER_NAME_SIZE 48
|
||||
#define DR_BUSID_SIZE 48
|
||||
|
||||
|
@ -45,8 +45,6 @@ static RESTYPE XvMCRTContext;
|
|||
static RESTYPE XvMCRTSurface;
|
||||
static RESTYPE XvMCRTSubpicture;
|
||||
|
||||
int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr) = NULL;
|
||||
|
||||
typedef struct {
|
||||
int num_adaptors;
|
||||
XvMCAdaptorPtr adaptors;
|
||||
|
|
|
@ -84,13 +84,9 @@ typedef struct {
|
|||
XvMCDestroySubpictureProcPtr DestroySubpicture;
|
||||
} XvMCAdaptorRec, *XvMCAdaptorPtr;
|
||||
|
||||
extern int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr);
|
||||
|
||||
extern _X_EXPORT int XvMCScreenInit(ScreenPtr pScreen,
|
||||
int num, XvMCAdaptorPtr adapt);
|
||||
|
||||
extern _X_EXPORT XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id);
|
||||
|
||||
extern _X_EXPORT int xf86XvMCRegisterDRInfo(ScreenPtr pScreen, const char *name,
|
||||
const char *busID, int major, int minor,
|
||||
int patchLevel);
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include <X11/extensions/XI.h>
|
||||
|
@ -74,7 +72,6 @@ int _X_COLD
|
|||
SProcXAllowDeviceEvents(ClientPtr client)
|
||||
{
|
||||
REQUEST(xAllowDeviceEventsReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
|
||||
swapl(&stuff->time);
|
||||
return (ProcXAllowDeviceEvents(client));
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h> /* control constants */
|
||||
|
@ -78,7 +76,6 @@ SProcXChangeDeviceControl(ClientPtr client)
|
|||
xDeviceCtl *ctl;
|
||||
|
||||
REQUEST(xChangeDeviceControlReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl));
|
||||
swaps(&stuff->control);
|
||||
ctl = (xDeviceCtl *) &stuff[1];
|
||||
|
@ -118,7 +115,7 @@ ProcXChangeDeviceControl(ClientPtr client)
|
|||
REQUEST(xChangeDeviceControlReq);
|
||||
REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl));
|
||||
|
||||
len = stuff->length - bytes_to_int32(sizeof(xChangeDeviceControlReq));
|
||||
len = client->req_len - bytes_to_int32(sizeof(xChangeDeviceControlReq));
|
||||
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
|
||||
if (ret != Success)
|
||||
goto out;
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include <X11/extensions/XI.h>
|
||||
|
@ -75,7 +73,6 @@ int _X_COLD
|
|||
SProcXChangeFeedbackControl(ClientPtr client)
|
||||
{
|
||||
REQUEST(xChangeFeedbackControlReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq);
|
||||
swapl(&stuff->mask);
|
||||
return (ProcXChangeFeedbackControl(client));
|
||||
|
@ -438,7 +435,7 @@ ProcXChangeFeedbackControl(ClientPtr client)
|
|||
REQUEST(xChangeFeedbackControlReq);
|
||||
REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq);
|
||||
|
||||
len = stuff->length - bytes_to_int32(sizeof(xChangeFeedbackControlReq));
|
||||
len = client->req_len - bytes_to_int32(sizeof(xChangeFeedbackControlReq));
|
||||
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
|
19
Xi/chgkbd.c
19
Xi/chgkbd.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include <X11/extensions/XI.h>
|
||||
|
@ -71,23 +69,6 @@ SOFTWARE.
|
|||
* This procedure changes the keyboard device.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXChangeKeyboardDevice(ClientPtr client)
|
||||
{
|
||||
REQUEST(xChangeKeyboardDeviceReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq);
|
||||
return (ProcXChangeKeyboardDevice(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure is invoked to swap the request bytes if the server and
|
||||
* client have a different byte order.
|
||||
*
|
||||
*/
|
||||
|
||||
int
|
||||
ProcXChangeKeyboardDevice(ClientPtr client)
|
||||
{
|
||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifndef CHGKBD_H
|
||||
#define CHGKBD_H 1
|
||||
|
||||
int SProcXChangeKeyboardDevice(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ProcXChangeKeyboardDevice(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
@ -77,7 +75,6 @@ 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));
|
||||
|
@ -108,7 +105,7 @@ ProcXChangeDeviceKeyMapping(ClientPtr client)
|
|||
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
|
||||
if (ret != Success)
|
||||
return ret;
|
||||
len = stuff->length - bytes_to_int32(sizeof(xChangeDeviceKeyMappingReq));
|
||||
len = client->req_len - bytes_to_int32(sizeof(xChangeDeviceKeyMappingReq));
|
||||
|
||||
ret = ChangeKeyMapping(client, dev, len, DeviceMappingNotify,
|
||||
stuff->firstKeyCode, stuff->keyCodes,
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
@ -77,7 +75,6 @@ int _X_COLD
|
|||
SProcXChangeDeviceDontPropagateList(ClientPtr client)
|
||||
{
|
||||
REQUEST(xChangeDeviceDontPropagateListReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
|
||||
swapl(&stuff->window);
|
||||
swaps(&stuff->count);
|
||||
|
@ -104,7 +101,7 @@ ProcXChangeDeviceDontPropagateList(ClientPtr client)
|
|||
REQUEST(xChangeDeviceDontPropagateListReq);
|
||||
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
|
||||
|
||||
if (stuff->length !=
|
||||
if (client->req_len !=
|
||||
bytes_to_int32(sizeof(xChangeDeviceDontPropagateListReq)) +
|
||||
stuff->count)
|
||||
return BadLength;
|
||||
|
|
18
Xi/chgptr.c
18
Xi/chgptr.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include <X11/extensions/XI.h>
|
||||
|
@ -67,22 +65,6 @@ SOFTWARE.
|
|||
|
||||
#include "chgptr.h"
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure is invoked to swap the request bytes if the server and
|
||||
* client have a different byte order.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXChangePointerDevice(ClientPtr client)
|
||||
{
|
||||
REQUEST(xChangePointerDeviceReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xChangePointerDeviceReq);
|
||||
return (ProcXChangePointerDevice(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure changes the device used as the X pointer.
|
||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifndef CHGPTR_H
|
||||
#define CHGPTR_H 1
|
||||
|
||||
int SProcXChangePointerDevice(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ProcXChangePointerDevice(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include "windowstr.h" /* window structure */
|
||||
|
@ -64,21 +62,6 @@ SOFTWARE.
|
|||
|
||||
#include "closedev.h"
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure closes an input device.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXCloseDevice(ClientPtr client)
|
||||
{
|
||||
REQUEST(xCloseDeviceReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xCloseDeviceReq);
|
||||
return (ProcXCloseDevice(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Clear out event selections and passive grabs from a window for the
|
||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifndef CLOSEDEV_H
|
||||
#define CLOSEDEV_H 1
|
||||
|
||||
int SProcXCloseDevice(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ProcXCloseDevice(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
17
Xi/devbell.c
17
Xi/devbell.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include <X11/extensions/XI.h>
|
||||
|
@ -61,21 +59,6 @@ SOFTWARE.
|
|||
|
||||
#include "devbell.h"
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure is invoked to swap the request bytes if the server and
|
||||
* client have a different byte order.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXDeviceBell(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDeviceBellReq);
|
||||
swaps(&stuff->length);
|
||||
return (ProcXDeviceBell(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure rings a bell on an extension device.
|
||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifndef DEVBELL_H
|
||||
#define DEVBELL_H 1
|
||||
|
||||
int SProcXDeviceBell(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ProcXDeviceBell(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
|
@ -78,9 +78,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "dix/cursor_priv.h"
|
||||
|
||||
|
@ -93,9 +91,11 @@ SOFTWARE.
|
|||
#include <X11/extensions/XKBproto.h>
|
||||
|
||||
#include "dix/dix_priv.h"
|
||||
#include "dix/dixgrabs_priv.h"
|
||||
#include "dix/eventconvert.h"
|
||||
#include "dix/exevents_priv.h"
|
||||
#include "dix/input_priv.h"
|
||||
#include "os/log_priv.h"
|
||||
|
||||
#include "inputstr.h"
|
||||
#include "windowstr.h"
|
||||
|
@ -105,7 +105,6 @@ SOFTWARE.
|
|||
#include "exglobals.h"
|
||||
#include "eventstr.h"
|
||||
#include "dixevents.h" /* DeliverFocusedEvent */
|
||||
#include "dixgrabs.h" /* CreateGrab() */
|
||||
#include "scrnintstr.h"
|
||||
#include "listdev.h" /* for CopySwapXXXClass */
|
||||
#include "xace.h"
|
||||
|
|
42
Xi/extinit.c
42
Xi/extinit.c
|
@ -51,9 +51,7 @@ SOFTWARE.
|
|||
*/
|
||||
#define NUMTYPES 15
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
@ -62,13 +60,13 @@ SOFTWARE.
|
|||
|
||||
#include "dix/dix_priv.h"
|
||||
#include "dix/exevents_priv.h"
|
||||
#include "miext/extinit_priv.h"
|
||||
|
||||
#include "inputstr.h"
|
||||
#include "gcstruct.h" /* pointer for extnsionst.h */
|
||||
#include "extnsionst.h" /* extension entry */
|
||||
#include "geext.h" /* extension interfaces for ge */
|
||||
#include "dixevents.h"
|
||||
#include "extinit_priv.h"
|
||||
#include "exglobals.h"
|
||||
#include "swaprep.h"
|
||||
#include "privates.h"
|
||||
|
@ -254,19 +252,19 @@ static int (*ProcIVector[]) (ClientPtr) = {
|
|||
|
||||
/* For swapped clients */
|
||||
static int (*SProcIVector[]) (ClientPtr) = {
|
||||
NULL, /* 0 */
|
||||
NULL, /* 0 */
|
||||
SProcXGetExtensionVersion, /* 1 */
|
||||
SProcXListInputDevices, /* 2 */
|
||||
SProcXOpenDevice, /* 3 */
|
||||
SProcXCloseDevice, /* 4 */
|
||||
SProcXSetDeviceMode, /* 5 */
|
||||
ProcXListInputDevices, /* 2 */
|
||||
ProcXOpenDevice, /* 3 */
|
||||
ProcXCloseDevice, /* 4 */
|
||||
ProcXSetDeviceMode, /* 5 */
|
||||
SProcXSelectExtensionEvent, /* 6 */
|
||||
SProcXGetSelectedExtensionEvents, /* 7 */
|
||||
SProcXChangeDeviceDontPropagateList, /* 8 */
|
||||
SProcXGetDeviceDontPropagateList, /* 9 */
|
||||
SProcXGetDeviceMotionEvents, /* 10 */
|
||||
SProcXChangeKeyboardDevice, /* 11 */
|
||||
SProcXChangePointerDevice, /* 12 */
|
||||
ProcXChangeKeyboardDevice, /* 11 */
|
||||
ProcXChangePointerDevice, /* 12 */
|
||||
SProcXGrabDevice, /* 13 */
|
||||
SProcXUngrabDevice, /* 14 */
|
||||
SProcXGrabDeviceKey, /* 15 */
|
||||
|
@ -274,30 +272,30 @@ static int (*SProcIVector[]) (ClientPtr) = {
|
|||
SProcXGrabDeviceButton, /* 17 */
|
||||
SProcXUngrabDeviceButton, /* 18 */
|
||||
SProcXAllowDeviceEvents, /* 19 */
|
||||
SProcXGetDeviceFocus, /* 20 */
|
||||
ProcXGetDeviceFocus, /* 20 */
|
||||
SProcXSetDeviceFocus, /* 21 */
|
||||
SProcXGetFeedbackControl, /* 22 */
|
||||
ProcXGetFeedbackControl, /* 22 */
|
||||
SProcXChangeFeedbackControl, /* 23 */
|
||||
SProcXGetDeviceKeyMapping, /* 24 */
|
||||
ProcXGetDeviceKeyMapping, /* 24 */
|
||||
SProcXChangeDeviceKeyMapping, /* 25 */
|
||||
SProcXGetDeviceModifierMapping, /* 26 */
|
||||
SProcXSetDeviceModifierMapping, /* 27 */
|
||||
SProcXGetDeviceButtonMapping, /* 28 */
|
||||
SProcXSetDeviceButtonMapping, /* 29 */
|
||||
SProcXQueryDeviceState, /* 30 */
|
||||
ProcXGetDeviceModifierMapping, /* 26 */
|
||||
ProcXSetDeviceModifierMapping, /* 27 */
|
||||
ProcXGetDeviceButtonMapping, /* 28 */
|
||||
ProcXSetDeviceButtonMapping, /* 29 */
|
||||
ProcXQueryDeviceState, /* 30 */
|
||||
SProcXSendExtensionEvent, /* 31 */
|
||||
SProcXDeviceBell, /* 32 */
|
||||
SProcXSetDeviceValuators, /* 33 */
|
||||
ProcXDeviceBell, /* 32 */
|
||||
ProcXSetDeviceValuators, /* 33 */
|
||||
SProcXGetDeviceControl, /* 34 */
|
||||
SProcXChangeDeviceControl, /* 35 */
|
||||
SProcXListDeviceProperties, /* 36 */
|
||||
ProcXListDeviceProperties, /* 36 */
|
||||
SProcXChangeDeviceProperty, /* 37 */
|
||||
SProcXDeleteDeviceProperty, /* 38 */
|
||||
SProcXGetDeviceProperty, /* 39 */
|
||||
SProcXIQueryPointer, /* 40 */
|
||||
SProcXIWarpPointer, /* 41 */
|
||||
SProcXIChangeCursor, /* 42 */
|
||||
SProcXIChangeHierarchy, /* 43 */
|
||||
ProcXIChangeHierarchy, /* 43 */
|
||||
SProcXISetClientPointer, /* 44 */
|
||||
SProcXIGetClientPointer, /* 45 */
|
||||
SProcXISelectEvents, /* 46 */
|
||||
|
|
16
Xi/getbmap.c
16
Xi/getbmap.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include <X11/extensions/XI.h>
|
||||
|
@ -61,20 +59,6 @@ SOFTWARE.
|
|||
|
||||
#include "getbmap.h"
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure gets the button mapping for the specified device.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXGetDeviceButtonMapping(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGetDeviceButtonMappingReq);
|
||||
swaps(&stuff->length);
|
||||
return (ProcXGetDeviceButtonMapping(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure gets the button mapping for the specified device.
|
||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifndef GETBMAP_H
|
||||
#define GETBMAP_H 1
|
||||
|
||||
int SProcXGetDeviceButtonMapping(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ProcXGetDeviceButtonMapping(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include <X11/extensions/XI.h>
|
||||
|
@ -72,7 +70,6 @@ int _X_COLD
|
|||
SProcXGetDeviceControl(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGetDeviceControlReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xGetDeviceControlReq);
|
||||
swaps(&stuff->control);
|
||||
return (ProcXGetDeviceControl(client));
|
||||
|
|
17
Xi/getfctl.c
17
Xi/getfctl.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include <X11/extensions/XI.h>
|
||||
|
@ -61,21 +59,6 @@ SOFTWARE.
|
|||
|
||||
#include "getfctl.h"
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure gets the control attributes for an extension device,
|
||||
* for clients on machines with a different byte ordering than the server.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXGetFeedbackControl(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGetFeedbackControlReq);
|
||||
swaps(&stuff->length);
|
||||
return (ProcXGetFeedbackControl(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies KbdFeedbackClass data, swapping if necessary.
|
||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifndef GETFCTL_H
|
||||
#define GETFCTL_H 1
|
||||
|
||||
int SProcXGetFeedbackControl(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ProcXGetFeedbackControl(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "windowstr.h" /* focus struct */
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
|
@ -62,20 +60,6 @@ SOFTWARE.
|
|||
|
||||
#include "getfocus.h"
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure gets the focus for a device.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXGetDeviceFocus(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGetDeviceFocusReq);
|
||||
swaps(&stuff->length);
|
||||
return (ProcXGetDeviceFocus(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure gets the focus for a device.
|
||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifndef GETFOCUS_H
|
||||
#define GETFOCUS_H 1
|
||||
|
||||
int SProcXGetDeviceFocus(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ProcXGetDeviceFocus(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
17
Xi/getkmap.c
17
Xi/getkmap.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include <X11/extensions/XI.h>
|
||||
|
@ -64,21 +62,6 @@ SOFTWARE.
|
|||
|
||||
#include "getkmap.h"
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure gets the key mapping for an extension device,
|
||||
* for clients on machines with a different byte ordering than the server.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXGetDeviceKeyMapping(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGetDeviceKeyMappingReq);
|
||||
swaps(&stuff->length);
|
||||
return (ProcXGetDeviceKeyMapping(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Get the device key mapping.
|
||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifndef GETKMAP_H
|
||||
#define GETKMAP_H 1
|
||||
|
||||
int SProcXGetDeviceKeyMapping(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ProcXGetDeviceKeyMapping(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
17
Xi/getmmap.c
17
Xi/getmmap.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include <X11/extensions/XI.h>
|
||||
|
@ -61,21 +59,6 @@ SOFTWARE.
|
|||
|
||||
#include "getmmap.h"
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure gets the modifier mapping for an extension device,
|
||||
* for clients on machines with a different byte ordering than the server.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXGetDeviceModifierMapping(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGetDeviceModifierMappingReq);
|
||||
swaps(&stuff->length);
|
||||
return (ProcXGetDeviceModifierMapping(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Get the device Modifier mapping.
|
||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifndef GETMMAP_H
|
||||
#define GETMMAP_H 1
|
||||
|
||||
int SProcXGetDeviceModifierMapping(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ProcXGetDeviceModifierMapping(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
@ -78,7 +76,6 @@ int _X_COLD
|
|||
SProcXGetDeviceDontPropagateList(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGetDeviceDontPropagateListReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq);
|
||||
swapl(&stuff->window);
|
||||
return (ProcXGetDeviceDontPropagateList(client));
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
@ -76,7 +74,6 @@ int _X_COLD
|
|||
SProcXGetSelectedExtensionEvents(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGetSelectedExtensionEventsReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xGetSelectedExtensionEventsReq);
|
||||
swapl(&stuff->window);
|
||||
return (ProcXGetSelectedExtensionEvents(client));
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include <X11/extensions/XI.h>
|
||||
|
@ -74,7 +72,6 @@ int _X_COLD
|
|||
SProcXGetExtensionVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGetExtensionVersionReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
|
||||
swaps(&stuff->nbytes);
|
||||
return (ProcXGetExtensionVersion(client));
|
||||
|
@ -94,7 +91,7 @@ ProcXGetExtensionVersion(ClientPtr client)
|
|||
REQUEST(xGetExtensionVersionReq);
|
||||
REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
|
||||
|
||||
if (stuff->length != bytes_to_int32(sizeof(xGetExtensionVersionReq) +
|
||||
if (client->req_len != bytes_to_int32(sizeof(xGetExtensionVersionReq) +
|
||||
stuff->nbytes))
|
||||
return BadLength;
|
||||
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
@ -78,13 +76,13 @@ int _X_COLD
|
|||
SProcXGrabDevice(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGrabDeviceReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
|
||||
|
||||
swapl(&stuff->grabWindow);
|
||||
swapl(&stuff->time);
|
||||
swaps(&stuff->event_count);
|
||||
|
||||
if (stuff->length !=
|
||||
if (client->req_len !=
|
||||
bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count)
|
||||
return BadLength;
|
||||
|
||||
|
@ -111,7 +109,7 @@ ProcXGrabDevice(ClientPtr client)
|
|||
REQUEST(xGrabDeviceReq);
|
||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
|
||||
|
||||
if (stuff->length !=
|
||||
if (client->req_len !=
|
||||
bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count)
|
||||
return BadLength;
|
||||
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
@ -76,7 +74,6 @@ int _X_COLD
|
|||
SProcXGrabDeviceButton(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGrabDeviceButtonReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
|
||||
swapl(&stuff->grabWindow);
|
||||
swaps(&stuff->modifiers);
|
||||
|
@ -108,7 +105,7 @@ ProcXGrabDeviceButton(ClientPtr client)
|
|||
REQUEST(xGrabDeviceButtonReq);
|
||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
|
||||
|
||||
if (stuff->length !=
|
||||
if (client->req_len !=
|
||||
bytes_to_int32(sizeof(xGrabDeviceButtonReq)) + stuff->event_count)
|
||||
return BadLength;
|
||||
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
@ -76,7 +74,6 @@ int _X_COLD
|
|||
SProcXGrabDeviceKey(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGrabDeviceKeyReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
|
||||
swapl(&stuff->grabWindow);
|
||||
swaps(&stuff->modifiers);
|
||||
|
@ -106,7 +103,7 @@ ProcXGrabDeviceKey(ClientPtr client)
|
|||
REQUEST(xGrabDeviceKeyReq);
|
||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
|
||||
|
||||
if (stuff->length !=
|
||||
if (client->req_len !=
|
||||
bytes_to_int32(sizeof(xGrabDeviceKeyReq)) + stuff->event_count)
|
||||
return BadLength;
|
||||
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
@ -73,7 +71,6 @@ int _X_COLD
|
|||
SProcXGetDeviceMotionEvents(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGetDeviceMotionEventsReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq);
|
||||
swapl(&stuff->start);
|
||||
swapl(&stuff->stop);
|
||||
|
|
16
Xi/listdev.c
16
Xi/listdev.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/X.h> /* for inputstr.h */
|
||||
#include <X11/Xproto.h> /* Request macro */
|
||||
|
@ -70,20 +68,6 @@ SOFTWARE.
|
|||
#include "xkbstr.h"
|
||||
#include "listdev.h"
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure lists the input devices available to the server.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXListInputDevices(ClientPtr client)
|
||||
{
|
||||
REQUEST(xListInputDevicesReq);
|
||||
swaps(&stuff->length);
|
||||
return (ProcXListInputDevices(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure calculates the size of the information to be returned
|
||||
|
|
|
@ -32,9 +32,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
#define VPC 20 /* Max # valuators per chunk */
|
||||
|
||||
int SProcXListInputDevices(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ProcXListInputDevices(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
17
Xi/opendev.c
17
Xi/opendev.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include <X11/extensions/XI.h>
|
||||
|
@ -66,21 +64,6 @@ SOFTWARE.
|
|||
|
||||
extern CARD8 event_base[];
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure swaps the request if the server and client have different
|
||||
* byte orderings.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXOpenDevice(ClientPtr client)
|
||||
{
|
||||
REQUEST(xOpenDeviceReq);
|
||||
swaps(&stuff->length);
|
||||
return (ProcXOpenDevice(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure causes the server to open an input device.
|
||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifndef OPENDEV_H
|
||||
#define OPENDEV_H 1
|
||||
|
||||
int SProcXOpenDevice(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ProcXOpenDevice(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
16
Xi/queryst.c
16
Xi/queryst.c
|
@ -32,9 +32,7 @@ from The Open Group.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
@ -49,20 +47,6 @@ from The Open Group.
|
|||
#include "xkbstr.h"
|
||||
#include "queryst.h"
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure allows a client to query the state of a device.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXQueryDeviceState(ClientPtr client)
|
||||
{
|
||||
REQUEST(xQueryDeviceStateReq);
|
||||
swaps(&stuff->length);
|
||||
return (ProcXQueryDeviceState(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure allows frozen events to be routed.
|
||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifndef QUERYST_H
|
||||
#define QUERYST_H 1
|
||||
|
||||
int SProcXQueryDeviceState(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ProcXQueryDeviceState(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XI2.h>
|
||||
|
@ -123,7 +121,6 @@ int _X_COLD
|
|||
SProcXSelectExtensionEvent(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSelectExtensionEventReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq);
|
||||
swapl(&stuff->window);
|
||||
swaps(&stuff->count);
|
||||
|
@ -150,7 +147,7 @@ ProcXSelectExtensionEvent(ClientPtr client)
|
|||
REQUEST(xSelectExtensionEventReq);
|
||||
REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq);
|
||||
|
||||
if (stuff->length !=
|
||||
if (client->req_len !=
|
||||
bytes_to_int32(sizeof(xSelectExtensionEventReq)) + stuff->count)
|
||||
return BadLength;
|
||||
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
@ -84,12 +82,11 @@ SProcXSendExtensionEvent(ClientPtr client)
|
|||
EventSwapPtr proc;
|
||||
|
||||
REQUEST(xSendExtensionEventReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq);
|
||||
swapl(&stuff->destination);
|
||||
swaps(&stuff->count);
|
||||
|
||||
if (stuff->length !=
|
||||
if (client->req_len !=
|
||||
bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count +
|
||||
bytes_to_int32(stuff->num_events * sizeof(xEvent)))
|
||||
return BadLength;
|
||||
|
@ -135,7 +132,7 @@ ProcXSendExtensionEvent(ClientPtr client)
|
|||
REQUEST(xSendExtensionEventReq);
|
||||
REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq);
|
||||
|
||||
if (stuff->length !=
|
||||
if (client->req_len !=
|
||||
bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count +
|
||||
(stuff->num_events * bytes_to_int32(sizeof(xEvent))))
|
||||
return BadLength;
|
||||
|
|
18
Xi/setbmap.c
18
Xi/setbmap.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
@ -64,20 +62,6 @@ SOFTWARE.
|
|||
#include "exglobals.h"
|
||||
#include "setbmap.h"
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure changes the button mapping.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXSetDeviceButtonMapping(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSetDeviceButtonMappingReq);
|
||||
swaps(&stuff->length);
|
||||
return (ProcXSetDeviceButtonMapping(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure lists the input devices available to the server.
|
||||
|
@ -94,7 +78,7 @@ ProcXSetDeviceButtonMapping(ClientPtr client)
|
|||
REQUEST(xSetDeviceButtonMappingReq);
|
||||
REQUEST_AT_LEAST_SIZE(xSetDeviceButtonMappingReq);
|
||||
|
||||
if (stuff->length !=
|
||||
if (client->req_len !=
|
||||
bytes_to_int32(sizeof(xSetDeviceButtonMappingReq) + stuff->map_length))
|
||||
return BadLength;
|
||||
|
||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifndef SETBMAP_H
|
||||
#define SETBMAP_H 1
|
||||
|
||||
int SProcXSetDeviceButtonMapping(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ProcXSetDeviceButtonMapping(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
18
Xi/setdval.c
18
Xi/setdval.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
@ -64,20 +62,6 @@ SOFTWARE.
|
|||
#include "exglobals.h"
|
||||
#include "setdval.h"
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Handle a request from a client with a different byte order.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXSetDeviceValuators(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSetDeviceValuatorsReq);
|
||||
swaps(&stuff->length);
|
||||
return (ProcXSetDeviceValuators(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure sets the value of valuators on an extension input device.
|
||||
|
@ -102,7 +86,7 @@ ProcXSetDeviceValuators(ClientPtr client)
|
|||
.status = Success
|
||||
};
|
||||
|
||||
if (stuff->length != bytes_to_int32(sizeof(xSetDeviceValuatorsReq)) +
|
||||
if (client->req_len != bytes_to_int32(sizeof(xSetDeviceValuatorsReq)) +
|
||||
stuff->num_valuators)
|
||||
return BadLength;
|
||||
|
||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifndef SETDVAL_H
|
||||
#define SETDVAL_H 1
|
||||
|
||||
int SProcXSetDeviceValuators(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ProcXSetDeviceValuators(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
@ -76,7 +74,6 @@ int _X_COLD
|
|||
SProcXSetDeviceFocus(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSetDeviceFocusReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xSetDeviceFocusReq);
|
||||
swapl(&stuff->focus);
|
||||
swapl(&stuff->time);
|
||||
|
|
19
Xi/setmmap.c
19
Xi/setmmap.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XI2.h>
|
||||
|
@ -65,21 +63,6 @@ SOFTWARE.
|
|||
#include "exglobals.h"
|
||||
#include "setmmap.h"
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure sets the modifier mapping for an extension device,
|
||||
* for clients on machines with a different byte ordering than the server.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXSetDeviceModifierMapping(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSetDeviceModifierMappingReq);
|
||||
swaps(&stuff->length);
|
||||
return (ProcXSetDeviceModifierMapping(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Set the device Modifier mapping.
|
||||
|
@ -96,7 +79,7 @@ ProcXSetDeviceModifierMapping(ClientPtr client)
|
|||
REQUEST(xSetDeviceModifierMappingReq);
|
||||
REQUEST_AT_LEAST_SIZE(xSetDeviceModifierMappingReq);
|
||||
|
||||
if (stuff->length != bytes_to_int32(sizeof(xSetDeviceModifierMappingReq)) +
|
||||
if (client->req_len != bytes_to_int32(sizeof(xSetDeviceModifierMappingReq)) +
|
||||
(stuff->numKeyPerModifier << 1))
|
||||
return BadLength;
|
||||
|
||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifndef SETMMAP_H
|
||||
#define SETMMAP_H 1
|
||||
|
||||
int SProcXSetDeviceModifierMapping(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ProcXSetDeviceModifierMapping(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
16
Xi/setmode.c
16
Xi/setmode.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
@ -64,20 +62,6 @@ SOFTWARE.
|
|||
#include "exglobals.h"
|
||||
#include "setmode.h"
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Handle a request from a client with a different byte order.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXSetDeviceMode(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSetDeviceModeReq);
|
||||
swaps(&stuff->length);
|
||||
return (ProcXSetDeviceMode(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure sets the mode of a device.
|
||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifndef SETMODE_H
|
||||
#define SETMODE_H 1
|
||||
|
||||
int SProcXSetDeviceMode(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ProcXSetDeviceMode(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
|
@ -54,9 +54,7 @@ SOFTWARE.
|
|||
* Xnest could do the same thing.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xproto.h>
|
||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include "windowstr.h" /* window structure */
|
||||
|
@ -71,7 +69,6 @@ int _X_COLD
|
|||
SProcXUngrabDevice(ClientPtr client)
|
||||
{
|
||||
REQUEST(xUngrabDeviceReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xUngrabDeviceReq);
|
||||
swapl(&stuff->time);
|
||||
return (ProcXUngrabDevice(client));
|
||||
|
|
|
@ -50,19 +50,17 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
||||
#include "dix/dix_priv.h"
|
||||
#include "dix/dixgrabs_priv.h"
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include "windowstr.h" /* window structure */
|
||||
#include "exglobals.h"
|
||||
#include "dixgrabs.h"
|
||||
#include "ungrdevb.h"
|
||||
|
||||
#define AllModifiersMask ( \
|
||||
|
@ -79,7 +77,6 @@ int _X_COLD
|
|||
SProcXUngrabDeviceButton(ClientPtr client)
|
||||
{
|
||||
REQUEST(xUngrabDeviceButtonReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
|
||||
swapl(&stuff->grabWindow);
|
||||
swaps(&stuff->modifiers);
|
||||
|
|
|
@ -50,19 +50,17 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
||||
#include "dix/dix_priv.h"
|
||||
#include "dix/dixgrabs_priv.h"
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include "windowstr.h" /* window structure */
|
||||
#include "exglobals.h"
|
||||
#include "dixgrabs.h"
|
||||
#include "xkbsrv.h"
|
||||
#include "xkbstr.h"
|
||||
#include "ungrdevk.h"
|
||||
|
@ -81,7 +79,6 @@ int _X_COLD
|
|||
SProcXUngrabDeviceKey(ClientPtr client)
|
||||
{
|
||||
REQUEST(xUngrabDeviceKeyReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq);
|
||||
swapl(&stuff->grabWindow);
|
||||
swaps(&stuff->modifiers);
|
||||
|
|
|
@ -29,9 +29,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI2.h>
|
||||
#include <X11/extensions/XI2proto.h>
|
||||
|
@ -53,10 +51,9 @@ SProcXIAllowEvents(ClientPtr client)
|
|||
REQUEST(xXIAllowEventsReq);
|
||||
REQUEST_AT_LEAST_SIZE(xXIAllowEventsReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
swapl(&stuff->time);
|
||||
if (stuff->length > 3) {
|
||||
if (client->req_len > 3) {
|
||||
xXI2_2AllowEventsReq *req_xi22 = (xXI2_2AllowEventsReq *) stuff;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xXI2_2AllowEventsReq);
|
||||
|
|
|
@ -41,9 +41,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "dix/cursor_priv.h"
|
||||
#include "dix/dix_priv.h"
|
||||
|
@ -844,7 +842,6 @@ SProcXIBarrierReleasePointer(ClientPtr client)
|
|||
REQUEST(xXIBarrierReleasePointerReq);
|
||||
int i;
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq);
|
||||
|
||||
swapl(&stuff->num_barriers);
|
||||
|
|
|
@ -29,9 +29,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/X.h> /* for inputstr.h */
|
||||
#include <X11/Xproto.h> /* Request macro */
|
||||
|
@ -61,7 +59,6 @@ SProcXIChangeCursor(ClientPtr client)
|
|||
{
|
||||
REQUEST(xXIChangeCursorReq);
|
||||
REQUEST_SIZE_MATCH(xXIChangeCursorReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->win);
|
||||
swapl(&stuff->cursor);
|
||||
swaps(&stuff->deviceid);
|
||||
|
|
|
@ -30,9 +30,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/X.h> /* for inputstr.h */
|
||||
#include <X11/Xproto.h> /* Request macro */
|
||||
|
@ -130,14 +128,6 @@ XISendDeviceHierarchyEvent(int flags[MAXDEVICES])
|
|||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXIChangeHierarchy(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXIChangeHierarchyReq);
|
||||
swaps(&stuff->length);
|
||||
return (ProcXIChangeHierarchy(client));
|
||||
}
|
||||
|
||||
static int
|
||||
add_master(ClientPtr client, xXIAddMasterInfo * c, int flags[MAXDEVICES])
|
||||
{
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#ifndef CHDEVHIER_H
|
||||
#define CHDEVHIER_H 1
|
||||
|
||||
int SProcXIChangeHierarchy(ClientPtr /* client */ );
|
||||
int ProcXIChangeHierarchy(ClientPtr /* client */ );
|
||||
|
||||
void XISendDeviceHierarchyEvent(int flags[MAXDEVICES]);
|
||||
|
|
|
@ -23,9 +23,7 @@
|
|||
* 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 */
|
||||
|
@ -38,7 +36,6 @@
|
|||
#include "windowstr.h" /* window structure */
|
||||
#include "scrnintstr.h" /* screen structure */
|
||||
#include "extnsionst.h"
|
||||
#include "extinit.h" /* LookupDeviceIntRec */
|
||||
#include "exevents.h"
|
||||
#include "exglobals.h"
|
||||
#include "xigetclientpointer.h"
|
||||
|
@ -54,7 +51,6 @@ SProcXIGetClientPointer(ClientPtr client)
|
|||
REQUEST(xXIGetClientPointerReq);
|
||||
REQUEST_SIZE_MATCH(xXIGetClientPointerReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->win);
|
||||
return ProcXIGetClientPointer(client);
|
||||
}
|
||||
|
|
|
@ -29,9 +29,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI2.h>
|
||||
#include <X11/extensions/XI2proto.h>
|
||||
|
@ -55,7 +53,6 @@ SProcXIGrabDevice(ClientPtr client)
|
|||
*/
|
||||
REQUEST_AT_LEAST_SIZE(xXIGrabDeviceReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
swapl(&stuff->grab_window);
|
||||
swapl(&stuff->cursor);
|
||||
|
@ -140,7 +137,6 @@ SProcXIUngrabDevice(ClientPtr client)
|
|||
REQUEST(xXIUngrabDeviceReq);
|
||||
REQUEST_SIZE_MATCH(xXIUngrabDeviceReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
swapl(&stuff->time);
|
||||
|
||||
|
|
|
@ -29,14 +29,13 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XI2.h>
|
||||
#include <X11/extensions/XI2proto.h>
|
||||
|
||||
#include "dix/dix_priv.h"
|
||||
#include "dix/dixgrabs_priv.h"
|
||||
#include "dix/exevents_priv.h"
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
|
@ -44,7 +43,6 @@
|
|||
#include "swaprep.h"
|
||||
#include "exglobals.h" /* BadDevice */
|
||||
#include "xipassivegrab.h"
|
||||
#include "dixgrabs.h"
|
||||
#include "misc.h"
|
||||
#include "inpututils.h"
|
||||
|
||||
|
@ -57,7 +55,6 @@ SProcXIPassiveGrabDevice(ClientPtr client)
|
|||
REQUEST(xXIPassiveGrabDeviceReq);
|
||||
REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
swapl(&stuff->grab_window);
|
||||
swapl(&stuff->cursor);
|
||||
|
@ -282,7 +279,6 @@ SProcXIPassiveUngrabDevice(ClientPtr client)
|
|||
REQUEST(xXIPassiveUngrabDeviceReq);
|
||||
REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->grab_window);
|
||||
swaps(&stuff->deviceid);
|
||||
swapl(&stuff->detail);
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
|
||||
/* This code is a modified version of randr/rrproperty.c */
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/extensions/XI.h>
|
||||
|
@ -1015,23 +1013,12 @@ ProcXGetDeviceProperty(ClientPtr client)
|
|||
return Success;
|
||||
}
|
||||
|
||||
int _X_COLD
|
||||
SProcXListDeviceProperties(ClientPtr client)
|
||||
{
|
||||
REQUEST(xListDevicePropertiesReq);
|
||||
REQUEST_SIZE_MATCH(xListDevicePropertiesReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
return (ProcXListDeviceProperties(client));
|
||||
}
|
||||
|
||||
int _X_COLD
|
||||
SProcXChangeDeviceProperty(ClientPtr client)
|
||||
{
|
||||
REQUEST(xChangeDevicePropertyReq);
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->property);
|
||||
swapl(&stuff->type);
|
||||
swapl(&stuff->nUnits);
|
||||
|
@ -1044,7 +1031,6 @@ SProcXDeleteDeviceProperty(ClientPtr client)
|
|||
REQUEST(xDeleteDevicePropertyReq);
|
||||
REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->property);
|
||||
return (ProcXDeleteDeviceProperty(client));
|
||||
}
|
||||
|
@ -1055,7 +1041,6 @@ SProcXGetDeviceProperty(ClientPtr client)
|
|||
REQUEST(xGetDevicePropertyReq);
|
||||
REQUEST_SIZE_MATCH(xGetDevicePropertyReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->property);
|
||||
swapl(&stuff->type);
|
||||
swapl(&stuff->longOffset);
|
||||
|
@ -1263,7 +1248,6 @@ SProcXIListProperties(ClientPtr client)
|
|||
REQUEST(xXIListPropertiesReq);
|
||||
REQUEST_SIZE_MATCH(xXIListPropertiesReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
return (ProcXIListProperties(client));
|
||||
}
|
||||
|
@ -1274,7 +1258,6 @@ SProcXIChangeProperty(ClientPtr client)
|
|||
REQUEST(xXIChangePropertyReq);
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq);
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
swapl(&stuff->property);
|
||||
swapl(&stuff->type);
|
||||
|
@ -1288,7 +1271,6 @@ SProcXIDeleteProperty(ClientPtr client)
|
|||
REQUEST(xXIDeletePropertyReq);
|
||||
REQUEST_SIZE_MATCH(xXIDeletePropertyReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
swapl(&stuff->property);
|
||||
return (ProcXIDeleteProperty(client));
|
||||
|
@ -1300,7 +1282,6 @@ SProcXIGetProperty(ClientPtr client)
|
|||
REQUEST(xXIGetPropertyReq);
|
||||
REQUEST_SIZE_MATCH(xXIGetPropertyReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
swapl(&stuff->property);
|
||||
swapl(&stuff->type);
|
||||
|
|
|
@ -36,7 +36,6 @@ 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);
|
||||
|
|
|
@ -28,9 +28,7 @@
|
|||
* @file Protocol handling for the XIQueryDevice request/reply.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
@ -60,7 +58,6 @@ SProcXIQueryDevice(ClientPtr client)
|
|||
REQUEST(xXIQueryDeviceReq);
|
||||
REQUEST_SIZE_MATCH(xXIQueryDeviceReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
|
||||
return ProcXIQueryDevice(client);
|
||||
|
|
|
@ -29,9 +29,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/X.h> /* for inputstr.h */
|
||||
#include <X11/Xproto.h> /* Request macro */
|
||||
|
@ -50,9 +48,9 @@
|
|||
#include "scrnintstr.h"
|
||||
#include "xkbsrv.h"
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
#include "panoramiXsrv.h"
|
||||
#endif
|
||||
#endif /* XINERAMA */
|
||||
|
||||
#include "inpututils.h"
|
||||
#include "xiquerypointer.h"
|
||||
|
@ -69,7 +67,6 @@ SProcXIQueryPointer(ClientPtr client)
|
|||
REQUEST(xXIQueryPointerReq);
|
||||
REQUEST_SIZE_MATCH(xXIQueryPointerReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
swapl(&stuff->win);
|
||||
return (ProcXIQueryPointer(client));
|
||||
|
@ -186,7 +183,7 @@ ProcXIQueryPointer(ClientPtr client)
|
|||
rep.win_y = 0;
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
if (!noPanoramiXExtension) {
|
||||
rep.root_x += double_to_fp1616(screenInfo.screens[0]->x);
|
||||
rep.root_y += double_to_fp1616(screenInfo.screens[0]->y);
|
||||
|
@ -195,7 +192,7 @@ ProcXIQueryPointer(ClientPtr client)
|
|||
rep.win_y += double_to_fp1616(screenInfo.screens[0]->y);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif /* XINERAMA */
|
||||
|
||||
WriteReplyToClient(client, sizeof(xXIQueryPointerReply), &rep);
|
||||
if (buttons)
|
||||
|
|
|
@ -29,9 +29,7 @@
|
|||
* Protocol handling for the XIQueryVersion request/reply.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "inputstr.h"
|
||||
|
||||
|
@ -135,7 +133,6 @@ int _X_COLD
|
|||
SProcXIQueryVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXIQueryVersionReq);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xXIQueryVersionReq);
|
||||
swaps(&stuff->major_version);
|
||||
swaps(&stuff->minor_version);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue