Compare commits
422 Commits
master
...
wip/screen
Author | SHA1 | Date | |
---|---|---|---|
|
4cbbd0df9a | ||
|
7a7c21d351 | ||
|
97d0a3e661 | ||
|
cf94c18279 | ||
|
134a6d0df7 | ||
|
6232ce72f8 | ||
|
9b14c36094 | ||
|
92aefe59e8 | ||
|
30055f11d5 | ||
|
992efa7dab | ||
|
c412f3c32f | ||
|
dece9dd896 | ||
|
e76bf69e5e | ||
|
b23091f99c | ||
|
979dfaf30a | ||
|
fc92a13326 | ||
|
af6adeec97 | ||
|
4ccfafe9eb | ||
|
31742b4f9d | ||
|
36bd9b85b4 | ||
|
7f15518528 | ||
|
c6277392f1 | ||
|
022b504b14 | ||
|
993526582f | ||
|
1443d74f73 | ||
|
795ce1ed2b | ||
|
71186bb546 | ||
|
dc37180bed | ||
|
e367d9adc1 | ||
|
263bb37c2c | ||
|
2649cf825b | ||
|
ed65224ffa | ||
|
c5473d9ff6 | ||
|
f49c66318f | ||
|
fa73cebe8d | ||
|
a1b8f2d8d7 | ||
|
119b5251a8 | ||
|
0c5082d34f | ||
|
b96491d3d6 | ||
|
bafce29ba5 | ||
|
04a0d6bca0 | ||
|
0769399234 | ||
|
85a6e08ea0 | ||
|
571ba4df1f | ||
|
704dc1a610 | ||
|
c5baa87d81 | ||
|
611be98709 | ||
|
03a2cebc02 | ||
|
a792aa063a | ||
|
edf7fd0d4b | ||
|
35ec98dd42 | ||
|
8076ab751d | ||
|
3b9c6f699e | ||
|
296bbbe009 | ||
|
41f8104ed8 | ||
|
b4ded31d94 | ||
|
e1d210521c | ||
|
e2ca5adc7c | ||
|
8de8ab6fe2 | ||
|
5bc9eb2ceb | ||
|
2fadf3eb39 | ||
|
eb0841e1eb | ||
|
b49f92d868 | ||
|
71fa3ae283 | ||
|
acd02498f3 | ||
|
702477af76 | ||
|
9104842708 | ||
|
0840b5df9b | ||
|
83285e6c10 | ||
|
8392686e07 | ||
|
ae3b364b5b | ||
|
946de5c866 | ||
|
08dd5d48c3 | ||
|
d5a9f24b0b | ||
|
8811e12d3c | ||
|
867603db11 | ||
|
ffc7884880 | ||
|
381477deac | ||
|
f2a4e30384 | ||
|
377dbb9117 | ||
|
3a2eabab4b | ||
|
2540af5c05 | ||
|
4f3dac43b1 | ||
|
ee4ea080f1 | ||
|
fcda278666 | ||
|
dae32195a0 | ||
|
8d08203dec | ||
|
5edcb5857a | ||
|
04dae602e5 | ||
|
9b0771a2cb | ||
|
d94c68bb07 | ||
|
5d107406f5 | ||
|
fd9cccb73f | ||
|
cdc866103c | ||
|
3c7f50c89b | ||
|
a25156ed54 | ||
|
be26735ec3 | ||
|
2a77280e4e | ||
|
641dc3f38f | ||
|
cfa907d063 | ||
|
8df8fc4356 | ||
|
e52659b9ce | ||
|
d848225158 | ||
|
5a3d383a81 | ||
|
3358af429e | ||
|
6358e3f27e | ||
|
e2f122e067 | ||
|
931360f299 | ||
|
8a1fde06da | ||
|
1607641363 | ||
|
99817f940e | ||
|
1693b3c66d | ||
|
86687bf6fa | ||
|
cd41908cbf | ||
|
eac2060936 | ||
|
3640fc5f9d | ||
|
2e2f56c6fc | ||
|
e59b1cea3d | ||
|
73e3103f88 | ||
|
d275b26c66 | ||
|
46cc39d5a8 | ||
|
7ae3f96d53 | ||
|
04f728bcb0 | ||
|
f271da05bd | ||
|
3ea2ba70ec | ||
|
aa0464a0a3 | ||
|
399a42aa6c | ||
|
7972f0d9ee | ||
|
0a1529ea09 | ||
|
9e1a591235 | ||
|
eff46a16be | ||
|
d2508ef824 | ||
|
05f026ae8d | ||
|
2f6d479dea | ||
|
e1e588114d | ||
|
4a497eeef2 | ||
|
42b6f20bc0 | ||
|
600809b13d | ||
|
f27600025a | ||
|
5231472bad | ||
|
21adb04a72 | ||
|
88ecc7006e | ||
|
d96caa88b1 | ||
|
1981b00776 | ||
|
8a4ce974fb | ||
|
26fa974ed7 | ||
|
83095294e7 | ||
|
3aca7710d4 | ||
|
9efd3c353d | ||
|
29c2aefae9 | ||
|
1bdfcc2000 | ||
|
f891f802c5 | ||
|
d94808e639 | ||
|
c204fb44a1 | ||
|
afff450524 | ||
|
63dd127157 | ||
|
6ae5e84dbe | ||
|
c64602f252 | ||
|
88a305bb78 | ||
|
f00014b01e | ||
|
69b8c84d2e | ||
|
3568fa3dd3 | ||
|
9b9c59c4d9 | ||
|
738edafc74 | ||
|
206ac3f069 | ||
|
6003879200 | ||
|
d9cb9b2543 | ||
|
8bf1a97dea | ||
|
79db421afd | ||
|
90810af592 | ||
|
6464e380e1 | ||
|
964481b7f2 | ||
|
46b0cc1237 | ||
|
5bae4963f9 | ||
|
3c8ecb6c33 | ||
|
1dc9778435 | ||
|
004b6f7e47 | ||
|
6e83f802ea | ||
|
bbe1f281e9 | ||
|
d9ce74676f | ||
|
f86df32725 | ||
|
22bc2c67ab | ||
|
c508f4131a | ||
|
7a51051c11 | ||
|
0c912b3caa | ||
|
e1a5377087 | ||
|
2101bfc9cf | ||
|
15856ae16f | ||
|
8b69bad076 | ||
|
b33fd1ffa7 | ||
|
1afbea578b | ||
|
6f641c8b84 | ||
|
a60613aefb | ||
|
1f6a000acb | ||
|
828f2ea969 | ||
|
dee14205d7 | ||
|
7841f22a92 | ||
|
638be0f9b1 | ||
|
76f403a71a | ||
|
1c16bd6b98 | ||
|
4d9b2241de | ||
|
d0ee28d65a | ||
|
e8984c3e77 | ||
|
ce84b43d34 | ||
|
78fc36ffb3 | ||
|
e12dfe459e | ||
|
d4c6e079c3 | ||
|
4fecfdda74 | ||
|
0e49bbd5d4 | ||
|
2a25c95c37 | ||
|
c4f5c413c9 | ||
|
927b4553b7 | ||
|
70684c57cf | ||
|
6e8466b24d | ||
|
07c585913d | ||
|
a81266aeb5 | ||
|
e3c53fdf9b | ||
|
7530d4d9f1 | ||
|
8a7b9e758c | ||
|
20589af4b1 | ||
|
f98d635b68 | ||
|
67f81d3f0f | ||
|
367d5d4185 | ||
|
ba4ddbda11 | ||
|
4b4b8b74b3 | ||
|
ba87fe9fcf | ||
|
6fb17f2eb0 | ||
|
50905f41a8 | ||
|
75e9905b42 | ||
|
d4f017520f | ||
|
8678e23f8a | ||
|
d31d50eda2 | ||
|
261339bca1 | ||
|
40a7e83d47 | ||
|
0d1d0d4e01 | ||
|
7bab95c052 | ||
|
0f287fdacc | ||
|
d87669b43c | ||
|
fa81d65665 | ||
|
4bd451c4be | ||
|
405abcec58 | ||
|
c94c5b51ef | ||
|
c4f9e6f01c | ||
|
5333883320 | ||
|
5554dca70c | ||
|
717ab66014 | ||
|
1e06d6a070 | ||
|
d0190f4317 | ||
|
3c94b9eca6 | ||
|
c7b8516324 | ||
|
a8fb8d9f5d | ||
|
bf074bb581 | ||
|
ed35e12dc1 | ||
|
24de71ee7e | ||
|
5d8537a9e1 | ||
|
2890a3d3c0 | ||
|
3fb3f682da | ||
|
0519c5dd93 | ||
|
5b4c96ad4a | ||
|
cffafad36e | ||
|
c4dce5f28d | ||
|
2ead048edb | ||
|
8823f34c95 | ||
|
93cc176357 | ||
|
c6fe0cbfbf | ||
|
c62697dcc2 | ||
|
d4bc88e4ee | ||
|
7fd23deee2 | ||
|
adcac446d2 | ||
|
e8d0e24b4a | ||
|
7a4ca3b784 | ||
|
0c2331c065 | ||
|
b7e9e414c7 | ||
|
34e3909d0e | ||
|
72f6463115 | ||
|
0b98ef9523 | ||
|
f344067936 | ||
|
861568db8a | ||
|
cd34aeaa2f | ||
|
866fefded5 | ||
|
c107d3691c | ||
|
5cb90f8647 | ||
|
4a80384d0a | ||
|
d49fb014d6 | ||
|
b0228ef2e1 | ||
|
5ad065519c | ||
|
343df4570f | ||
|
b15bf72e1a | ||
|
7d1ade4864 | ||
|
6cab66d7aa | ||
|
d62c6fa5d8 | ||
|
9a36601a90 | ||
|
ee3ecfe2f4 | ||
|
ec2ee61f5a | ||
|
57b6a4c63d | ||
|
ce5c4906cf | ||
|
aaded7135c | ||
|
2eea2bb5b1 | ||
|
7c6bf37441 | ||
|
77de496262 | ||
|
866db6256a | ||
|
a09a15d3f0 | ||
|
b4ba78d100 | ||
|
5b28cd3498 | ||
|
6fb09b9008 | ||
|
52a8289303 | ||
|
a59a895446 | ||
|
68e2a32904 | ||
|
7749ed8d87 | ||
|
6311c9fda3 | ||
|
327bef1b51 | ||
|
f58ac06585 | ||
|
f59ae06a2a | ||
|
1c20326b80 | ||
|
e60e96f2cd | ||
|
25999e0d16 | ||
|
42806c5fc8 | ||
|
f5af861fc0 | ||
|
4f6c45e9df | ||
|
3038736bb5 | ||
|
7f7dd6000c | ||
|
b45af2ff19 | ||
|
4470c45644 | ||
|
aa53eca340 | ||
|
06c2637b63 | ||
|
186c3a9c6c | ||
|
49078a0c92 | ||
|
9ed78ec425 | ||
|
f0a6155c69 | ||
|
c301fad842 | ||
|
ea7b32bd6d | ||
|
edf547e31b | ||
|
2875d9bf40 | ||
|
fc559ede52 | ||
|
80912a8713 | ||
|
d9afa4335f | ||
|
a6af3528d4 | ||
|
1f8651b421 | ||
|
549888c646 | ||
|
e142dedc7f | ||
|
5be905147d | ||
|
8dcae66e2c | ||
|
cf6efa4441 | ||
|
5dc33f4dd5 | ||
|
8c60be07e4 | ||
|
5ab9737d9d | ||
|
f6f56aa9da | ||
|
e6376f3da4 | ||
|
782b9c8f97 | ||
|
f33fba1c4a | ||
|
4e88306784 | ||
|
3465c757fc | ||
|
c088b9d80a | ||
|
6da6eaac24 | ||
|
a2222a2ee1 | ||
|
b13b892942 | ||
|
6577916806 | ||
|
d9d285d2dd | ||
|
32a533ce72 | ||
|
a3378fc981 | ||
|
a6f5d4fb61 | ||
|
19c1ffca89 | ||
|
c006b4e964 | ||
|
c3ce346bae | ||
|
36e3751ce6 | ||
|
1b841fedcf | ||
|
83577d69c3 | ||
|
1a60f75c91 | ||
|
6167b6f994 | ||
|
7b5ad36319 | ||
|
ccfd2e2da0 | ||
|
6916cd522a | ||
|
5735a0665a | ||
|
b280075901 | ||
|
290a25c221 | ||
|
5e805af318 | ||
|
090ea96f2a | ||
|
edc8a7652e | ||
|
a04f251618 | ||
|
1d6e74f00d | ||
|
be0ad2a028 | ||
|
e89918da11 | ||
|
9b13853c09 | ||
|
828f257f98 | ||
|
b2c5927d9b | ||
|
3d6de2d17b | ||
|
0c2fd28cc6 | ||
|
e3839084b6 | ||
|
bbedc2b4c9 | ||
|
348f0c3997 | ||
|
2af0764558 | ||
|
a2d6d8cae4 | ||
|
52c3796122 | ||
|
23a203107a | ||
|
776fb835e9 | ||
|
7cc446d179 | ||
|
053f537f8b | ||
|
c3f1f89e31 | ||
|
50ebc2464c | ||
|
a6e904fc5f | ||
|
0387714b82 | ||
|
cac5afe277 | ||
|
64e1ec2b48 | ||
|
7e211f5d9a | ||
|
498949e1a6 | ||
|
33792f2749 | ||
|
78cd96899e | ||
|
47c0ca6ab3 | ||
|
3b395607f2 | ||
|
93bc96baf0 | ||
|
eb79e27830 | ||
|
3e95ff8f05 | ||
|
4985aeb877 | ||
|
1bb312aa9d | ||
|
9905da9e18 | ||
|
b5f867506d | ||
|
55d8ddcbcc | ||
|
1e0ecdb429 | ||
|
0bf71a348e | ||
|
a85cb388fa | ||
|
42efd8db89 | ||
|
e0ae314d67 |
|
@ -21,10 +21,10 @@ variables:
|
||||||
REPO_URL_XORGPROTO: 'https://gitlab.freedesktop.org/xorg/proto/xorgproto.git'
|
REPO_URL_XORGPROTO: 'https://gitlab.freedesktop.org/xorg/proto/xorgproto.git'
|
||||||
XORG_DEBIAN_VERSION: 'bullseye-slim'
|
XORG_DEBIAN_VERSION: 'bullseye-slim'
|
||||||
XORG_DEBIAN_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/debian-install.sh'
|
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_VERSION: '14.0'
|
||||||
XORG_FREEBSD_EXEC: ''
|
XORG_FREEBSD_EXEC: ''
|
||||||
XORG_FREEBSD_TAG: '2024-06-10.0'
|
XORG_FREEBSD_TAG: '2024-09-10-fix-freebsd-xcb'
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- project: 'freedesktop/ci-templates'
|
- project: 'freedesktop/ci-templates'
|
||||||
|
@ -109,7 +109,7 @@ stages:
|
||||||
FDO_DISTRIBUTION_TAG: '$XORG_FREEBSD_TAG'
|
FDO_DISTRIBUTION_TAG: '$XORG_FREEBSD_TAG'
|
||||||
FDO_DISTRIBUTION_VERSION: '$XORG_FREEBSD_VERSION'
|
FDO_DISTRIBUTION_VERSION: '$XORG_FREEBSD_VERSION'
|
||||||
FDO_DISTRIBUTION_EXEC: ''
|
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:
|
debian-bullseye:
|
||||||
extends:
|
extends:
|
||||||
|
@ -152,7 +152,7 @@ freebsd-image:
|
||||||
- $MESON_BUILDDIR/meson-logs/
|
- $MESON_BUILDDIR/meson-logs/
|
||||||
- $MESON_BUILDDIR/test/piglit-results/
|
- $MESON_BUILDDIR/test/piglit-results/
|
||||||
variables:
|
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_COMPILERCHECK: content
|
||||||
CCACHE_DIR: /cache/xserver/cache
|
CCACHE_DIR: /cache/xserver/cache
|
||||||
LC_ALL: C.UTF-8
|
LC_ALL: C.UTF-8
|
||||||
|
@ -191,14 +191,14 @@ mingw-cross-build:
|
||||||
script:
|
script:
|
||||||
- .gitlab-ci/meson-build.sh --run-install
|
- .gitlab-ci/meson-build.sh --run-install
|
||||||
variables:
|
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:
|
freebsd:
|
||||||
stage: build-and-test
|
stage: build-and-test
|
||||||
extends:
|
extends:
|
||||||
- .xorg-image@freebsd
|
- .xorg-image@freebsd
|
||||||
variables:
|
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:
|
script:
|
||||||
# running of of disk space without this
|
# running of of disk space without this
|
||||||
# needed until https://gitlab.freedesktop.org/freedesktop/ci-templates/-/issues/67 is fixed
|
# needed until https://gitlab.freedesktop.org/freedesktop/ci-templates/-/issues/67 is fixed
|
||||||
|
@ -239,24 +239,102 @@ xf86-driver-build-test:
|
||||||
stage: drivers
|
stage: drivers
|
||||||
parallel:
|
parallel:
|
||||||
matrix:
|
matrix:
|
||||||
|
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-elographics
|
||||||
|
SHA: master
|
||||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev
|
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev
|
||||||
SHA: xf86-input-evdev-2.10.6
|
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
|
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput
|
||||||
SHA: xf86-input-libinput-1.4.0
|
SHA: xf86-input-libinput-1.4.0
|
||||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse
|
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse
|
||||||
SHA: xf86-input-mouse-1.9.5
|
SHA: xf86-input-mouse-1.9.5
|
||||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-synaptics
|
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-synaptics
|
||||||
SHA: xf86-input-synaptics-1.9.2
|
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
|
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu
|
||||||
SHA: xf86-video-amdgpu-23.0.0
|
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
|
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati
|
||||||
SHA: xf86-video-ati-22.0.0
|
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
|
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl
|
||||||
SHA: master
|
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
|
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-vesa
|
||||||
SHA: xf86-video-vesa-2.6.0
|
SHA: xf86-video-vesa-2.6.0
|
||||||
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-vmware
|
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-vmware
|
||||||
SHA: xf86-video-vmware-13.4.0
|
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:
|
script:
|
||||||
# Install the server first
|
# Install the server first
|
||||||
- .gitlab-ci/meson-build.sh --skip-test --run-install
|
- .gitlab-ci/meson-build.sh --skip-test --run-install
|
||||||
|
@ -277,13 +355,6 @@ xf86-driver-build-test:
|
||||||
GIT_DEPTH: 1
|
GIT_DEPTH: 1
|
||||||
MESON_ARGS: -Dprefix=/usr/
|
MESON_ARGS: -Dprefix=/usr/
|
||||||
MESON_EXTRA_ARGS: -Dxwayland=false -Dxnest=false -Dxvfb=false -Dxquartz=false -Ddocs=false
|
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
|
# Verify that commit messages are as expected
|
||||||
|
|
|
@ -65,6 +65,7 @@ apt-get install -y \
|
||||||
libx11-xcb-dev \
|
libx11-xcb-dev \
|
||||||
libxau-dev \
|
libxau-dev \
|
||||||
libxaw7-dev \
|
libxaw7-dev \
|
||||||
|
libxcb-dri2-0-dev \
|
||||||
libxcb-glx0-dev \
|
libxcb-glx0-dev \
|
||||||
libxcb-icccm4-dev \
|
libxcb-icccm4-dev \
|
||||||
libxcb-image0-dev \
|
libxcb-image0-dev \
|
||||||
|
@ -96,6 +97,7 @@ apt-get install -y \
|
||||||
libxt-dev \
|
libxt-dev \
|
||||||
libxtst-dev \
|
libxtst-dev \
|
||||||
libxv-dev \
|
libxv-dev \
|
||||||
|
libxvmc-dev \
|
||||||
libz-mingw-w64-dev \
|
libz-mingw-w64-dev \
|
||||||
linux-libc-dev/bullseye-backports \
|
linux-libc-dev/bullseye-backports \
|
||||||
mesa-common-dev \
|
mesa-common-dev \
|
||||||
|
|
|
@ -26,22 +26,20 @@ from The Open Group.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
#include <X11/extensions/bigreqsproto.h>
|
#include <X11/extensions/bigreqsproto.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "dixstruct.h"
|
#include "dixstruct.h"
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "opaque.h"
|
#include "opaque.h"
|
||||||
#include "extinit_priv.h"
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcBigReqDispatch(ClientPtr client)
|
ProcBigReqDispatch(ClientPtr client)
|
||||||
|
@ -49,9 +47,6 @@ ProcBigReqDispatch(ClientPtr client)
|
||||||
REQUEST(xBigReqEnableReq);
|
REQUEST(xBigReqEnableReq);
|
||||||
xBigReqEnableReply rep;
|
xBigReqEnableReply rep;
|
||||||
|
|
||||||
if (client->swapped) {
|
|
||||||
swaps(&stuff->length);
|
|
||||||
}
|
|
||||||
if (stuff->brReqType != X_BigReqEnable)
|
if (stuff->brReqType != X_BigReqEnable)
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
REQUEST_SIZE_MATCH(xBigReqEnableReq);
|
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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
|
#include <X11/extensions/dpmsproto.h>
|
||||||
|
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
#include "os/screensaver.h"
|
#include "os/screensaver.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
@ -40,13 +40,13 @@ Equipment Corporation.
|
||||||
#include "dixstruct.h"
|
#include "dixstruct.h"
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "opaque.h"
|
#include "opaque.h"
|
||||||
#include <X11/extensions/dpmsproto.h>
|
|
||||||
#include "dpmsproc.h"
|
#include "dpmsproc.h"
|
||||||
#include "extinit_priv.h"
|
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "protocol-versions.h"
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
|
Bool noDPMSExtension = FALSE;
|
||||||
|
|
||||||
CARD16 DPMSPowerLevel = 0;
|
CARD16 DPMSPowerLevel = 0;
|
||||||
Bool DPMSDisabledSwitch = FALSE;
|
Bool DPMSDisabledSwitch = FALSE;
|
||||||
CARD32 DPMSStandbyTime = -1;
|
CARD32 DPMSStandbyTime = -1;
|
||||||
|
@ -495,42 +495,16 @@ static int _X_COLD
|
||||||
SProcDPMSGetVersion(ClientPtr client)
|
SProcDPMSGetVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDPMSGetVersionReq);
|
REQUEST(xDPMSGetVersionReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xDPMSGetVersionReq);
|
REQUEST_SIZE_MATCH(xDPMSGetVersionReq);
|
||||||
swaps(&stuff->majorVersion);
|
swaps(&stuff->majorVersion);
|
||||||
swaps(&stuff->minorVersion);
|
swaps(&stuff->minorVersion);
|
||||||
return ProcDPMSGetVersion(client);
|
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
|
static int _X_COLD
|
||||||
SProcDPMSSetTimeouts(ClientPtr client)
|
SProcDPMSSetTimeouts(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDPMSSetTimeoutsReq);
|
REQUEST(xDPMSSetTimeoutsReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq);
|
REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq);
|
||||||
|
|
||||||
swaps(&stuff->standby);
|
swaps(&stuff->standby);
|
||||||
|
@ -539,34 +513,10 @@ SProcDPMSSetTimeouts(ClientPtr client)
|
||||||
return ProcDPMSSetTimeouts(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
|
static int _X_COLD
|
||||||
SProcDPMSForceLevel(ClientPtr client)
|
SProcDPMSForceLevel(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDPMSForceLevelReq);
|
REQUEST(xDPMSForceLevelReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xDPMSForceLevelReq);
|
REQUEST_SIZE_MATCH(xDPMSForceLevelReq);
|
||||||
|
|
||||||
swaps(&stuff->level);
|
swaps(&stuff->level);
|
||||||
|
@ -574,22 +524,10 @@ SProcDPMSForceLevel(ClientPtr client)
|
||||||
return ProcDPMSForceLevel(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
|
static int _X_COLD
|
||||||
SProcDPMSSelectInput(ClientPtr client)
|
SProcDPMSSelectInput(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDPMSSelectInputReq);
|
REQUEST(xDPMSSelectInputReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xDPMSSelectInputReq);
|
REQUEST_SIZE_MATCH(xDPMSSelectInputReq);
|
||||||
swapl(&stuff->eventMask);
|
swapl(&stuff->eventMask);
|
||||||
return ProcDPMSSelectInput(client);
|
return ProcDPMSSelectInput(client);
|
||||||
|
@ -605,19 +543,19 @@ SProcDPMSDispatch(ClientPtr client)
|
||||||
case X_DPMSGetVersion:
|
case X_DPMSGetVersion:
|
||||||
return SProcDPMSGetVersion(client);
|
return SProcDPMSGetVersion(client);
|
||||||
case X_DPMSCapable:
|
case X_DPMSCapable:
|
||||||
return SProcDPMSCapable(client);
|
return ProcDPMSCapable(client);
|
||||||
case X_DPMSGetTimeouts:
|
case X_DPMSGetTimeouts:
|
||||||
return SProcDPMSGetTimeouts(client);
|
return ProcDPMSGetTimeouts(client);
|
||||||
case X_DPMSSetTimeouts:
|
case X_DPMSSetTimeouts:
|
||||||
return SProcDPMSSetTimeouts(client);
|
return SProcDPMSSetTimeouts(client);
|
||||||
case X_DPMSEnable:
|
case X_DPMSEnable:
|
||||||
return SProcDPMSEnable(client);
|
return ProcDPMSEnable(client);
|
||||||
case X_DPMSDisable:
|
case X_DPMSDisable:
|
||||||
return SProcDPMSDisable(client);
|
return ProcDPMSDisable(client);
|
||||||
case X_DPMSForceLevel:
|
case X_DPMSForceLevel:
|
||||||
return SProcDPMSForceLevel(client);
|
return SProcDPMSForceLevel(client);
|
||||||
case X_DPMSInfo:
|
case X_DPMSInfo:
|
||||||
return SProcDPMSInfo(client);
|
return ProcDPMSInfo(client);
|
||||||
case X_DPMSSelectInput:
|
case X_DPMSSelectInput:
|
||||||
return SProcDPMSSelectInput(client);
|
return SProcDPMSSelectInput(client);
|
||||||
default:
|
default:
|
||||||
|
|
76
Xext/geext.c
76
Xext/geext.c
|
@ -23,27 +23,24 @@
|
||||||
* Author: Peter Hutterer, University of South Australia, NICTA
|
* Author: Peter Hutterer, University of South Australia, NICTA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#include "windowstr.h"
|
|
||||||
#include <X11/extensions/ge.h>
|
#include <X11/extensions/ge.h>
|
||||||
|
|
||||||
|
#include "windowstr.h"
|
||||||
|
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
|
||||||
#include "geint.h"
|
#include "geint.h"
|
||||||
#include "geext.h"
|
#include "geext.h"
|
||||||
#include "protocol-versions.h"
|
#include "protocol-versions.h"
|
||||||
#include "extinit_priv.h"
|
|
||||||
|
Bool noGEExtension = FALSE;
|
||||||
|
|
||||||
DevPrivateKeyRec GEClientPrivateKeyRec;
|
DevPrivateKeyRec GEClientPrivateKeyRec;
|
||||||
|
|
||||||
GEExtension GEExtensions[MAXEXTENSIONS];
|
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 */
|
/* Forward declarations */
|
||||||
static void SGEGenericEvent(xEvent *from, xEvent *to);
|
static void SGEGenericEvent(xEvent *from, xEvent *to);
|
||||||
|
|
||||||
|
@ -89,11 +86,6 @@ ProcGEQueryVersion(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int (*ProcGEVector[GENumberRequests]) (ClientPtr) = {
|
|
||||||
/* Version 1.0 */
|
|
||||||
ProcGEQueryVersion,
|
|
||||||
};
|
|
||||||
|
|
||||||
/************************************************************/
|
/************************************************************/
|
||||||
/* swapped request handlers */
|
/* swapped request handlers */
|
||||||
/************************************************************/
|
/************************************************************/
|
||||||
|
@ -101,19 +93,12 @@ static int _X_COLD
|
||||||
SProcGEQueryVersion(ClientPtr client)
|
SProcGEQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xGEQueryVersionReq);
|
REQUEST(xGEQueryVersionReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xGEQueryVersionReq);
|
REQUEST_SIZE_MATCH(xGEQueryVersionReq);
|
||||||
swaps(&stuff->majorVersion);
|
swaps(&stuff->majorVersion);
|
||||||
swaps(&stuff->minorVersion);
|
swaps(&stuff->minorVersion);
|
||||||
return (*ProcGEVector[stuff->ReqType]) (client);
|
return SProcGEQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int (*SProcGEVector[GENumberRequests]) (ClientPtr) = {
|
|
||||||
/* Version 1.0 */
|
|
||||||
SProcGEQueryVersion
|
|
||||||
};
|
|
||||||
|
|
||||||
/************************************************************/
|
/************************************************************/
|
||||||
/* callbacks */
|
/* callbacks */
|
||||||
/************************************************************/
|
/************************************************************/
|
||||||
|
@ -122,32 +107,29 @@ static int (*SProcGEVector[GENumberRequests]) (ClientPtr) = {
|
||||||
static int
|
static int
|
||||||
ProcGEDispatch(ClientPtr client)
|
ProcGEDispatch(ClientPtr client)
|
||||||
{
|
{
|
||||||
GEClientInfoPtr pGEClient = GEGetClient(client);
|
REQUEST(xReq);
|
||||||
|
|
||||||
REQUEST(xGEReq);
|
switch (stuff->data) {
|
||||||
|
case X_GEQueryVersion:
|
||||||
if (pGEClient->major_version >= ARRAY_SIZE(version_requests))
|
return ProcGEQueryVersion(client);
|
||||||
|
default:
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
if (stuff->ReqType > version_requests[pGEClient->major_version])
|
}
|
||||||
return BadRequest;
|
|
||||||
|
|
||||||
return (ProcGEVector[stuff->ReqType]) (client);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* dispatch swapped requests */
|
/* dispatch swapped requests */
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
SProcGEDispatch(ClientPtr client)
|
SProcGEDispatch(ClientPtr client)
|
||||||
{
|
{
|
||||||
GEClientInfoPtr pGEClient = GEGetClient(client);
|
REQUEST(xReq);
|
||||||
|
swaps(&stuff->length);
|
||||||
|
|
||||||
REQUEST(xGEReq);
|
switch (stuff->data) {
|
||||||
|
case X_GEQueryVersion:
|
||||||
if (pGEClient->major_version >= ARRAY_SIZE(version_requests))
|
return SProcGEQueryVersion(client);
|
||||||
|
default:
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
if (stuff->ReqType > version_requests[pGEClient->major_version])
|
}
|
||||||
return BadRequest;
|
|
||||||
|
|
||||||
return (*SProcGEVector[stuff->ReqType]) (client);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reset extension. Called on server shutdown. */
|
/* Reset extension. Called on server shutdown. */
|
||||||
|
@ -186,24 +168,16 @@ SGEGenericEvent(xEvent *from, xEvent *to)
|
||||||
void
|
void
|
||||||
GEExtensionInit(void)
|
GEExtensionInit(void)
|
||||||
{
|
{
|
||||||
ExtensionEntry *extEntry;
|
|
||||||
|
|
||||||
if (!dixRegisterPrivateKey
|
if (!dixRegisterPrivateKey
|
||||||
(&GEClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(GEClientInfoRec)))
|
(&GEClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(GEClientInfoRec)))
|
||||||
FatalError("GEExtensionInit: GE private request failed.\n");
|
FatalError("GEExtensionInit: GE private request failed.\n");
|
||||||
|
|
||||||
if ((extEntry = AddExtension(GE_NAME,
|
if (!AddExtension(GE_NAME, 0, GENumberErrors, ProcGEDispatch, SProcGEDispatch,
|
||||||
0, GENumberErrors,
|
GEResetProc, StandardMinorOpcode))
|
||||||
ProcGEDispatch, SProcGEDispatch,
|
|
||||||
GEResetProc, StandardMinorOpcode)) != 0) {
|
|
||||||
memset(GEExtensions, 0, sizeof(GEExtensions));
|
|
||||||
|
|
||||||
EventSwapVector[GenericEvent] = (EventSwapPtr) SGEGenericEvent;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
FatalError("GEInit: AddExtensions failed.\n");
|
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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -23,9 +23,7 @@ dealings in this Software without prior written authorization from Digital
|
||||||
Equipment Corporation.
|
Equipment Corporation.
|
||||||
******************************************************************/
|
******************************************************************/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
|
@ -34,6 +32,7 @@ Equipment Corporation.
|
||||||
#include <X11/extensions/panoramiXproto.h>
|
#include <X11/extensions/panoramiXproto.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "cursor.h"
|
#include "cursor.h"
|
||||||
|
@ -57,7 +56,6 @@ Equipment Corporation.
|
||||||
#ifdef COMPOSITE
|
#ifdef COMPOSITE
|
||||||
#include "compint.h"
|
#include "compint.h"
|
||||||
#endif
|
#endif
|
||||||
#include "extinit_priv.h"
|
|
||||||
#include "protocol-versions.h"
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
#ifdef GLXPROXY
|
#ifdef GLXPROXY
|
||||||
|
@ -65,6 +63,9 @@ extern VisualPtr glxMatchVisual(ScreenPtr pScreen,
|
||||||
VisualPtr pVisual, ScreenPtr pMatchScreen);
|
VisualPtr pVisual, ScreenPtr pMatchScreen);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Xinerama is disabled by default unless enabled via +xinerama */
|
||||||
|
Bool noPanoramiXExtension = TRUE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PanoramiX data declarations
|
* PanoramiX data declarations
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -23,9 +23,7 @@ dealings in this Software without prior written authorization from Digital
|
||||||
Equipment Corporation.
|
Equipment Corporation.
|
||||||
******************************************************************/
|
******************************************************************/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
|
@ -47,22 +45,10 @@ Equipment Corporation.
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "panoramiXh.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
|
static int _X_COLD
|
||||||
SProcPanoramiXGetState(ClientPtr client)
|
SProcPanoramiXGetState(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xPanoramiXGetStateReq);
|
REQUEST(xPanoramiXGetStateReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
||||||
swapl(&stuff->window);
|
swapl(&stuff->window);
|
||||||
return ProcPanoramiXGetState(client);
|
return ProcPanoramiXGetState(client);
|
||||||
|
@ -72,8 +58,6 @@ static int _X_COLD
|
||||||
SProcPanoramiXGetScreenCount(ClientPtr client)
|
SProcPanoramiXGetScreenCount(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xPanoramiXGetScreenCountReq);
|
REQUEST(xPanoramiXGetScreenCountReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
||||||
swapl(&stuff->window);
|
swapl(&stuff->window);
|
||||||
return ProcPanoramiXGetScreenCount(client);
|
return ProcPanoramiXGetScreenCount(client);
|
||||||
|
@ -83,41 +67,19 @@ static int _X_COLD
|
||||||
SProcPanoramiXGetScreenSize(ClientPtr client)
|
SProcPanoramiXGetScreenSize(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xPanoramiXGetScreenSizeReq);
|
REQUEST(xPanoramiXGetScreenSizeReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
||||||
swapl(&stuff->window);
|
swapl(&stuff->window);
|
||||||
swapl(&stuff->screen);
|
swapl(&stuff->screen);
|
||||||
return ProcPanoramiXGetScreenSize(client);
|
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
|
int _X_COLD
|
||||||
SProcPanoramiXDispatch(ClientPtr client)
|
SProcPanoramiXDispatch(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
switch (stuff->data) {
|
switch (stuff->data) {
|
||||||
case X_PanoramiXQueryVersion:
|
case X_PanoramiXQueryVersion:
|
||||||
return SProcPanoramiXQueryVersion(client);
|
return ProcPanoramiXQueryVersion(client);
|
||||||
case X_PanoramiXGetState:
|
case X_PanoramiXGetState:
|
||||||
return SProcPanoramiXGetState(client);
|
return SProcPanoramiXGetState(client);
|
||||||
case X_PanoramiXGetScreenCount:
|
case X_PanoramiXGetScreenCount:
|
||||||
|
@ -125,9 +87,9 @@ SProcPanoramiXDispatch(ClientPtr client)
|
||||||
case X_PanoramiXGetScreenSize:
|
case X_PanoramiXGetScreenSize:
|
||||||
return SProcPanoramiXGetScreenSize(client);
|
return SProcPanoramiXGetScreenSize(client);
|
||||||
case X_XineramaIsActive:
|
case X_XineramaIsActive:
|
||||||
return SProcXineramaIsActive(client);
|
return ProcXineramaIsActive(client);
|
||||||
case X_XineramaQueryScreens:
|
case X_XineramaQueryScreens:
|
||||||
return SProcXineramaQueryScreens(client);
|
return ProcXineramaQueryScreens(client);
|
||||||
}
|
}
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,15 +25,14 @@ Equipment Corporation.
|
||||||
|
|
||||||
/* Massively rewritten by Mark Vojkovich <markv@valinux.com> */
|
/* Massively rewritten by Mark Vojkovich <markv@valinux.com> */
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "dixfontstr.h"
|
#include "dixfontstr.h"
|
||||||
|
|
154
Xext/saver.c
154
Xext/saver.c
|
@ -26,9 +26,7 @@ in this Software without prior written authorization from the X Consortium.
|
||||||
* Author: Keith Packard, MIT X Consortium
|
* Author: Keith Packard, MIT X Consortium
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <X11/X.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/colormap_priv.h"
|
||||||
#include "dix/cursor_priv.h"
|
#include "dix/cursor_priv.h"
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
#include "os/osdep.h"
|
||||||
#include "os/screensaver.h"
|
#include "os/screensaver.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
@ -53,16 +53,21 @@ in this Software without prior written authorization from the X Consortium.
|
||||||
#include "colormapst.h"
|
#include "colormapst.h"
|
||||||
#include "xace.h"
|
#include "xace.h"
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#ifdef PANORAMIX
|
#ifdef XINERAMA
|
||||||
#include "panoramiX.h"
|
#include "panoramiX.h"
|
||||||
#include "panoramiXsrv.h"
|
#include "panoramiXsrv.h"
|
||||||
#endif
|
#endif /* XINERAMA */
|
||||||
#ifdef DPMSExtension
|
#ifdef DPMSExtension
|
||||||
#include <X11/extensions/dpmsconst.h>
|
#include <X11/extensions/dpmsconst.h>
|
||||||
#include "dpmsproc.h"
|
#include "dpmsproc.h"
|
||||||
#endif
|
#endif
|
||||||
#include "protocol-versions.h"
|
#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;
|
static int ScreenSaverEventBase = 0;
|
||||||
|
|
||||||
|
@ -272,13 +277,10 @@ setEventMask(ScreenPtr pScreen, ClientPtr client, unsigned long mask)
|
||||||
static void
|
static void
|
||||||
FreeAttrs(ScreenSaverAttrPtr pAttr)
|
FreeAttrs(ScreenSaverAttrPtr pAttr)
|
||||||
{
|
{
|
||||||
PixmapPtr pPixmap;
|
|
||||||
CursorPtr pCursor;
|
CursorPtr pCursor;
|
||||||
|
|
||||||
if ((pPixmap = pAttr->pBackgroundPixmap) != 0)
|
dixDestroyPixmap(pAttr->pBackgroundPixmap, 0);
|
||||||
(*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap);
|
dixDestroyPixmap(pAttr->pBorderPixmap, 0);
|
||||||
if ((pPixmap = pAttr->pBorderPixmap) != 0)
|
|
||||||
(*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap);
|
|
||||||
if ((pCursor = pAttr->pCursor) != 0)
|
if ((pCursor = pAttr->pCursor) != 0)
|
||||||
FreeCursor(pCursor, (Cursor) 0);
|
FreeCursor(pCursor, (Cursor) 0);
|
||||||
}
|
}
|
||||||
|
@ -585,9 +587,9 @@ ScreenSaverHandle(ScreenPtr pScreen, int xstate, Bool force)
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
|
|
||||||
}
|
}
|
||||||
#ifdef PANORAMIX
|
#ifdef XINERAMA
|
||||||
if (noPanoramiXExtension || !pScreen->myNum)
|
if (noPanoramiXExtension || !pScreen->myNum)
|
||||||
#endif
|
#endif /* XINERAMA */
|
||||||
SendScreenSaverNotify(pScreen, state, force);
|
SendScreenSaverNotify(pScreen, state, force);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -598,7 +600,6 @@ ProcScreenSaverQueryVersion(ClientPtr client)
|
||||||
xScreenSaverQueryVersionReply rep = {
|
xScreenSaverQueryVersionReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.length = 0,
|
|
||||||
.majorVersion = SERVER_SAVER_MAJOR_VERSION,
|
.majorVersion = SERVER_SAVER_MAJOR_VERSION,
|
||||||
.minorVersion = SERVER_SAVER_MINOR_VERSION
|
.minorVersion = SERVER_SAVER_MINOR_VERSION
|
||||||
};
|
};
|
||||||
|
@ -607,7 +608,8 @@ ProcScreenSaverQueryVersion(ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length);
|
swaps(&rep.majorVersion);
|
||||||
|
swaps(&rep.minorVersion);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xScreenSaverQueryVersionReply), &rep);
|
WriteToClient(client, sizeof(xScreenSaverQueryVersionReply), &rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
@ -617,7 +619,6 @@ static int
|
||||||
ProcScreenSaverQueryInfo(ClientPtr client)
|
ProcScreenSaverQueryInfo(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xScreenSaverQueryInfoReq);
|
REQUEST(xScreenSaverQueryInfoReq);
|
||||||
xScreenSaverQueryInfoReply rep;
|
|
||||||
int rc;
|
int rc;
|
||||||
ScreenSaverStuffPtr pSaver;
|
ScreenSaverStuffPtr pSaver;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
@ -639,30 +640,24 @@ ProcScreenSaverQueryInfo(ClientPtr client)
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
lastInput = GetTimeInMillis() - LastEventTime(XIAllDevices).milliseconds;
|
lastInput = GetTimeInMillis() - LastEventTime(XIAllDevices).milliseconds;
|
||||||
|
|
||||||
rep = (xScreenSaverQueryInfoReply) {
|
xScreenSaverQueryInfoReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.length = 0,
|
|
||||||
.window = pSaver->wid
|
.window = pSaver->wid
|
||||||
};
|
};
|
||||||
if (screenIsSaved != SCREEN_SAVER_OFF) {
|
if (screenIsSaved != SCREEN_SAVER_OFF) {
|
||||||
rep.state = ScreenSaverOn;
|
rep.state = ScreenSaverOn;
|
||||||
if (ScreenSaverTime)
|
if (ScreenSaverTime)
|
||||||
rep.tilOrSince = lastInput - ScreenSaverTime;
|
rep.tilOrSince = lastInput - ScreenSaverTime;
|
||||||
else
|
|
||||||
rep.tilOrSince = 0;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (ScreenSaverTime) {
|
if (ScreenSaverTime) {
|
||||||
rep.state = ScreenSaverOff;
|
rep.state = ScreenSaverOff;
|
||||||
if (ScreenSaverTime < lastInput)
|
if (ScreenSaverTime >= lastInput)
|
||||||
rep.tilOrSince = 0;
|
|
||||||
else
|
|
||||||
rep.tilOrSince = ScreenSaverTime - lastInput;
|
rep.tilOrSince = ScreenSaverTime - lastInput;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rep.state = ScreenSaverDisabled;
|
rep.state = ScreenSaverDisabled;
|
||||||
rep.tilOrSince = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rep.idle = lastInput;
|
rep.idle = lastInput;
|
||||||
|
@ -675,7 +670,6 @@ ProcScreenSaverQueryInfo(ClientPtr client)
|
||||||
rep.kind = ScreenSaverInternal;
|
rep.kind = ScreenSaverInternal;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length);
|
|
||||||
swapl(&rep.window);
|
swapl(&rep.window);
|
||||||
swapl(&rep.tilOrSince);
|
swapl(&rep.tilOrSince);
|
||||||
swapl(&rep.idle);
|
swapl(&rep.idle);
|
||||||
|
@ -708,9 +702,8 @@ ProcScreenSaverSelectInput(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ScreenSaverSetAttributes(ClientPtr client)
|
ScreenSaverSetAttributes(ClientPtr client, xScreenSaverSetAttributesReq *stuff)
|
||||||
{
|
{
|
||||||
REQUEST(xScreenSaverSetAttributesReq);
|
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
WindowPtr pParent;
|
WindowPtr pParent;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
|
@ -733,7 +726,6 @@ ScreenSaverSetAttributes(ClientPtr client)
|
||||||
Colormap cmap;
|
Colormap cmap;
|
||||||
ColormapPtr pCmap;
|
ColormapPtr pCmap;
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq);
|
|
||||||
ret = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
|
ret = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
|
||||||
DixGetAttrAccess);
|
DixGetAttrAccess);
|
||||||
if (ret != Success)
|
if (ret != Success)
|
||||||
|
@ -745,7 +737,7 @@ ScreenSaverSetAttributes(ClientPtr client)
|
||||||
if (ret != Success)
|
if (ret != Success)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
len = stuff->length - bytes_to_int32(sizeof(xScreenSaverSetAttributesReq));
|
len = client->req_len - bytes_to_int32(sizeof(xScreenSaverSetAttributesReq));
|
||||||
if (Ones(stuff->mask) != len)
|
if (Ones(stuff->mask) != len)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
if (!stuff->width || !stuff->height) {
|
if (!stuff->width || !stuff->height) {
|
||||||
|
@ -1050,16 +1042,13 @@ ScreenSaverSetAttributes(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ScreenSaverUnsetAttributes(ClientPtr client)
|
ScreenSaverUnsetAttributes(ClientPtr client, Drawable drawable)
|
||||||
{
|
{
|
||||||
REQUEST(xScreenSaverSetAttributesReq);
|
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
ScreenSaverScreenPrivatePtr pPriv;
|
ScreenSaverScreenPrivatePtr pPriv;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
|
rc = dixLookupDrawable(&pDraw, drawable, client, 0, DixGetAttrAccess);
|
||||||
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
|
|
||||||
DixGetAttrAccess);
|
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return rc;
|
return rc;
|
||||||
pPriv = GetScreenPrivate(pDraw->pScreen);
|
pPriv = GetScreenPrivate(pDraw->pScreen);
|
||||||
|
@ -1075,9 +1064,11 @@ ScreenSaverUnsetAttributes(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
ProcScreenSaverSetAttributes(ClientPtr client)
|
ProcScreenSaverSetAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
#ifdef PANORAMIX
|
REQUEST(xScreenSaverSetAttributesReq);
|
||||||
|
REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq);
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
if (!noPanoramiXExtension) {
|
if (!noPanoramiXExtension) {
|
||||||
REQUEST(xScreenSaverSetAttributesReq);
|
|
||||||
PanoramiXRes *draw;
|
PanoramiXRes *draw;
|
||||||
PanoramiXRes *backPix = NULL;
|
PanoramiXRes *backPix = NULL;
|
||||||
PanoramiXRes *bordPix = NULL;
|
PanoramiXRes *bordPix = NULL;
|
||||||
|
@ -1086,15 +1077,13 @@ ProcScreenSaverSetAttributes(ClientPtr client)
|
||||||
int pback_offset = 0, pbord_offset = 0, cmap_offset = 0;
|
int pback_offset = 0, pbord_offset = 0, cmap_offset = 0;
|
||||||
XID orig_visual, tmp;
|
XID orig_visual, tmp;
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq);
|
|
||||||
|
|
||||||
status = dixLookupResourceByClass((void **) &draw, stuff->drawable,
|
status = dixLookupResourceByClass((void **) &draw, stuff->drawable,
|
||||||
XRC_DRAWABLE, client, DixWriteAccess);
|
XRC_DRAWABLE, client, DixWriteAccess);
|
||||||
if (status != Success)
|
if (status != Success)
|
||||||
return (status == BadValue) ? BadDrawable : status;
|
return (status == BadValue) ? BadDrawable : status;
|
||||||
|
|
||||||
len =
|
len =
|
||||||
stuff->length -
|
client->req_len -
|
||||||
bytes_to_int32(sizeof(xScreenSaverSetAttributesReq));
|
bytes_to_int32(sizeof(xScreenSaverSetAttributesReq));
|
||||||
if (Ones(stuff->mask) != len)
|
if (Ones(stuff->mask) != len)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
@ -1149,26 +1138,27 @@ ProcScreenSaverSetAttributes(ClientPtr client)
|
||||||
if (orig_visual != CopyFromParent)
|
if (orig_visual != CopyFromParent)
|
||||||
stuff->visualID = PanoramiXTranslateVisualID(i, orig_visual);
|
stuff->visualID = PanoramiXTranslateVisualID(i, orig_visual);
|
||||||
|
|
||||||
status = ScreenSaverSetAttributes(client);
|
status = ScreenSaverSetAttributes(client, stuff);
|
||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
return ScreenSaverSetAttributes(client);
|
return ScreenSaverSetAttributes(client, stuff);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcScreenSaverUnsetAttributes(ClientPtr client)
|
ProcScreenSaverUnsetAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
#ifdef PANORAMIX
|
REQUEST(xScreenSaverUnsetAttributesReq);
|
||||||
|
REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
if (!noPanoramiXExtension) {
|
if (!noPanoramiXExtension) {
|
||||||
REQUEST(xScreenSaverUnsetAttributesReq);
|
|
||||||
PanoramiXRes *draw;
|
PanoramiXRes *draw;
|
||||||
int rc, i;
|
int rc, i;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
|
|
||||||
|
|
||||||
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
|
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
|
||||||
XRC_DRAWABLE, client, DixWriteAccess);
|
XRC_DRAWABLE, client, DixWriteAccess);
|
||||||
|
@ -1176,15 +1166,14 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
|
||||||
return (rc == BadValue) ? BadDrawable : rc;
|
return (rc == BadValue) ? BadDrawable : rc;
|
||||||
|
|
||||||
for (i = PanoramiXNumScreens - 1; i > 0; i--) {
|
for (i = PanoramiXNumScreens - 1; i > 0; i--) {
|
||||||
stuff->drawable = draw->info[i].id;
|
ScreenSaverUnsetAttributes(client, draw->info[i].id);
|
||||||
ScreenSaverUnsetAttributes(client);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stuff->drawable = draw->info[0].id;
|
stuff->drawable = draw->info[0].id;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
return ScreenSaverUnsetAttributes(client);
|
return ScreenSaverUnsetAttributes(client, stuff->drawable);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -1252,37 +1241,32 @@ ProcScreenSaverSuspend(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int (*NormalVector[]) (ClientPtr /* client */ ) = {
|
|
||||||
ProcScreenSaverQueryVersion,
|
|
||||||
ProcScreenSaverQueryInfo,
|
|
||||||
ProcScreenSaverSelectInput,
|
|
||||||
ProcScreenSaverSetAttributes,
|
|
||||||
ProcScreenSaverUnsetAttributes, ProcScreenSaverSuspend,};
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcScreenSaverDispatch(ClientPtr client)
|
ProcScreenSaverDispatch(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
|
switch (stuff->data) {
|
||||||
if (stuff->data < ARRAY_SIZE(NormalVector))
|
case X_ScreenSaverQueryVersion:
|
||||||
return (*NormalVector[stuff->data]) (client);
|
return ProcScreenSaverQueryVersion(client);
|
||||||
return BadRequest;
|
case X_ScreenSaverQueryInfo:
|
||||||
}
|
return ProcScreenSaverQueryInfo(client);
|
||||||
|
case X_ScreenSaverSelectInput:
|
||||||
static int _X_COLD
|
return ProcScreenSaverSelectInput(client);
|
||||||
SProcScreenSaverQueryVersion(ClientPtr client)
|
case X_ScreenSaverSetAttributes:
|
||||||
{
|
return ProcScreenSaverSetAttributes(client);
|
||||||
REQUEST(xScreenSaverQueryVersionReq);
|
case X_ScreenSaverUnsetAttributes:
|
||||||
swaps(&stuff->length);
|
return ProcScreenSaverUnsetAttributes(client);
|
||||||
REQUEST_SIZE_MATCH(xScreenSaverQueryVersionReq);
|
case X_ScreenSaverSuspend:
|
||||||
return ProcScreenSaverQueryVersion(client);
|
return ProcScreenSaverSuspend(client);
|
||||||
|
default:
|
||||||
|
return BadRequest;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
SProcScreenSaverQueryInfo(ClientPtr client)
|
SProcScreenSaverQueryInfo(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xScreenSaverQueryInfoReq);
|
REQUEST(xScreenSaverQueryInfoReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq);
|
REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
return ProcScreenSaverQueryInfo(client);
|
return ProcScreenSaverQueryInfo(client);
|
||||||
|
@ -1292,7 +1276,6 @@ static int _X_COLD
|
||||||
SProcScreenSaverSelectInput(ClientPtr client)
|
SProcScreenSaverSelectInput(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xScreenSaverSelectInputReq);
|
REQUEST(xScreenSaverSelectInputReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xScreenSaverSelectInputReq);
|
REQUEST_SIZE_MATCH(xScreenSaverSelectInputReq);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->eventMask);
|
swapl(&stuff->eventMask);
|
||||||
|
@ -1303,7 +1286,6 @@ static int _X_COLD
|
||||||
SProcScreenSaverSetAttributes(ClientPtr client)
|
SProcScreenSaverSetAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xScreenSaverSetAttributesReq);
|
REQUEST(xScreenSaverSetAttributesReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq);
|
REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
swaps(&stuff->x);
|
swaps(&stuff->x);
|
||||||
|
@ -1321,7 +1303,6 @@ static int _X_COLD
|
||||||
SProcScreenSaverUnsetAttributes(ClientPtr client)
|
SProcScreenSaverUnsetAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xScreenSaverUnsetAttributesReq);
|
REQUEST(xScreenSaverUnsetAttributesReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
|
REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
return ProcScreenSaverUnsetAttributes(client);
|
return ProcScreenSaverUnsetAttributes(client);
|
||||||
|
@ -1331,28 +1312,31 @@ static int _X_COLD
|
||||||
SProcScreenSaverSuspend(ClientPtr client)
|
SProcScreenSaverSuspend(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xScreenSaverSuspendReq);
|
REQUEST(xScreenSaverSuspendReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xScreenSaverSuspendReq);
|
REQUEST_SIZE_MATCH(xScreenSaverSuspendReq);
|
||||||
swapl(&stuff->suspend);
|
swapl(&stuff->suspend);
|
||||||
return ProcScreenSaverSuspend(client);
|
return ProcScreenSaverSuspend(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int (*SwappedVector[]) (ClientPtr /* client */ ) = {
|
|
||||||
SProcScreenSaverQueryVersion,
|
|
||||||
SProcScreenSaverQueryInfo,
|
|
||||||
SProcScreenSaverSelectInput,
|
|
||||||
SProcScreenSaverSetAttributes,
|
|
||||||
SProcScreenSaverUnsetAttributes, SProcScreenSaverSuspend,};
|
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
SProcScreenSaverDispatch(ClientPtr client)
|
SProcScreenSaverDispatch(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
|
switch (stuff->data) {
|
||||||
if (stuff->data < ARRAY_SIZE(NormalVector))
|
case X_ScreenSaverQueryVersion:
|
||||||
return (*SwappedVector[stuff->data]) (client);
|
return ProcScreenSaverQueryVersion(client);
|
||||||
return BadRequest;
|
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
|
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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/Xmd.h>
|
#include <X11/Xmd.h>
|
||||||
#include <X11/extensions/securproto.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/dix_priv.h"
|
||||||
#include "dix/registry_priv.h"
|
#include "dix/registry_priv.h"
|
||||||
#include "include/extinit_priv.h"
|
#include "miext/extinit_priv.h"
|
||||||
#include "os/audit.h"
|
#include "os/audit.h"
|
||||||
#include "os/auth.h"
|
#include "os/auth.h"
|
||||||
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
|
@ -46,9 +45,10 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#include "privates.h"
|
#include "privates.h"
|
||||||
#include "xacestr.h"
|
#include "xacestr.h"
|
||||||
#include "securitysrv.h"
|
#include "securitysrv.h"
|
||||||
#include "extinit.h"
|
|
||||||
#include "protocol-versions.h"
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
|
Bool noSecurityExtension = FALSE;
|
||||||
|
|
||||||
/* Extension stuff */
|
/* Extension stuff */
|
||||||
static int SecurityErrorBase; /* first Security error number */
|
static int SecurityErrorBase; /* first Security error number */
|
||||||
static int SecurityEventBase; /* first Security event number */
|
static int SecurityEventBase; /* first Security event number */
|
||||||
|
@ -613,8 +613,6 @@ static int _X_COLD
|
||||||
SProcSecurityQueryVersion(ClientPtr client)
|
SProcSecurityQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSecurityQueryVersionReq);
|
REQUEST(xSecurityQueryVersionReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSecurityQueryVersionReq);
|
REQUEST_SIZE_MATCH(xSecurityQueryVersionReq);
|
||||||
swaps(&stuff->majorVersion);
|
swaps(&stuff->majorVersion);
|
||||||
swaps(&stuff->minorVersion);
|
swaps(&stuff->minorVersion);
|
||||||
|
@ -628,8 +626,6 @@ SProcSecurityGenerateAuthorization(ClientPtr client)
|
||||||
CARD32 *values;
|
CARD32 *values;
|
||||||
unsigned long nvalues;
|
unsigned long nvalues;
|
||||||
int values_offset;
|
int values_offset;
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xSecurityGenerateAuthorizationReq);
|
REQUEST_AT_LEAST_SIZE(xSecurityGenerateAuthorizationReq);
|
||||||
swaps(&stuff->nbytesAuthProto);
|
swaps(&stuff->nbytesAuthProto);
|
||||||
swaps(&stuff->nbytesAuthData);
|
swaps(&stuff->nbytesAuthData);
|
||||||
|
@ -637,10 +633,10 @@ SProcSecurityGenerateAuthorization(ClientPtr client)
|
||||||
values_offset = bytes_to_int32(stuff->nbytesAuthProto) +
|
values_offset = bytes_to_int32(stuff->nbytesAuthProto) +
|
||||||
bytes_to_int32(stuff->nbytesAuthData);
|
bytes_to_int32(stuff->nbytesAuthData);
|
||||||
if (values_offset >
|
if (values_offset >
|
||||||
stuff->length - bytes_to_int32(sz_xSecurityGenerateAuthorizationReq))
|
client->req_len - bytes_to_int32(sz_xSecurityGenerateAuthorizationReq))
|
||||||
return BadLength;
|
return BadLength;
|
||||||
values = (CARD32 *) (&stuff[1]) + values_offset;
|
values = (CARD32 *) (&stuff[1]) + values_offset;
|
||||||
nvalues = (((CARD32 *) stuff) + stuff->length) - values;
|
nvalues = (((CARD32 *) stuff) + client->req_len) - values;
|
||||||
SwapLongs(values, nvalues);
|
SwapLongs(values, nvalues);
|
||||||
return ProcSecurityGenerateAuthorization(client);
|
return ProcSecurityGenerateAuthorization(client);
|
||||||
} /* SProcSecurityGenerateAuthorization */
|
} /* SProcSecurityGenerateAuthorization */
|
||||||
|
@ -649,8 +645,6 @@ static int _X_COLD
|
||||||
SProcSecurityRevokeAuthorization(ClientPtr client)
|
SProcSecurityRevokeAuthorization(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSecurityRevokeAuthorizationReq);
|
REQUEST(xSecurityRevokeAuthorizationReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq);
|
REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq);
|
||||||
swapl(&stuff->authId);
|
swapl(&stuff->authId);
|
||||||
return ProcSecurityRevokeAuthorization(client);
|
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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <X11/X.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/dix_priv.h"
|
||||||
#include "dix/gc_priv.h"
|
#include "dix/gc_priv.h"
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
|
@ -47,7 +46,6 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#include "opaque.h"
|
#include "opaque.h"
|
||||||
#include "regionstr.h"
|
#include "regionstr.h"
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
#include "extinit_priv.h"
|
|
||||||
#include "protocol-versions.h"
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
typedef RegionPtr (*CreateDftPtr) (WindowPtr /* pWin */
|
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
|
* externally by the Xfixes extension and are now defined in window.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef XINERAMA
|
||||||
#include "panoramiX.h"
|
#include "panoramiX.h"
|
||||||
#include "panoramiXsrv.h"
|
#include "panoramiXsrv.h"
|
||||||
#endif
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
|
Bool noShapeExtension = FALSE;
|
||||||
|
|
||||||
static int ShapeEventBase = 0;
|
static int ShapeEventBase = 0;
|
||||||
static RESTYPE ClientType, ShapeEventType; /* resource types for event masks */
|
static RESTYPE ClientType, ShapeEventType; /* resource types for event masks */
|
||||||
|
@ -227,24 +227,16 @@ ProcShapeQueryVersion(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************
|
|
||||||
* ProcShapeRectangles
|
|
||||||
*
|
|
||||||
*****************/
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcShapeRectangles(ClientPtr client)
|
ShapeRectangles(ClientPtr client, xShapeRectanglesReq *stuff)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
|
||||||
REQUEST(xShapeRectanglesReq);
|
|
||||||
xRectangle *prects;
|
xRectangle *prects;
|
||||||
int nrects, ctype, rc;
|
int nrects, ctype, rc;
|
||||||
RegionPtr srcRgn;
|
RegionPtr srcRgn;
|
||||||
RegionPtr *destRgn;
|
RegionPtr *destRgn;
|
||||||
CreateDftPtr createDefault;
|
CreateDftPtr createDefault;
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq);
|
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess);
|
rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
@ -268,7 +260,7 @@ ProcShapeRectangles(ClientPtr client)
|
||||||
client->errorValue = stuff->ordering;
|
client->errorValue = stuff->ordering;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
nrects = ((stuff->length << 2) - sizeof(xShapeRectanglesReq));
|
nrects = ((client->req_len << 2) - sizeof(xShapeRectanglesReq));
|
||||||
if (nrects & 4)
|
if (nrects & 4)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
nrects >>= 3;
|
nrects >>= 3;
|
||||||
|
@ -299,16 +291,19 @@ ProcShapeRectangles(ClientPtr client)
|
||||||
stuff->xOff, stuff->yOff, createDefault);
|
stuff->xOff, stuff->yOff, createDefault);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
|
||||||
static int
|
static int
|
||||||
ProcPanoramiXShapeRectangles(ClientPtr client)
|
ProcShapeRectangles(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeRectanglesReq);
|
REQUEST(xShapeRectanglesReq);
|
||||||
|
REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq);
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
|
if (noPanoramiXExtension)
|
||||||
|
return ShapeRectangles(client, stuff);
|
||||||
|
|
||||||
PanoramiXRes *win;
|
PanoramiXRes *win;
|
||||||
int j, result;
|
int j, result;
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq);
|
|
||||||
|
|
||||||
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
||||||
client, DixWriteAccess);
|
client, DixWriteAccess);
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
|
@ -316,32 +311,27 @@ ProcPanoramiXShapeRectangles(ClientPtr client)
|
||||||
|
|
||||||
FOR_NSCREENS(j) {
|
FOR_NSCREENS(j) {
|
||||||
stuff->dest = win->info[j].id;
|
stuff->dest = win->info[j].id;
|
||||||
result = ProcShapeRectangles(client);
|
result = ShapeRectangles(client, stuff);
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
#else
|
||||||
|
return ShapeRectangles(client);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
/**************
|
|
||||||
* ProcShapeMask
|
|
||||||
**************/
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcShapeMask(ClientPtr client)
|
ShapeMask(ClientPtr client, xShapeMaskReq *stuff)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
|
|
||||||
REQUEST(xShapeMaskReq);
|
|
||||||
RegionPtr srcRgn;
|
RegionPtr srcRgn;
|
||||||
RegionPtr *destRgn;
|
RegionPtr *destRgn;
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
CreateDftPtr createDefault;
|
CreateDftPtr createDefault;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xShapeMaskReq);
|
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess);
|
rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
@ -397,16 +387,19 @@ ProcShapeMask(ClientPtr client)
|
||||||
stuff->xOff, stuff->yOff, createDefault);
|
stuff->xOff, stuff->yOff, createDefault);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
|
||||||
static int
|
static int
|
||||||
ProcPanoramiXShapeMask(ClientPtr client)
|
ProcShapeMask(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeMaskReq);
|
REQUEST(xShapeMaskReq);
|
||||||
|
REQUEST_SIZE_MATCH(xShapeMaskReq);
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
|
if (noPanoramiXExtension)
|
||||||
|
return ShapeMask(client, stuff);
|
||||||
|
|
||||||
PanoramiXRes *win, *pmap;
|
PanoramiXRes *win, *pmap;
|
||||||
int j, result;
|
int j, result;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xShapeMaskReq);
|
|
||||||
|
|
||||||
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
||||||
client, DixWriteAccess);
|
client, DixWriteAccess);
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
|
@ -425,24 +418,20 @@ ProcPanoramiXShapeMask(ClientPtr client)
|
||||||
stuff->dest = win->info[j].id;
|
stuff->dest = win->info[j].id;
|
||||||
if (pmap)
|
if (pmap)
|
||||||
stuff->src = pmap->info[j].id;
|
stuff->src = pmap->info[j].id;
|
||||||
result = ProcShapeMask(client);
|
result = ShapeMask(client, stuff);
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
#else
|
||||||
|
return ShapeMask(client, stuff);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
/************
|
|
||||||
* ProcShapeCombine
|
|
||||||
************/
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcShapeCombine(ClientPtr client)
|
ShapeCombine(ClientPtr client, xShapeCombineReq *stuff)
|
||||||
{
|
{
|
||||||
WindowPtr pSrcWin, pDestWin;
|
WindowPtr pSrcWin, pDestWin;
|
||||||
|
|
||||||
REQUEST(xShapeCombineReq);
|
|
||||||
RegionPtr srcRgn;
|
RegionPtr srcRgn;
|
||||||
RegionPtr *destRgn;
|
RegionPtr *destRgn;
|
||||||
CreateDftPtr createDefault;
|
CreateDftPtr createDefault;
|
||||||
|
@ -450,7 +439,6 @@ ProcShapeCombine(ClientPtr client)
|
||||||
RegionPtr tmp;
|
RegionPtr tmp;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xShapeCombineReq);
|
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
rc = dixLookupWindow(&pDestWin, stuff->dest, client, DixSetAttrAccess);
|
rc = dixLookupWindow(&pDestWin, stuff->dest, client, DixSetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
@ -525,16 +513,19 @@ ProcShapeCombine(ClientPtr client)
|
||||||
stuff->xOff, stuff->yOff, createDefault);
|
stuff->xOff, stuff->yOff, createDefault);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
|
||||||
static int
|
static int
|
||||||
ProcPanoramiXShapeCombine(ClientPtr client)
|
ProcShapeCombine(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeCombineReq);
|
REQUEST(xShapeCombineReq);
|
||||||
|
REQUEST_AT_LEAST_SIZE(xShapeCombineReq);
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
|
if (noPanoramiXExtension)
|
||||||
|
return ShapeCombine(client, stuff);
|
||||||
|
|
||||||
PanoramiXRes *win, *win2;
|
PanoramiXRes *win, *win2;
|
||||||
int j, result;
|
int j, result;
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xShapeCombineReq);
|
|
||||||
|
|
||||||
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
||||||
client, DixWriteAccess);
|
client, DixWriteAccess);
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
|
@ -548,28 +539,23 @@ ProcPanoramiXShapeCombine(ClientPtr client)
|
||||||
FOR_NSCREENS(j) {
|
FOR_NSCREENS(j) {
|
||||||
stuff->dest = win->info[j].id;
|
stuff->dest = win->info[j].id;
|
||||||
stuff->src = win2->info[j].id;
|
stuff->src = win2->info[j].id;
|
||||||
result = ProcShapeCombine(client);
|
result = ShapeCombine(client, stuff);
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
#else
|
||||||
|
return ShapeCombine(client, stuff);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
/*************
|
|
||||||
* ProcShapeOffset
|
|
||||||
*************/
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcShapeOffset(ClientPtr client)
|
ShapeOffset(ClientPtr client, xShapeOffsetReq *stuff)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
|
||||||
REQUEST(xShapeOffsetReq);
|
|
||||||
RegionPtr srcRgn;
|
RegionPtr srcRgn;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xShapeOffsetReq);
|
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess);
|
rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
@ -596,15 +582,18 @@ ProcShapeOffset(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
|
||||||
static int
|
static int
|
||||||
ProcPanoramiXShapeOffset(ClientPtr client)
|
ProcShapeOffset(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeOffsetReq);
|
REQUEST(xShapeOffsetReq);
|
||||||
|
REQUEST_AT_LEAST_SIZE(xShapeOffsetReq);
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
PanoramiXRes *win;
|
PanoramiXRes *win;
|
||||||
int j, result;
|
int j, result;
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xShapeOffsetReq);
|
if (noPanoramiXExtension)
|
||||||
|
return ShapeOffset(client, stuff);
|
||||||
|
|
||||||
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
||||||
client, DixWriteAccess);
|
client, DixWriteAccess);
|
||||||
|
@ -613,13 +602,15 @@ ProcPanoramiXShapeOffset(ClientPtr client)
|
||||||
|
|
||||||
FOR_NSCREENS(j) {
|
FOR_NSCREENS(j) {
|
||||||
stuff->dest = win->info[j].id;
|
stuff->dest = win->info[j].id;
|
||||||
result = ProcShapeOffset(client);
|
result = ShapeOffset(client, stuff);
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
#else
|
||||||
|
return ShapeOffset(client, stuff);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcShapeQueryExtents(ClientPtr client)
|
ProcShapeQueryExtents(ClientPtr client)
|
||||||
|
@ -1037,33 +1028,13 @@ ProcShapeDispatch(ClientPtr client)
|
||||||
case X_ShapeQueryVersion:
|
case X_ShapeQueryVersion:
|
||||||
return ProcShapeQueryVersion(client);
|
return ProcShapeQueryVersion(client);
|
||||||
case X_ShapeRectangles:
|
case X_ShapeRectangles:
|
||||||
#ifdef PANORAMIX
|
return ProcShapeRectangles(client);
|
||||||
if (!noPanoramiXExtension)
|
|
||||||
return ProcPanoramiXShapeRectangles(client);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
return ProcShapeRectangles(client);
|
|
||||||
case X_ShapeMask:
|
case X_ShapeMask:
|
||||||
#ifdef PANORAMIX
|
return ProcShapeMask(client);
|
||||||
if (!noPanoramiXExtension)
|
|
||||||
return ProcPanoramiXShapeMask(client);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
return ProcShapeMask(client);
|
|
||||||
case X_ShapeCombine:
|
case X_ShapeCombine:
|
||||||
#ifdef PANORAMIX
|
return ProcShapeCombine(client);
|
||||||
if (!noPanoramiXExtension)
|
|
||||||
return ProcPanoramiXShapeCombine(client);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
return ProcShapeCombine(client);
|
|
||||||
case X_ShapeOffset:
|
case X_ShapeOffset:
|
||||||
#ifdef PANORAMIX
|
return ProcShapeOffset(client);
|
||||||
if (!noPanoramiXExtension)
|
|
||||||
return ProcPanoramiXShapeOffset(client);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
return ProcShapeOffset(client);
|
|
||||||
case X_ShapeQueryExtents:
|
case X_ShapeQueryExtents:
|
||||||
return ProcShapeQueryExtents(client);
|
return ProcShapeQueryExtents(client);
|
||||||
case X_ShapeSelectInput:
|
case X_ShapeSelectInput:
|
||||||
|
@ -1092,21 +1063,10 @@ SShapeNotifyEvent(xShapeNotifyEvent * from, xShapeNotifyEvent * to)
|
||||||
to->shaped = from->shaped;
|
to->shaped = from->shaped;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
|
||||||
SProcShapeQueryVersion(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xShapeQueryVersionReq);
|
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
return ProcShapeQueryVersion(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
SProcShapeRectangles(ClientPtr client)
|
SProcShapeRectangles(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeRectanglesReq);
|
REQUEST(xShapeRectanglesReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq);
|
REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq);
|
||||||
swapl(&stuff->dest);
|
swapl(&stuff->dest);
|
||||||
swaps(&stuff->xOff);
|
swaps(&stuff->xOff);
|
||||||
|
@ -1119,8 +1079,6 @@ static int _X_COLD
|
||||||
SProcShapeMask(ClientPtr client)
|
SProcShapeMask(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeMaskReq);
|
REQUEST(xShapeMaskReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xShapeMaskReq);
|
REQUEST_SIZE_MATCH(xShapeMaskReq);
|
||||||
swapl(&stuff->dest);
|
swapl(&stuff->dest);
|
||||||
swaps(&stuff->xOff);
|
swaps(&stuff->xOff);
|
||||||
|
@ -1133,8 +1091,6 @@ static int _X_COLD
|
||||||
SProcShapeCombine(ClientPtr client)
|
SProcShapeCombine(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeCombineReq);
|
REQUEST(xShapeCombineReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xShapeCombineReq);
|
REQUEST_SIZE_MATCH(xShapeCombineReq);
|
||||||
swapl(&stuff->dest);
|
swapl(&stuff->dest);
|
||||||
swaps(&stuff->xOff);
|
swaps(&stuff->xOff);
|
||||||
|
@ -1147,8 +1103,6 @@ static int _X_COLD
|
||||||
SProcShapeOffset(ClientPtr client)
|
SProcShapeOffset(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeOffsetReq);
|
REQUEST(xShapeOffsetReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xShapeOffsetReq);
|
REQUEST_SIZE_MATCH(xShapeOffsetReq);
|
||||||
swapl(&stuff->dest);
|
swapl(&stuff->dest);
|
||||||
swaps(&stuff->xOff);
|
swaps(&stuff->xOff);
|
||||||
|
@ -1160,8 +1114,6 @@ static int _X_COLD
|
||||||
SProcShapeQueryExtents(ClientPtr client)
|
SProcShapeQueryExtents(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeQueryExtentsReq);
|
REQUEST(xShapeQueryExtentsReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xShapeQueryExtentsReq);
|
REQUEST_SIZE_MATCH(xShapeQueryExtentsReq);
|
||||||
swapl(&stuff->window);
|
swapl(&stuff->window);
|
||||||
return ProcShapeQueryExtents(client);
|
return ProcShapeQueryExtents(client);
|
||||||
|
@ -1171,8 +1123,6 @@ static int _X_COLD
|
||||||
SProcShapeSelectInput(ClientPtr client)
|
SProcShapeSelectInput(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeSelectInputReq);
|
REQUEST(xShapeSelectInputReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xShapeSelectInputReq);
|
REQUEST_SIZE_MATCH(xShapeSelectInputReq);
|
||||||
swapl(&stuff->window);
|
swapl(&stuff->window);
|
||||||
return ProcShapeSelectInput(client);
|
return ProcShapeSelectInput(client);
|
||||||
|
@ -1182,8 +1132,6 @@ static int _X_COLD
|
||||||
SProcShapeInputSelected(ClientPtr client)
|
SProcShapeInputSelected(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeInputSelectedReq);
|
REQUEST(xShapeInputSelectedReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xShapeInputSelectedReq);
|
REQUEST_SIZE_MATCH(xShapeInputSelectedReq);
|
||||||
swapl(&stuff->window);
|
swapl(&stuff->window);
|
||||||
return ProcShapeInputSelected(client);
|
return ProcShapeInputSelected(client);
|
||||||
|
@ -1193,7 +1141,6 @@ static int _X_COLD
|
||||||
SProcShapeGetRectangles(ClientPtr client)
|
SProcShapeGetRectangles(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeGetRectanglesReq);
|
REQUEST(xShapeGetRectanglesReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xShapeGetRectanglesReq);
|
REQUEST_SIZE_MATCH(xShapeGetRectanglesReq);
|
||||||
swapl(&stuff->window);
|
swapl(&stuff->window);
|
||||||
return ProcShapeGetRectangles(client);
|
return ProcShapeGetRectangles(client);
|
||||||
|
@ -1205,7 +1152,7 @@ SProcShapeDispatch(ClientPtr client)
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
switch (stuff->data) {
|
switch (stuff->data) {
|
||||||
case X_ShapeQueryVersion:
|
case X_ShapeQueryVersion:
|
||||||
return SProcShapeQueryVersion(client);
|
return ProcShapeQueryVersion(client);
|
||||||
case X_ShapeRectangles:
|
case X_ShapeRectangles:
|
||||||
return SProcShapeRectangles(client);
|
return SProcShapeRectangles(client);
|
||||||
case X_ShapeMask:
|
case X_ShapeMask:
|
||||||
|
|
231
Xext/shm.c
231
Xext/shm.c
|
@ -28,9 +28,7 @@ in this Software without prior written authorization from The Open Group.
|
||||||
|
|
||||||
#define SHM
|
#define SHM
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/ipc.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 <X11/Xfuncproto.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
#include "os/auth.h"
|
#include "os/auth.h"
|
||||||
#include "os/busfault.h"
|
#include "os/busfault.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
@ -61,7 +61,6 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#include "servermd.h"
|
#include "servermd.h"
|
||||||
#include "shmint.h"
|
#include "shmint.h"
|
||||||
#include "xace.h"
|
#include "xace.h"
|
||||||
#include "extinit_priv.h"
|
|
||||||
#include "protocol-versions.h"
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
/* Needed for Solaris cross-zone shared memory extension */
|
/* Needed for Solaris cross-zone shared memory extension */
|
||||||
|
@ -91,15 +90,13 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#define SHMPERM_MODE(p) p->mode
|
#define SHMPERM_MODE(p) p->mode
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef XINERAMA
|
||||||
#include "panoramiX.h"
|
#include "panoramiX.h"
|
||||||
#include "panoramiXsrv.h"
|
#include "panoramiXsrv.h"
|
||||||
#endif
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
typedef struct _ShmScrPrivateRec {
|
typedef struct _ShmScrPrivateRec {
|
||||||
CloseScreenProcPtr CloseScreen;
|
|
||||||
ShmFuncsPtr shmFuncs;
|
ShmFuncsPtr shmFuncs;
|
||||||
DestroyPixmapProcPtr destroyPixmap;
|
|
||||||
} ShmScrPrivateRec;
|
} ShmScrPrivateRec;
|
||||||
|
|
||||||
static PixmapPtr fbShmCreatePixmap(XSHM_CREATE_PIXMAP_ARGS);
|
static PixmapPtr fbShmCreatePixmap(XSHM_CREATE_PIXMAP_ARGS);
|
||||||
|
@ -108,7 +105,9 @@ static void ShmResetProc(ExtensionEntry *extEntry);
|
||||||
static void SShmCompletionEvent(xShmCompletionEvent *from,
|
static void SShmCompletionEvent(xShmCompletionEvent *from,
|
||||||
xShmCompletionEvent *to);
|
xShmCompletionEvent *to);
|
||||||
|
|
||||||
static Bool ShmDestroyPixmap(PixmapPtr pPixmap);
|
static int ShmCreatePixmap(ClientPtr client, xShmCreatePixmapReq *stuff);
|
||||||
|
|
||||||
|
Bool noMITShmExtension = FALSE;
|
||||||
|
|
||||||
static unsigned char ShmReqCode;
|
static unsigned char ShmReqCode;
|
||||||
int ShmCompletionCode;
|
int ShmCompletionCode;
|
||||||
|
@ -156,7 +155,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;
|
static Bool badSysCall = FALSE;
|
||||||
|
|
||||||
|
@ -194,15 +193,13 @@ CheckForShmSyscall(void)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static Bool
|
static void
|
||||||
ShmCloseScreen(ScreenPtr pScreen)
|
ShmScreenClose(ScreenPtr pScreen, void *arg)
|
||||||
{
|
{
|
||||||
ShmScrPrivateRec *screen_priv = ShmGetScreenPriv(pScreen);
|
ShmScrPrivateRec *screen_priv = ShmGetScreenPriv(pScreen);
|
||||||
|
|
||||||
pScreen->CloseScreen = screen_priv->CloseScreen;
|
|
||||||
dixSetPrivate(&pScreen->devPrivates, shmScrPrivateKey, NULL);
|
dixSetPrivate(&pScreen->devPrivates, shmScrPrivateKey, NULL);
|
||||||
free(screen_priv);
|
free(screen_priv);
|
||||||
return (*pScreen->CloseScreen) (pScreen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ShmScrPrivateRec *
|
static ShmScrPrivateRec *
|
||||||
|
@ -212,9 +209,8 @@ ShmInitScreenPriv(ScreenPtr pScreen)
|
||||||
|
|
||||||
if (!screen_priv) {
|
if (!screen_priv) {
|
||||||
screen_priv = calloc(1, sizeof(ShmScrPrivateRec));
|
screen_priv = calloc(1, sizeof(ShmScrPrivateRec));
|
||||||
screen_priv->CloseScreen = pScreen->CloseScreen;
|
|
||||||
dixSetPrivate(&pScreen->devPrivates, shmScrPrivateKey, screen_priv);
|
dixSetPrivate(&pScreen->devPrivates, shmScrPrivateKey, screen_priv);
|
||||||
pScreen->CloseScreen = ShmCloseScreen;
|
dixScreenHookClose(pScreen, ShmScreenClose, NULL);
|
||||||
}
|
}
|
||||||
return screen_priv;
|
return screen_priv;
|
||||||
}
|
}
|
||||||
|
@ -246,27 +242,6 @@ ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs)
|
||||||
ShmInitScreenPriv(pScreen)->shmFuncs = funcs;
|
ShmInitScreenPriv(pScreen)->shmFuncs = funcs;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
|
||||||
ShmDestroyPixmap(PixmapPtr pPixmap)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
|
||||||
ShmScrPrivateRec *screen_priv = ShmGetScreenPriv(pScreen);
|
|
||||||
void *shmdesc = NULL;
|
|
||||||
Bool ret;
|
|
||||||
|
|
||||||
if (pPixmap->refcnt == 1)
|
|
||||||
shmdesc = dixLookupPrivate(&pPixmap->devPrivates, shmPixmapPrivateKey);
|
|
||||||
|
|
||||||
pScreen->DestroyPixmap = screen_priv->destroyPixmap;
|
|
||||||
ret = (*pScreen->DestroyPixmap) (pPixmap);
|
|
||||||
screen_priv->destroyPixmap = pScreen->DestroyPixmap;
|
|
||||||
pScreen->DestroyPixmap = ShmDestroyPixmap;
|
|
||||||
|
|
||||||
if (shmdesc)
|
|
||||||
ShmDetachSegment(shmdesc, 0);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ShmRegisterFbFuncs(ScreenPtr pScreen)
|
ShmRegisterFbFuncs(ScreenPtr pScreen)
|
||||||
|
@ -372,12 +347,15 @@ shm_access(ClientPtr client, SHMPERM_TYPE * perm, int readonly)
|
||||||
static int
|
static int
|
||||||
ProcShmAttach(ClientPtr client)
|
ProcShmAttach(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST(xShmAttachReq);
|
||||||
|
REQUEST_SIZE_MATCH(xShmAttachReq);
|
||||||
|
|
||||||
|
if (!client->local)
|
||||||
|
return BadRequest;
|
||||||
|
|
||||||
SHMSTAT_TYPE buf;
|
SHMSTAT_TYPE buf;
|
||||||
ShmDescPtr shmdesc;
|
ShmDescPtr shmdesc;
|
||||||
|
|
||||||
REQUEST(xShmAttachReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xShmAttachReq);
|
|
||||||
LEGAL_NEW_RESOURCE(stuff->shmseg, client);
|
LEGAL_NEW_RESOURCE(stuff->shmseg, client);
|
||||||
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
|
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
|
||||||
client->errorValue = stuff->readOnly;
|
client->errorValue = stuff->readOnly;
|
||||||
|
@ -435,6 +413,9 @@ ShmDetachSegment(void *value, /* must conform to DeleteType */
|
||||||
ShmDescPtr shmdesc = (ShmDescPtr) value;
|
ShmDescPtr shmdesc = (ShmDescPtr) value;
|
||||||
ShmDescPtr *prev;
|
ShmDescPtr *prev;
|
||||||
|
|
||||||
|
if (!shmdesc)
|
||||||
|
return Success;
|
||||||
|
|
||||||
if (--shmdesc->refcnt)
|
if (--shmdesc->refcnt)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
#if SHM_FD_PASSING
|
#if SHM_FD_PASSING
|
||||||
|
@ -454,11 +435,14 @@ ShmDetachSegment(void *value, /* must conform to DeleteType */
|
||||||
static int
|
static int
|
||||||
ProcShmDetach(ClientPtr client)
|
ProcShmDetach(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST(xShmDetachReq);
|
||||||
|
REQUEST_SIZE_MATCH(xShmDetachReq);
|
||||||
|
|
||||||
|
if (!client->local)
|
||||||
|
return BadRequest;
|
||||||
|
|
||||||
ShmDescPtr shmdesc;
|
ShmDescPtr shmdesc;
|
||||||
|
|
||||||
REQUEST(xShmDetachReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xShmDetachReq);
|
|
||||||
VERIFY_SHMSEG(stuff->shmseg, shmdesc, client);
|
VERIFY_SHMSEG(stuff->shmseg, shmdesc, client);
|
||||||
FreeResource(stuff->shmseg, X11_RESTYPE_NONE);
|
FreeResource(stuff->shmseg, X11_RESTYPE_NONE);
|
||||||
return Success;
|
return Success;
|
||||||
|
@ -510,21 +494,18 @@ doShmPutImage(DrawablePtr dst, GCPtr pGC,
|
||||||
else
|
else
|
||||||
(void) (*pGC->ops->CopyArea) (&pPixmap->drawable, dst, pGC, 0, 0,
|
(void) (*pGC->ops->CopyArea) (&pPixmap->drawable, dst, pGC, 0, 0,
|
||||||
sw, sh, dx, dy);
|
sw, sh, dx, dy);
|
||||||
(*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap);
|
dixDestroyPixmap(pPixmap, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcShmPutImage(ClientPtr client)
|
ShmPutImage(ClientPtr client, xShmPutImageReq *stuff)
|
||||||
{
|
{
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
long length;
|
long length;
|
||||||
ShmDescPtr shmdesc;
|
ShmDescPtr shmdesc;
|
||||||
|
|
||||||
REQUEST(xShmPutImageReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xShmPutImageReq);
|
|
||||||
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
|
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
|
||||||
VERIFY_SHMPTR(stuff->shmseg, stuff->offset, FALSE, shmdesc, client);
|
VERIFY_SHMPTR(stuff->shmseg, stuff->offset, FALSE, shmdesc, client);
|
||||||
if ((stuff->sendEvent != xTrue) && (stuff->sendEvent != xFalse))
|
if ((stuff->sendEvent != xTrue) && (stuff->sendEvent != xFalse))
|
||||||
|
@ -614,7 +595,7 @@ ProcShmPutImage(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcShmGetImage(ClientPtr client)
|
ShmGetImage(ClientPtr client, xShmGetImageReq *stuff)
|
||||||
{
|
{
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
long lenPer = 0, length;
|
long lenPer = 0, length;
|
||||||
|
@ -625,9 +606,6 @@ ProcShmGetImage(ClientPtr client)
|
||||||
RegionPtr pVisibleRegion = NULL;
|
RegionPtr pVisibleRegion = NULL;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST(xShmGetImageReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xShmGetImageReq);
|
|
||||||
if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) {
|
if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) {
|
||||||
client->errorValue = stuff->format;
|
client->errorValue = stuff->format;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
|
@ -732,16 +710,22 @@ ProcShmGetImage(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
|
||||||
static int
|
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;
|
int j, result, orig_x, orig_y;
|
||||||
PanoramiXRes *draw, *gc;
|
PanoramiXRes *draw, *gc;
|
||||||
Bool sendEvent, isRoot;
|
Bool sendEvent, isRoot;
|
||||||
|
|
||||||
REQUEST(xShmPutImageReq);
|
if (noPanoramiXExtension)
|
||||||
REQUEST_SIZE_MATCH(xShmPutImageReq);
|
return ShmPutImage(client, stuff);
|
||||||
|
|
||||||
result = dixLookupResourceByClass((void **) &draw, stuff->drawable,
|
result = dixLookupResourceByClass((void **) &draw, stuff->drawable,
|
||||||
XRC_DRAWABLE, client, DixWriteAccess);
|
XRC_DRAWABLE, client, DixWriteAccess);
|
||||||
|
@ -768,16 +752,26 @@ ProcPanoramiXShmPutImage(ClientPtr client)
|
||||||
stuff->dstX = orig_x - screenInfo.screens[j]->x;
|
stuff->dstX = orig_x - screenInfo.screens[j]->x;
|
||||||
stuff->dstY = orig_y - screenInfo.screens[j]->y;
|
stuff->dstY = orig_y - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
result = ProcShmPutImage(client);
|
result = ShmPutImage(client, stuff);
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
#else
|
||||||
|
return ShmPutImage(client, stuff);
|
||||||
|
#endif /* XINERAMA */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcPanoramiXShmGetImage(ClientPtr client)
|
ProcShmGetImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST(xShmGetImageReq);
|
||||||
|
REQUEST_SIZE_MATCH(xShmGetImageReq);
|
||||||
|
|
||||||
|
if (!client->local)
|
||||||
|
return BadRequest;
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
PanoramiXRes *draw;
|
PanoramiXRes *draw;
|
||||||
DrawablePtr *drawables;
|
DrawablePtr *drawables;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
@ -788,9 +782,8 @@ ProcPanoramiXShmGetImage(ClientPtr client)
|
||||||
long lenPer = 0, length, widthBytesLine;
|
long lenPer = 0, length, widthBytesLine;
|
||||||
Bool isRoot;
|
Bool isRoot;
|
||||||
|
|
||||||
REQUEST(xShmGetImageReq);
|
if (noPanoramiXExtension)
|
||||||
|
return ShmGetImage(client, stuff);
|
||||||
REQUEST_SIZE_MATCH(xShmGetImageReq);
|
|
||||||
|
|
||||||
if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) {
|
if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) {
|
||||||
client->errorValue = stuff->format;
|
client->errorValue = stuff->format;
|
||||||
|
@ -803,7 +796,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
|
||||||
return (rc == BadValue) ? BadDrawable : rc;
|
return (rc == BadValue) ? BadDrawable : rc;
|
||||||
|
|
||||||
if (draw->type == XRT_PIXMAP)
|
if (draw->type == XRT_PIXMAP)
|
||||||
return ProcShmGetImage(client);
|
return ShmGetImage(client, stuff);
|
||||||
|
|
||||||
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixReadAccess);
|
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixReadAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
@ -914,24 +907,34 @@ ProcPanoramiXShmGetImage(ClientPtr client)
|
||||||
WriteToClient(client, sizeof(xShmGetImageReply), &xgi);
|
WriteToClient(client, sizeof(xShmGetImageReply), &xgi);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
#else
|
||||||
|
return ShmGetImage(client, stuff);
|
||||||
|
#endif /* XINERAMA */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
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;
|
ScreenPtr pScreen = NULL;
|
||||||
PixmapPtr pMap = NULL;
|
PixmapPtr pMap = NULL;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
DepthPtr pDepth;
|
DepthPtr pDepth;
|
||||||
int i, j, result, rc;
|
int i, j, result, rc;
|
||||||
ShmDescPtr shmdesc;
|
ShmDescPtr shmdesc;
|
||||||
|
|
||||||
REQUEST(xShmCreatePixmapReq);
|
|
||||||
unsigned int width, height, depth;
|
unsigned int width, height, depth;
|
||||||
unsigned long size;
|
unsigned long size;
|
||||||
PanoramiXRes *newPix;
|
PanoramiXRes *newPix;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xShmCreatePixmapReq);
|
|
||||||
client->errorValue = stuff->pid;
|
client->errorValue = stuff->pid;
|
||||||
if (!sharedPixmaps)
|
if (!sharedPixmaps)
|
||||||
return BadImplementation;
|
return BadImplementation;
|
||||||
|
@ -1000,7 +1003,7 @@ ProcPanoramiXShmCreatePixmap(ClientPtr client)
|
||||||
result = XaceHookResourceAccess(client, stuff->pid,
|
result = XaceHookResourceAccess(client, stuff->pid,
|
||||||
X11_RESTYPE_PIXMAP, pMap, X11_RESTYPE_NONE, NULL, DixCreateAccess);
|
X11_RESTYPE_PIXMAP, pMap, X11_RESTYPE_NONE, NULL, DixCreateAccess);
|
||||||
if (result != Success) {
|
if (result != Success) {
|
||||||
pDraw->pScreen->DestroyPixmap(pMap);
|
dixDestroyPixmap(pMap, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc);
|
dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc);
|
||||||
|
@ -1027,8 +1030,10 @@ ProcPanoramiXShmCreatePixmap(ClientPtr client)
|
||||||
AddResource(stuff->pid, XRT_PIXMAP, newPix);
|
AddResource(stuff->pid, XRT_PIXMAP, newPix);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
#else
|
||||||
|
return ShmCreatePixmap(client, stuff);
|
||||||
|
#endif /* XINERAMA */
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static PixmapPtr
|
static PixmapPtr
|
||||||
fbShmCreatePixmap(ScreenPtr pScreen,
|
fbShmCreatePixmap(ScreenPtr pScreen,
|
||||||
|
@ -1044,14 +1049,14 @@ fbShmCreatePixmap(ScreenPtr pScreen,
|
||||||
BitsPerPixel(depth),
|
BitsPerPixel(depth),
|
||||||
PixmapBytePad(width, depth),
|
PixmapBytePad(width, depth),
|
||||||
(void *) addr)) {
|
(void *) addr)) {
|
||||||
(*pScreen->DestroyPixmap) (pPixmap);
|
dixDestroyPixmap(pPixmap, 0);
|
||||||
return NullPixmap;
|
return NullPixmap;
|
||||||
}
|
}
|
||||||
return pPixmap;
|
return pPixmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcShmCreatePixmap(ClientPtr client)
|
ShmCreatePixmap(ClientPtr client, xShmCreatePixmapReq *stuff)
|
||||||
{
|
{
|
||||||
PixmapPtr pMap;
|
PixmapPtr pMap;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
@ -1059,12 +1064,9 @@ ProcShmCreatePixmap(ClientPtr client)
|
||||||
int i, rc;
|
int i, rc;
|
||||||
ShmDescPtr shmdesc;
|
ShmDescPtr shmdesc;
|
||||||
ShmScrPrivateRec *screen_priv;
|
ShmScrPrivateRec *screen_priv;
|
||||||
|
|
||||||
REQUEST(xShmCreatePixmapReq);
|
|
||||||
unsigned int width, height, depth;
|
unsigned int width, height, depth;
|
||||||
unsigned long size;
|
unsigned long size;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xShmCreatePixmapReq);
|
|
||||||
client->errorValue = stuff->pid;
|
client->errorValue = stuff->pid;
|
||||||
if (!sharedPixmaps)
|
if (!sharedPixmaps)
|
||||||
return BadImplementation;
|
return BadImplementation;
|
||||||
|
@ -1115,7 +1117,7 @@ ProcShmCreatePixmap(ClientPtr client)
|
||||||
rc = XaceHookResourceAccess(client, stuff->pid, X11_RESTYPE_PIXMAP,
|
rc = XaceHookResourceAccess(client, stuff->pid, X11_RESTYPE_PIXMAP,
|
||||||
pMap, X11_RESTYPE_NONE, NULL, DixCreateAccess);
|
pMap, X11_RESTYPE_NONE, NULL, DixCreateAccess);
|
||||||
if (rc != Success) {
|
if (rc != Success) {
|
||||||
pDraw->pScreen->DestroyPixmap(pMap);
|
dixDestroyPixmap(pMap, 0);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc);
|
dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc);
|
||||||
|
@ -1146,19 +1148,24 @@ ShmBusfaultNotify(void *context)
|
||||||
static int
|
static int
|
||||||
ProcShmAttachFd(ClientPtr client)
|
ProcShmAttachFd(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST(xShmAttachFdReq);
|
||||||
|
REQUEST_SIZE_MATCH(xShmAttachFdReq);
|
||||||
|
|
||||||
|
if (!client->local)
|
||||||
|
return BadRequest;
|
||||||
|
|
||||||
int fd;
|
int fd;
|
||||||
ShmDescPtr shmdesc;
|
ShmDescPtr shmdesc;
|
||||||
REQUEST(xShmAttachFdReq);
|
|
||||||
struct stat statb;
|
struct stat statb;
|
||||||
|
|
||||||
SetReqFds(client, 1);
|
|
||||||
REQUEST_SIZE_MATCH(xShmAttachFdReq);
|
|
||||||
LEGAL_NEW_RESOURCE(stuff->shmseg, client);
|
LEGAL_NEW_RESOURCE(stuff->shmseg, client);
|
||||||
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
|
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
|
||||||
client->errorValue = stuff->readOnly;
|
client->errorValue = stuff->readOnly;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
fd = ReadFdFromClient(client);
|
fd = client->recv_fd_list[0];
|
||||||
|
client->recv_fd_list[0] = -1;
|
||||||
|
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
|
|
||||||
|
@ -1261,9 +1268,14 @@ shm_tmpfile(void)
|
||||||
static int
|
static int
|
||||||
ProcShmCreateSegment(ClientPtr client)
|
ProcShmCreateSegment(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST(xShmCreateSegmentReq);
|
||||||
|
REQUEST_SIZE_MATCH(xShmCreateSegmentReq);
|
||||||
|
|
||||||
|
if (!client->local)
|
||||||
|
return BadRequest;
|
||||||
|
|
||||||
int fd;
|
int fd;
|
||||||
ShmDescPtr shmdesc;
|
ShmDescPtr shmdesc;
|
||||||
REQUEST(xShmCreateSegmentReq);
|
|
||||||
xShmCreateSegmentReply rep = {
|
xShmCreateSegmentReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.nfd = 1,
|
.nfd = 1,
|
||||||
|
@ -1271,7 +1283,6 @@ ProcShmCreateSegment(ClientPtr client)
|
||||||
.length = 0,
|
.length = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xShmCreateSegmentReq);
|
|
||||||
LEGAL_NEW_RESOURCE(stuff->shmseg, client);
|
LEGAL_NEW_RESOURCE(stuff->shmseg, client);
|
||||||
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
|
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
|
||||||
client->errorValue = stuff->readOnly;
|
client->errorValue = stuff->readOnly;
|
||||||
|
@ -1336,34 +1347,18 @@ ProcShmDispatch(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
|
|
||||||
if (stuff->data == X_ShmQueryVersion)
|
|
||||||
return ProcShmQueryVersion(client);
|
|
||||||
|
|
||||||
if (!client->local)
|
|
||||||
return BadRequest;
|
|
||||||
|
|
||||||
switch (stuff->data) {
|
switch (stuff->data) {
|
||||||
|
case X_ShmQueryVersion:
|
||||||
|
return ProcShmQueryVersion(client);
|
||||||
case X_ShmAttach:
|
case X_ShmAttach:
|
||||||
return ProcShmAttach(client);
|
return ProcShmAttach(client);
|
||||||
case X_ShmDetach:
|
case X_ShmDetach:
|
||||||
return ProcShmDetach(client);
|
return ProcShmDetach(client);
|
||||||
case X_ShmPutImage:
|
case X_ShmPutImage:
|
||||||
#ifdef PANORAMIX
|
|
||||||
if (!noPanoramiXExtension)
|
|
||||||
return ProcPanoramiXShmPutImage(client);
|
|
||||||
#endif
|
|
||||||
return ProcShmPutImage(client);
|
return ProcShmPutImage(client);
|
||||||
case X_ShmGetImage:
|
case X_ShmGetImage:
|
||||||
#ifdef PANORAMIX
|
|
||||||
if (!noPanoramiXExtension)
|
|
||||||
return ProcPanoramiXShmGetImage(client);
|
|
||||||
#endif
|
|
||||||
return ProcShmGetImage(client);
|
return ProcShmGetImage(client);
|
||||||
case X_ShmCreatePixmap:
|
case X_ShmCreatePixmap:
|
||||||
#ifdef PANORAMIX
|
|
||||||
if (!noPanoramiXExtension)
|
|
||||||
return ProcPanoramiXShmCreatePixmap(client);
|
|
||||||
#endif
|
|
||||||
return ProcShmCreatePixmap(client);
|
return ProcShmCreatePixmap(client);
|
||||||
#ifdef SHM_FD_PASSING
|
#ifdef SHM_FD_PASSING
|
||||||
case X_ShmAttachFd:
|
case X_ShmAttachFd:
|
||||||
|
@ -1388,20 +1383,10 @@ SShmCompletionEvent(xShmCompletionEvent * from, xShmCompletionEvent * to)
|
||||||
cpswapl(from->offset, to->offset);
|
cpswapl(from->offset, to->offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
|
||||||
SProcShmQueryVersion(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xShmQueryVersionReq);
|
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
return ProcShmQueryVersion(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
SProcShmAttach(ClientPtr client)
|
SProcShmAttach(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShmAttachReq);
|
REQUEST(xShmAttachReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xShmAttachReq);
|
REQUEST_SIZE_MATCH(xShmAttachReq);
|
||||||
swapl(&stuff->shmseg);
|
swapl(&stuff->shmseg);
|
||||||
swapl(&stuff->shmid);
|
swapl(&stuff->shmid);
|
||||||
|
@ -1412,7 +1397,6 @@ static int _X_COLD
|
||||||
SProcShmDetach(ClientPtr client)
|
SProcShmDetach(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShmDetachReq);
|
REQUEST(xShmDetachReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xShmDetachReq);
|
REQUEST_SIZE_MATCH(xShmDetachReq);
|
||||||
swapl(&stuff->shmseg);
|
swapl(&stuff->shmseg);
|
||||||
return ProcShmDetach(client);
|
return ProcShmDetach(client);
|
||||||
|
@ -1422,7 +1406,6 @@ static int _X_COLD
|
||||||
SProcShmPutImage(ClientPtr client)
|
SProcShmPutImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShmPutImageReq);
|
REQUEST(xShmPutImageReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xShmPutImageReq);
|
REQUEST_SIZE_MATCH(xShmPutImageReq);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->gc);
|
swapl(&stuff->gc);
|
||||||
|
@ -1443,7 +1426,6 @@ static int _X_COLD
|
||||||
SProcShmGetImage(ClientPtr client)
|
SProcShmGetImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShmGetImageReq);
|
REQUEST(xShmGetImageReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xShmGetImageReq);
|
REQUEST_SIZE_MATCH(xShmGetImageReq);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
swaps(&stuff->x);
|
swaps(&stuff->x);
|
||||||
|
@ -1460,7 +1442,6 @@ static int _X_COLD
|
||||||
SProcShmCreatePixmap(ClientPtr client)
|
SProcShmCreatePixmap(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShmCreatePixmapReq);
|
REQUEST(xShmCreatePixmapReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xShmCreatePixmapReq);
|
REQUEST_SIZE_MATCH(xShmCreatePixmapReq);
|
||||||
swapl(&stuff->pid);
|
swapl(&stuff->pid);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
|
@ -1476,8 +1457,6 @@ static int _X_COLD
|
||||||
SProcShmAttachFd(ClientPtr client)
|
SProcShmAttachFd(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShmAttachFdReq);
|
REQUEST(xShmAttachFdReq);
|
||||||
SetReqFds(client, 1);
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xShmAttachFdReq);
|
REQUEST_SIZE_MATCH(xShmAttachFdReq);
|
||||||
swapl(&stuff->shmseg);
|
swapl(&stuff->shmseg);
|
||||||
return ProcShmAttachFd(client);
|
return ProcShmAttachFd(client);
|
||||||
|
@ -1487,7 +1466,6 @@ static int _X_COLD
|
||||||
SProcShmCreateSegment(ClientPtr client)
|
SProcShmCreateSegment(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShmCreateSegmentReq);
|
REQUEST(xShmCreateSegmentReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xShmCreateSegmentReq);
|
REQUEST_SIZE_MATCH(xShmCreateSegmentReq);
|
||||||
swapl(&stuff->shmseg);
|
swapl(&stuff->shmseg);
|
||||||
swapl(&stuff->size);
|
swapl(&stuff->size);
|
||||||
|
@ -1500,13 +1478,9 @@ SProcShmDispatch(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
|
|
||||||
if (stuff->data == X_ShmQueryVersion)
|
|
||||||
return SProcShmQueryVersion(client);
|
|
||||||
|
|
||||||
if (!client->local)
|
|
||||||
return BadRequest;
|
|
||||||
|
|
||||||
switch (stuff->data) {
|
switch (stuff->data) {
|
||||||
|
case X_ShmQueryVersion:
|
||||||
|
return ProcShmQueryVersion(client);
|
||||||
case X_ShmAttach:
|
case X_ShmAttach:
|
||||||
return SProcShmAttach(client);
|
return SProcShmAttach(client);
|
||||||
case X_ShmDetach:
|
case X_ShmDetach:
|
||||||
|
@ -1528,6 +1502,14 @@ SProcShmDispatch(ClientPtr client)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ShmPixmapDestroy(ScreenPtr pScreen, PixmapPtr pPixmap, void *arg)
|
||||||
|
{
|
||||||
|
ShmDetachSegment(
|
||||||
|
dixLookupPrivate(&pPixmap->devPrivates, shmPixmapPrivateKey),
|
||||||
|
0);
|
||||||
|
dixSetPrivate(&pPixmap->devPrivates, shmPixmapPrivateKey, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ShmExtensionInit(void)
|
ShmExtensionInit(void)
|
||||||
{
|
{
|
||||||
|
@ -1556,13 +1538,8 @@ ShmExtensionInit(void)
|
||||||
sharedPixmaps = xFalse;
|
sharedPixmaps = xFalse;
|
||||||
}
|
}
|
||||||
if (sharedPixmaps)
|
if (sharedPixmaps)
|
||||||
for (i = 0; i < screenInfo.numScreens; i++) {
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
ShmScrPrivateRec *screen_priv =
|
dixScreenHookPixmapDestroy(screenInfo.screens[i], ShmPixmapDestroy, NULL);
|
||||||
ShmGetScreenPriv(screenInfo.screens[i]);
|
|
||||||
screen_priv->destroyPixmap =
|
|
||||||
screenInfo.screens[i]->DestroyPixmap;
|
|
||||||
screenInfo.screens[i]->DestroyPixmap = ShmDestroyPixmap;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ShmSegType = CreateNewResourceType(ShmDetachSegment, "ShmSeg");
|
ShmSegType = CreateNewResourceType(ShmDetachSegment, "ShmSeg");
|
||||||
if (ShmSegType &&
|
if (ShmSegType &&
|
||||||
|
|
|
@ -27,9 +27,7 @@ in this Software without prior written authorization from The Open Group.
|
||||||
|
|
||||||
/* dixsleep.c - implement millisecond timeouts for X clients */
|
/* dixsleep.c - implement millisecond timeouts for X clients */
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "sleepuntil.h"
|
#include "sleepuntil.h"
|
||||||
#include <X11/X.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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -61,6 +59,8 @@ PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <X11/extensions/syncproto.h>
|
#include <X11/extensions/syncproto.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
|
@ -78,8 +78,6 @@ PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "extinit_priv.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Local Global Variables
|
* Local Global Variables
|
||||||
*/
|
*/
|
||||||
|
@ -2152,31 +2150,10 @@ ProcSyncDispatch(ClientPtr client)
|
||||||
* Boring Swapping stuff ...
|
* 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
|
static int _X_COLD
|
||||||
SProcSyncCreateCounter(ClientPtr client)
|
SProcSyncCreateCounter(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncCreateCounterReq);
|
REQUEST(xSyncCreateCounterReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSyncCreateCounterReq);
|
REQUEST_SIZE_MATCH(xSyncCreateCounterReq);
|
||||||
swapl(&stuff->cid);
|
swapl(&stuff->cid);
|
||||||
swapl(&stuff->initial_value_lo);
|
swapl(&stuff->initial_value_lo);
|
||||||
|
@ -2189,7 +2166,6 @@ static int _X_COLD
|
||||||
SProcSyncSetCounter(ClientPtr client)
|
SProcSyncSetCounter(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncSetCounterReq);
|
REQUEST(xSyncSetCounterReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSyncSetCounterReq);
|
REQUEST_SIZE_MATCH(xSyncSetCounterReq);
|
||||||
swapl(&stuff->cid);
|
swapl(&stuff->cid);
|
||||||
swapl(&stuff->value_lo);
|
swapl(&stuff->value_lo);
|
||||||
|
@ -2202,7 +2178,6 @@ static int _X_COLD
|
||||||
SProcSyncChangeCounter(ClientPtr client)
|
SProcSyncChangeCounter(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncChangeCounterReq);
|
REQUEST(xSyncChangeCounterReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSyncChangeCounterReq);
|
REQUEST_SIZE_MATCH(xSyncChangeCounterReq);
|
||||||
swapl(&stuff->cid);
|
swapl(&stuff->cid);
|
||||||
swapl(&stuff->value_lo);
|
swapl(&stuff->value_lo);
|
||||||
|
@ -2215,7 +2190,6 @@ static int _X_COLD
|
||||||
SProcSyncQueryCounter(ClientPtr client)
|
SProcSyncQueryCounter(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncQueryCounterReq);
|
REQUEST(xSyncQueryCounterReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSyncQueryCounterReq);
|
REQUEST_SIZE_MATCH(xSyncQueryCounterReq);
|
||||||
swapl(&stuff->counter);
|
swapl(&stuff->counter);
|
||||||
|
|
||||||
|
@ -2226,7 +2200,6 @@ static int _X_COLD
|
||||||
SProcSyncDestroyCounter(ClientPtr client)
|
SProcSyncDestroyCounter(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncDestroyCounterReq);
|
REQUEST(xSyncDestroyCounterReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSyncDestroyCounterReq);
|
REQUEST_SIZE_MATCH(xSyncDestroyCounterReq);
|
||||||
swapl(&stuff->counter);
|
swapl(&stuff->counter);
|
||||||
|
|
||||||
|
@ -2237,7 +2210,6 @@ static int _X_COLD
|
||||||
SProcSyncAwait(ClientPtr client)
|
SProcSyncAwait(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncAwaitReq);
|
REQUEST(xSyncAwaitReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xSyncAwaitReq);
|
REQUEST_AT_LEAST_SIZE(xSyncAwaitReq);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
|
|
||||||
|
@ -2248,7 +2220,6 @@ static int _X_COLD
|
||||||
SProcSyncCreateAlarm(ClientPtr client)
|
SProcSyncCreateAlarm(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncCreateAlarmReq);
|
REQUEST(xSyncCreateAlarmReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xSyncCreateAlarmReq);
|
REQUEST_AT_LEAST_SIZE(xSyncCreateAlarmReq);
|
||||||
swapl(&stuff->id);
|
swapl(&stuff->id);
|
||||||
swapl(&stuff->valueMask);
|
swapl(&stuff->valueMask);
|
||||||
|
@ -2261,7 +2232,6 @@ static int _X_COLD
|
||||||
SProcSyncChangeAlarm(ClientPtr client)
|
SProcSyncChangeAlarm(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncChangeAlarmReq);
|
REQUEST(xSyncChangeAlarmReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq);
|
REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq);
|
||||||
swapl(&stuff->alarm);
|
swapl(&stuff->alarm);
|
||||||
swapl(&stuff->valueMask);
|
swapl(&stuff->valueMask);
|
||||||
|
@ -2273,7 +2243,6 @@ static int _X_COLD
|
||||||
SProcSyncQueryAlarm(ClientPtr client)
|
SProcSyncQueryAlarm(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncQueryAlarmReq);
|
REQUEST(xSyncQueryAlarmReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSyncQueryAlarmReq);
|
REQUEST_SIZE_MATCH(xSyncQueryAlarmReq);
|
||||||
swapl(&stuff->alarm);
|
swapl(&stuff->alarm);
|
||||||
|
|
||||||
|
@ -2284,7 +2253,6 @@ static int _X_COLD
|
||||||
SProcSyncDestroyAlarm(ClientPtr client)
|
SProcSyncDestroyAlarm(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncDestroyAlarmReq);
|
REQUEST(xSyncDestroyAlarmReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSyncDestroyAlarmReq);
|
REQUEST_SIZE_MATCH(xSyncDestroyAlarmReq);
|
||||||
swapl(&stuff->alarm);
|
swapl(&stuff->alarm);
|
||||||
|
|
||||||
|
@ -2295,7 +2263,6 @@ static int _X_COLD
|
||||||
SProcSyncSetPriority(ClientPtr client)
|
SProcSyncSetPriority(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncSetPriorityReq);
|
REQUEST(xSyncSetPriorityReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSyncSetPriorityReq);
|
REQUEST_SIZE_MATCH(xSyncSetPriorityReq);
|
||||||
swapl(&stuff->id);
|
swapl(&stuff->id);
|
||||||
swapl(&stuff->priority);
|
swapl(&stuff->priority);
|
||||||
|
@ -2307,7 +2274,6 @@ static int _X_COLD
|
||||||
SProcSyncGetPriority(ClientPtr client)
|
SProcSyncGetPriority(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncGetPriorityReq);
|
REQUEST(xSyncGetPriorityReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSyncGetPriorityReq);
|
REQUEST_SIZE_MATCH(xSyncGetPriorityReq);
|
||||||
swapl(&stuff->id);
|
swapl(&stuff->id);
|
||||||
|
|
||||||
|
@ -2318,7 +2284,6 @@ static int _X_COLD
|
||||||
SProcSyncCreateFence(ClientPtr client)
|
SProcSyncCreateFence(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncCreateFenceReq);
|
REQUEST(xSyncCreateFenceReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSyncCreateFenceReq);
|
REQUEST_SIZE_MATCH(xSyncCreateFenceReq);
|
||||||
swapl(&stuff->d);
|
swapl(&stuff->d);
|
||||||
swapl(&stuff->fid);
|
swapl(&stuff->fid);
|
||||||
|
@ -2330,7 +2295,6 @@ static int _X_COLD
|
||||||
SProcSyncTriggerFence(ClientPtr client)
|
SProcSyncTriggerFence(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncTriggerFenceReq);
|
REQUEST(xSyncTriggerFenceReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSyncTriggerFenceReq);
|
REQUEST_SIZE_MATCH(xSyncTriggerFenceReq);
|
||||||
swapl(&stuff->fid);
|
swapl(&stuff->fid);
|
||||||
|
|
||||||
|
@ -2341,7 +2305,6 @@ static int _X_COLD
|
||||||
SProcSyncResetFence(ClientPtr client)
|
SProcSyncResetFence(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncResetFenceReq);
|
REQUEST(xSyncResetFenceReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSyncResetFenceReq);
|
REQUEST_SIZE_MATCH(xSyncResetFenceReq);
|
||||||
swapl(&stuff->fid);
|
swapl(&stuff->fid);
|
||||||
|
|
||||||
|
@ -2352,7 +2315,6 @@ static int _X_COLD
|
||||||
SProcSyncDestroyFence(ClientPtr client)
|
SProcSyncDestroyFence(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncDestroyFenceReq);
|
REQUEST(xSyncDestroyFenceReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSyncDestroyFenceReq);
|
REQUEST_SIZE_MATCH(xSyncDestroyFenceReq);
|
||||||
swapl(&stuff->fid);
|
swapl(&stuff->fid);
|
||||||
|
|
||||||
|
@ -2363,7 +2325,6 @@ static int _X_COLD
|
||||||
SProcSyncQueryFence(ClientPtr client)
|
SProcSyncQueryFence(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncQueryFenceReq);
|
REQUEST(xSyncQueryFenceReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSyncQueryFenceReq);
|
REQUEST_SIZE_MATCH(xSyncQueryFenceReq);
|
||||||
swapl(&stuff->fid);
|
swapl(&stuff->fid);
|
||||||
|
|
||||||
|
@ -2374,7 +2335,6 @@ static int _X_COLD
|
||||||
SProcSyncAwaitFence(ClientPtr client)
|
SProcSyncAwaitFence(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncAwaitFenceReq);
|
REQUEST(xSyncAwaitFenceReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xSyncAwaitFenceReq);
|
REQUEST_AT_LEAST_SIZE(xSyncAwaitFenceReq);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
|
|
||||||
|
@ -2388,9 +2348,9 @@ SProcSyncDispatch(ClientPtr client)
|
||||||
|
|
||||||
switch (stuff->data) {
|
switch (stuff->data) {
|
||||||
case X_SyncInitialize:
|
case X_SyncInitialize:
|
||||||
return SProcSyncInitialize(client);
|
return ProcSyncInitialize(client);
|
||||||
case X_SyncListSystemCounters:
|
case X_SyncListSystemCounters:
|
||||||
return SProcSyncListSystemCounters(client);
|
return ProcSyncListSystemCounters(client);
|
||||||
case X_SyncCreateCounter:
|
case X_SyncCreateCounter:
|
||||||
return SProcSyncCreateCounter(client);
|
return SProcSyncCreateCounter(client);
|
||||||
case X_SyncSetCounter:
|
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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
|
@ -280,3 +278,15 @@ XaceIsLocal(ClientPtr client)
|
||||||
{
|
{
|
||||||
return ClientIsLocal(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_MAJOR_VERSION 2
|
||||||
#define XACE_MINOR_VERSION 0
|
#define XACE_MINOR_VERSION 0
|
||||||
|
|
||||||
|
#include "dix/selection_priv.h"
|
||||||
|
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "pixmap.h"
|
#include "pixmap.h"
|
||||||
#include "region.h"
|
#include "region.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
#include "property.h"
|
#include "property.h"
|
||||||
#include "selection.h"
|
|
||||||
|
|
||||||
/* Default window background */
|
/* Default window background */
|
||||||
#define XaceBackgroundNoneState(w) ((w)->forcedBG ? BackgroundPixel : None)
|
#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];
|
extern CallbackListPtr XaceHooks[XACE_NUM_HOOKS];
|
||||||
|
|
||||||
/* Entry point for hook functions. Called by Xserver.
|
/* 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 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 */
|
/* determine whether any callbacks are present for the XACE hook */
|
||||||
int XaceHookIsSet(int 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 XaceHookAuthAvail(ClientPtr client, XID authId);
|
||||||
int XaceHookKeyAvail(xEventPtr ev, DeviceIntPtr dev, int count);
|
int XaceHookKeyAvail(xEventPtr ev, DeviceIntPtr dev, int count);
|
||||||
|
|
||||||
|
/* Register / unregister a callback for a given hook. */
|
||||||
/* Register a callback for a given hook.
|
|
||||||
*/
|
|
||||||
#define XaceRegisterCallback(hook,callback,data) \
|
|
||||||
AddCallback(XaceHooks+(hook), callback, data)
|
|
||||||
|
|
||||||
/* Unregister an existing callback for a given hook.
|
|
||||||
*/
|
|
||||||
#define XaceDeleteCallback(hook,callback,data) \
|
|
||||||
DeleteCallback(XaceHooks+(hook), callback, data)
|
|
||||||
|
|
||||||
/* XTrans wrappers for use by security modules
|
/* 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
|
#ifndef _XACESTR_H
|
||||||
#define _XACESTR_H
|
#define _XACESTR_H
|
||||||
|
|
||||||
|
#include "dix/selection_priv.h"
|
||||||
|
|
||||||
#include "dix.h"
|
#include "dix.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "property.h"
|
#include "property.h"
|
||||||
#include "selection.h"
|
|
||||||
#include "xace.h"
|
#include "xace.h"
|
||||||
|
|
||||||
/* XACE_CORE_DISPATCH */
|
/* XACE_CORE_DISPATCH */
|
||||||
|
|
|
@ -26,21 +26,20 @@ from The Open Group.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
|
#include <X11/extensions/xcmiscproto.h>
|
||||||
|
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "dixstruct.h"
|
#include "dixstruct.h"
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
#include <X11/extensions/xcmiscproto.h>
|
|
||||||
#include "extinit_priv.h"
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcXCMiscGetVersion(ClientPtr client)
|
ProcXCMiscGetVersion(ClientPtr client)
|
||||||
|
@ -146,30 +145,18 @@ static int _X_COLD
|
||||||
SProcXCMiscGetVersion(ClientPtr client)
|
SProcXCMiscGetVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXCMiscGetVersionReq);
|
REQUEST(xXCMiscGetVersionReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xXCMiscGetVersionReq);
|
REQUEST_SIZE_MATCH(xXCMiscGetVersionReq);
|
||||||
swaps(&stuff->majorVersion);
|
swaps(&stuff->majorVersion);
|
||||||
swaps(&stuff->minorVersion);
|
swaps(&stuff->minorVersion);
|
||||||
return ProcXCMiscGetVersion(client);
|
return ProcXCMiscGetVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
|
||||||
SProcXCMiscGetXIDRange(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xReq);
|
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
return ProcXCMiscGetXIDRange(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
SProcXCMiscGetXIDList(ClientPtr client)
|
SProcXCMiscGetXIDList(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXCMiscGetXIDListReq);
|
REQUEST(xXCMiscGetXIDListReq);
|
||||||
REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq);
|
REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->count);
|
swapl(&stuff->count);
|
||||||
return ProcXCMiscGetXIDList(client);
|
return ProcXCMiscGetXIDList(client);
|
||||||
}
|
}
|
||||||
|
@ -182,7 +169,7 @@ SProcXCMiscDispatch(ClientPtr client)
|
||||||
case X_XCMiscGetVersion:
|
case X_XCMiscGetVersion:
|
||||||
return SProcXCMiscGetVersion(client);
|
return SProcXCMiscGetVersion(client);
|
||||||
case X_XCMiscGetXIDRange:
|
case X_XCMiscGetXIDRange:
|
||||||
return SProcXCMiscGetXIDRange(client);
|
return ProcXCMiscGetXIDRange(client);
|
||||||
case X_XCMiscGetXIDList:
|
case X_XCMiscGetXIDList:
|
||||||
return SProcXCMiscGetXIDList(client);
|
return SProcXCMiscGetXIDList(client);
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -34,19 +34,13 @@
|
||||||
* XLoadQueryFont).
|
* XLoadQueryFont).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#ifdef MITSHM
|
#ifdef MITSHM
|
||||||
#ifdef SVR4
|
#ifdef SVR4
|
||||||
#include <sys/sysmacros.h>
|
#include <sys/sysmacros.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(__CYGWIN__)
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <sys/sysmacros.h>
|
|
||||||
#endif
|
|
||||||
#include <sys/ipc.h>
|
#include <sys/ipc.h>
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -60,17 +54,20 @@
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
#include <X11/extensions/xf86bigfproto.h>
|
#include <X11/extensions/xf86bigfproto.h>
|
||||||
|
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "dixstruct.h"
|
#include "dixstruct.h"
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
#include "dixfontstr.h"
|
#include "dixfontstr.h"
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "extinit.h"
|
|
||||||
#include "protocol-versions.h"
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
#include "xf86bigfontsrv.h"
|
#include "xf86bigfontsrv.h"
|
||||||
|
|
||||||
|
Bool noXFree86BigfontExtension = FALSE;
|
||||||
|
|
||||||
static void XF86BigfontResetProc(ExtensionEntry *extEntry );
|
static void XF86BigfontResetProc(ExtensionEntry *extEntry );
|
||||||
|
|
||||||
#ifdef MITSHM
|
#ifdef MITSHM
|
||||||
|
@ -87,7 +84,7 @@ static unsigned int pagesize;
|
||||||
|
|
||||||
static Bool badSysCall = FALSE;
|
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
|
static void
|
||||||
SigSysHandler(int signo)
|
SigSysHandler(int signo)
|
||||||
|
@ -266,13 +263,11 @@ XF86BigfontResetProc(ExtensionEntry * extEntry)
|
||||||
static int
|
static int
|
||||||
ProcXF86BigfontQueryVersion(ClientPtr client)
|
ProcXF86BigfontQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
xXF86BigfontQueryVersionReply reply;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXF86BigfontQueryVersionReq);
|
REQUEST_SIZE_MATCH(xXF86BigfontQueryVersionReq);
|
||||||
reply = (xXF86BigfontQueryVersionReply) {
|
|
||||||
|
xXF86BigfontQueryVersionReply reply = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.length = 0,
|
|
||||||
.majorVersion = SERVER_XF86BIGFONT_MAJOR_VERSION,
|
.majorVersion = SERVER_XF86BIGFONT_MAJOR_VERSION,
|
||||||
.minorVersion = SERVER_XF86BIGFONT_MINOR_VERSION,
|
.minorVersion = SERVER_XF86BIGFONT_MINOR_VERSION,
|
||||||
.uid = geteuid(),
|
.uid = geteuid(),
|
||||||
|
@ -281,9 +276,6 @@ ProcXF86BigfontQueryVersion(ClientPtr client)
|
||||||
.signature = signature,
|
.signature = signature,
|
||||||
.capabilities = (client->local && !client->swapped)
|
.capabilities = (client->local && !client->swapped)
|
||||||
? XF86Bigfont_CAP_LocalShm : 0
|
? XF86Bigfont_CAP_LocalShm : 0
|
||||||
#else
|
|
||||||
.signature = 0,
|
|
||||||
.capabilities = 0
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
|
@ -654,8 +646,6 @@ static int _X_COLD
|
||||||
SProcXF86BigfontQueryVersion(ClientPtr client)
|
SProcXF86BigfontQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXF86BigfontQueryVersionReq);
|
REQUEST(xXF86BigfontQueryVersionReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
return ProcXF86BigfontQueryVersion(client);
|
return ProcXF86BigfontQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -663,8 +653,6 @@ static int _X_COLD
|
||||||
SProcXF86BigfontQueryFont(ClientPtr client)
|
SProcXF86BigfontQueryFont(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXF86BigfontQueryFontReq);
|
REQUEST(xXF86BigfontQueryFontReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq);
|
REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq);
|
||||||
swapl(&stuff->id);
|
swapl(&stuff->id);
|
||||||
return ProcXF86BigfontQueryFont(client);
|
return ProcXF86BigfontQueryFont(client);
|
||||||
|
@ -716,7 +704,7 @@ XFree86BigfontExtensionInit(void)
|
||||||
|
|
||||||
FontShmdescIndex = xfont2_allocate_font_private_index();
|
FontShmdescIndex = xfont2_allocate_font_private_index();
|
||||||
|
|
||||||
#if !defined(CSRG_BASED) && !defined(__CYGWIN__)
|
#if !defined(CSRG_BASED)
|
||||||
pagesize = SHMLBA;
|
pagesize = SHMLBA;
|
||||||
#else
|
#else
|
||||||
#ifdef _SC_PAGESIZE
|
#ifdef _SC_PAGESIZE
|
||||||
|
|
164
Xext/xres.c
164
Xext/xres.c
|
@ -2,33 +2,30 @@
|
||||||
Copyright (c) 2002 XFree86 Inc
|
Copyright (c) 2002 XFree86 Inc
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
#include <assert.h>
|
#include <X11/extensions/XResproto.h>
|
||||||
|
|
||||||
#include "dix/registry_priv.h"
|
#include "dix/registry_priv.h"
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
#include "os/client_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "dixstruct.h"
|
#include "dixstruct.h"
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
#include <X11/extensions/XResproto.h>
|
|
||||||
#include "pixmapstr.h"
|
#include "pixmapstr.h"
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
#include "extinit_priv.h"
|
|
||||||
#include "protocol-versions.h"
|
#include "protocol-versions.h"
|
||||||
#include "client.h"
|
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include <string.h>
|
|
||||||
#include "hashtable.h"
|
#include "hashtable.h"
|
||||||
#include "picturestr.h"
|
#include "picturestr.h"
|
||||||
|
|
||||||
|
@ -36,6 +33,8 @@
|
||||||
#include "compint.h"
|
#include "compint.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Bool noResExtension = FALSE;
|
||||||
|
|
||||||
/** @brief Holds fragments of responses for ConstructClientIds.
|
/** @brief Holds fragments of responses for ConstructClientIds.
|
||||||
*
|
*
|
||||||
* note: there is no consideration for data alignment */
|
* 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.
|
/** @brief Frees a list of fragments. Does not free() root node.
|
||||||
|
|
||||||
@param frags The head of the list of fragments
|
@param frags The head of the list of fragments
|
||||||
|
@ -195,16 +179,15 @@ DestroyConstructResourceBytesCtx(ConstructResourceBytesCtx *ctx)
|
||||||
static int
|
static int
|
||||||
ProcXResQueryVersion(ClientPtr client)
|
ProcXResQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_SIZE_MATCH(xXResQueryVersionReq);
|
||||||
|
|
||||||
xXResQueryVersionReply rep = {
|
xXResQueryVersionReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.length = 0,
|
|
||||||
.server_major = SERVER_XRES_MAJOR_VERSION,
|
.server_major = SERVER_XRES_MAJOR_VERSION,
|
||||||
.server_minor = SERVER_XRES_MINOR_VERSION
|
.server_minor = SERVER_XRES_MINOR_VERSION
|
||||||
};
|
};
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXResQueryVersionReq);
|
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length);
|
swapl(&rep.length);
|
||||||
|
@ -218,16 +201,12 @@ ProcXResQueryVersion(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
ProcXResQueryClients(ClientPtr client)
|
ProcXResQueryClients(ClientPtr client)
|
||||||
{
|
{
|
||||||
/* REQUEST(xXResQueryClientsReq); */
|
int i, num_clients = 0;
|
||||||
xXResQueryClientsReply rep;
|
|
||||||
int *current_clients;
|
|
||||||
int i, num_clients;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXResQueryClientsReq);
|
REQUEST_SIZE_MATCH(xXResQueryClientsReq);
|
||||||
|
|
||||||
current_clients = xallocarray(currentMaxClients, sizeof(int));
|
int current_clients[currentMaxClients];
|
||||||
|
|
||||||
num_clients = 0;
|
|
||||||
for (i = 0; i < currentMaxClients; i++) {
|
for (i = 0; i < currentMaxClients; i++) {
|
||||||
if (clients[i]) {
|
if (clients[i]) {
|
||||||
current_clients[num_clients] = i;
|
current_clients[num_clients] = i;
|
||||||
|
@ -235,7 +214,7 @@ ProcXResQueryClients(ClientPtr client)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rep = (xXResQueryClientsReply) {
|
xXResQueryClientsReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.length = bytes_to_int32(num_clients * sz_xXResClient),
|
.length = bytes_to_int32(num_clients * sz_xXResClient),
|
||||||
|
@ -248,22 +227,21 @@ ProcXResQueryClients(ClientPtr client)
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXResQueryClientsReply), &rep);
|
WriteToClient(client, sizeof(xXResQueryClientsReply), &rep);
|
||||||
|
|
||||||
if (num_clients) {
|
xXResClient scratch[num_clients];
|
||||||
xXResClient scratch;
|
|
||||||
|
|
||||||
|
if (num_clients) {
|
||||||
for (i = 0; i < num_clients; i++) {
|
for (i = 0; i < num_clients; i++) {
|
||||||
scratch.resource_base = clients[current_clients[i]]->clientAsMask;
|
scratch[i].resource_base = clients[current_clients[i]]->clientAsMask;
|
||||||
scratch.resource_mask = RESOURCE_ID_MASK;
|
scratch[i].resource_mask = RESOURCE_ID_MASK;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swapl(&scratch.resource_base);
|
swapl(&scratch[i].resource_base);
|
||||||
swapl(&scratch.resource_mask);
|
swapl(&scratch[i].resource_mask);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sz_xXResClient, &scratch);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
free(current_clients);
|
WriteToClient(client, sizeof(scratch), scratch);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
@ -298,12 +276,10 @@ static int
|
||||||
ProcXResQueryClientResources(ClientPtr client)
|
ProcXResQueryClientResources(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXResQueryClientResourcesReq);
|
REQUEST(xXResQueryClientResourcesReq);
|
||||||
xXResQueryClientResourcesReply rep;
|
|
||||||
int i, clientID, num_types;
|
|
||||||
int *counts;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXResQueryClientResourcesReq);
|
REQUEST_SIZE_MATCH(xXResQueryClientResourcesReq);
|
||||||
|
|
||||||
|
int i, clientID, num_types = 0;
|
||||||
|
|
||||||
clientID = CLIENT_ID(stuff->xid);
|
clientID = CLIENT_ID(stuff->xid);
|
||||||
|
|
||||||
if ((clientID >= currentMaxClients) || !clients[clientID]) {
|
if ((clientID >= currentMaxClients) || !clients[clientID]) {
|
||||||
|
@ -311,18 +287,21 @@ ProcXResQueryClientResources(ClientPtr client)
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
counts = calloc(lastResourceType + 1, sizeof(int));
|
int counts[lastResourceType + 1];
|
||||||
|
memset(counts, 0, sizeof(counts));
|
||||||
|
|
||||||
FindAllClientResources(clients[clientID], ResFindAllRes, counts);
|
FindAllClientResources(clients[clientID], ResFindAllRes, counts);
|
||||||
|
|
||||||
num_types = 0;
|
int cnt[lastResourceType + 1];
|
||||||
|
|
||||||
for (i = 0; i <= lastResourceType; i++) {
|
for (i = 0; i <= lastResourceType; i++) {
|
||||||
if (counts[i])
|
if (counts[i]) {
|
||||||
|
cnt[num_types] = counts[i];
|
||||||
num_types++;
|
num_types++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rep = (xXResQueryClientResourcesReply) {
|
xXResQueryClientResourcesReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.length = bytes_to_int32(num_types * sz_xXResType),
|
.length = bytes_to_int32(num_types * sz_xXResType),
|
||||||
|
@ -334,28 +313,20 @@ ProcXResQueryClientResources(ClientPtr client)
|
||||||
swapl(&rep.num_types);
|
swapl(&rep.num_types);
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xXResQueryClientResourcesReply), &rep);
|
xXResType scratch[num_types];
|
||||||
|
|
||||||
if (num_types) {
|
for (i = 0; i < num_types; i++) {
|
||||||
xXResType scratch;
|
scratch[i].resource_type = resourceTypeAtom(i + 1);
|
||||||
|
scratch[i].count = cnt[i];
|
||||||
|
|
||||||
for (i = 0; i < lastResourceType; i++) {
|
if (client->swapped) {
|
||||||
if (!counts[i])
|
swapl(&scratch[i].resource_type);
|
||||||
continue;
|
swapl(&scratch[i].count);
|
||||||
|
|
||||||
scratch.resource_type = resourceTypeAtom(i + 1);
|
|
||||||
scratch.count = counts[i];
|
|
||||||
|
|
||||||
if (client->swapped) {
|
|
||||||
swapl(&scratch.resource_type);
|
|
||||||
swapl(&scratch.count);
|
|
||||||
}
|
|
||||||
WriteToClient(client, sz_xXResType, &scratch);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
free(counts);
|
WriteToClient(client, sizeof(xXResQueryClientResourcesReply), &rep);
|
||||||
|
WriteToClient(client, sizeof(scratch), scratch);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -374,12 +345,11 @@ static int
|
||||||
ProcXResQueryClientPixmapBytes(ClientPtr client)
|
ProcXResQueryClientPixmapBytes(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXResQueryClientPixmapBytesReq);
|
REQUEST(xXResQueryClientPixmapBytesReq);
|
||||||
xXResQueryClientPixmapBytesReply rep;
|
|
||||||
int clientID;
|
|
||||||
unsigned long bytes;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXResQueryClientPixmapBytesReq);
|
REQUEST_SIZE_MATCH(xXResQueryClientPixmapBytesReq);
|
||||||
|
|
||||||
|
int clientID;
|
||||||
|
unsigned long bytes = 0;
|
||||||
|
|
||||||
clientID = CLIENT_ID(stuff->xid);
|
clientID = CLIENT_ID(stuff->xid);
|
||||||
|
|
||||||
if ((clientID >= currentMaxClients) || !clients[clientID]) {
|
if ((clientID >= currentMaxClients) || !clients[clientID]) {
|
||||||
|
@ -387,20 +357,15 @@ ProcXResQueryClientPixmapBytes(ClientPtr client)
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes = 0;
|
|
||||||
|
|
||||||
FindAllClientResources(clients[clientID], ResFindResourcePixmaps,
|
FindAllClientResources(clients[clientID], ResFindResourcePixmaps,
|
||||||
(void *) (&bytes));
|
(void *) (&bytes));
|
||||||
|
|
||||||
rep = (xXResQueryClientPixmapBytesReply) {
|
xXResQueryClientPixmapBytesReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.length = 0,
|
|
||||||
.bytes = bytes,
|
.bytes = bytes,
|
||||||
#ifdef _XSERVER64
|
#ifdef _XSERVER64
|
||||||
.bytes_overflow = bytes >> 32
|
.bytes_overflow = bytes >> 32
|
||||||
#else
|
|
||||||
.bytes_overflow = 0
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
|
@ -459,9 +424,10 @@ static Bool
|
||||||
ConstructClientIdValue(ClientPtr sendClient, ClientPtr client, CARD32 mask,
|
ConstructClientIdValue(ClientPtr sendClient, ClientPtr client, CARD32 mask,
|
||||||
ConstructClientIdCtx *ctx)
|
ConstructClientIdCtx *ctx)
|
||||||
{
|
{
|
||||||
xXResClientIdValue rep;
|
xXResClientIdValue rep = {
|
||||||
|
.spec.client = client->clientAsMask,
|
||||||
|
};
|
||||||
|
|
||||||
rep.spec.client = client->clientAsMask;
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swapl (&rep.spec.client);
|
swapl (&rep.spec.client);
|
||||||
}
|
}
|
||||||
|
@ -473,7 +439,6 @@ ConstructClientIdValue(ClientPtr sendClient, ClientPtr client, CARD32 mask,
|
||||||
}
|
}
|
||||||
|
|
||||||
rep.spec.mask = X_XResClientXIDMask;
|
rep.spec.mask = X_XResClientXIDMask;
|
||||||
rep.length = 0;
|
|
||||||
if (sendClient->swapped) {
|
if (sendClient->swapped) {
|
||||||
swapl (&rep.spec.mask);
|
swapl (&rep.spec.mask);
|
||||||
/* swapl (&rep.length, n); - not required for rep.length = 0 */
|
/* swapl (&rep.length, n); - not required for rep.length = 0 */
|
||||||
|
@ -502,9 +467,6 @@ ConstructClientIdValue(ClientPtr sendClient, ClientPtr client, CARD32 mask,
|
||||||
if (sendClient->swapped) {
|
if (sendClient->swapped) {
|
||||||
swapl (&rep.spec.mask);
|
swapl (&rep.spec.mask);
|
||||||
swapl (&rep.length);
|
swapl (&rep.length);
|
||||||
}
|
|
||||||
|
|
||||||
if (sendClient->swapped) {
|
|
||||||
swapl (value);
|
swapl (value);
|
||||||
}
|
}
|
||||||
memcpy(ptr, &rep, sizeof(rep));
|
memcpy(ptr, &rep, sizeof(rep));
|
||||||
|
@ -587,15 +549,26 @@ ProcXResQueryClientIds (ClientPtr client)
|
||||||
rc = ConstructClientIds(client, stuff->numSpecs, specs, &ctx);
|
rc = ConstructClientIds(client, stuff->numSpecs, specs, &ctx);
|
||||||
|
|
||||||
if (rc == Success) {
|
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,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.length = bytes_to_int32(ctx.resultBytes),
|
.length = bytes_to_int32(ctx.resultBytes),
|
||||||
.numIds = ctx.numIds
|
.numIds = ctx.numIds
|
||||||
};
|
};
|
||||||
|
|
||||||
assert((ctx.resultBytes & 3) == 0);
|
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps (&rep.sequenceNumber);
|
swaps (&rep.sequenceNumber);
|
||||||
swapl (&rep.length);
|
swapl (&rep.length);
|
||||||
|
@ -603,9 +576,11 @@ ProcXResQueryClientIds (ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(rep), &rep);
|
WriteToClient(client, sizeof(rep), &rep);
|
||||||
WriteFragmentsToClient(client, &ctx.response);
|
WriteToClient(client, ctx.resultBytes, buf);
|
||||||
|
free(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
DestroyConstructClientIdCtx(&ctx);
|
DestroyConstructClientIdCtx(&ctx);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -952,11 +927,11 @@ static int
|
||||||
ProcXResQueryResourceBytes (ClientPtr client)
|
ProcXResQueryResourceBytes (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXResQueryResourceBytesReq);
|
REQUEST(xXResQueryResourceBytesReq);
|
||||||
|
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
|
||||||
|
|
||||||
int rc;
|
int rc;
|
||||||
ConstructResourceBytesCtx ctx;
|
ConstructResourceBytesCtx ctx;
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
|
|
||||||
if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
|
if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
|
||||||
return BadLength;
|
return BadLength;
|
||||||
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
|
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
|
||||||
|
@ -987,10 +962,24 @@ ProcXResQueryResourceBytes (ClientPtr client)
|
||||||
SwapXResQueryResourceBytes(&ctx.response);
|
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);
|
WriteToClient(client, sizeof(rep), &rep);
|
||||||
WriteFragmentsToClient(client, &ctx.response);
|
WriteToClient(client, ctx.resultBytes, buf);
|
||||||
|
free(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
DestroyConstructResourceBytesCtx(&ctx);
|
DestroyConstructResourceBytesCtx(&ctx);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -1080,7 +1069,6 @@ static int _X_COLD
|
||||||
SProcResDispatch (ClientPtr client)
|
SProcResDispatch (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
|
|
||||||
switch (stuff->data) {
|
switch (stuff->data) {
|
||||||
case X_XResQueryVersion:
|
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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/property_priv.h"
|
#include "dix/property_priv.h"
|
||||||
|
#include "dix/selection_priv.h"
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
|
||||||
#include "selection.h"
|
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "propertyst.h"
|
#include "propertyst.h"
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "extinit_priv.h"
|
|
||||||
#include "xselinuxint.h"
|
#include "xselinuxint.h"
|
||||||
|
|
||||||
#define CTX_DEV offsetof(SELinuxSubjectRec, dev_create_sid)
|
#define CTX_DEV offsetof(SELinuxSubjectRec, dev_create_sid)
|
||||||
|
@ -627,8 +625,6 @@ SProcSELinuxDispatch(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
|
|
||||||
switch (stuff->data) {
|
switch (stuff->data) {
|
||||||
case X_SELinuxQueryVersion:
|
case X_SELinuxQueryVersion:
|
||||||
return SProcSELinuxQueryVersion(client);
|
return SProcSELinuxQueryVersion(client);
|
||||||
|
|
|
@ -22,9 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/socket.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 <X11/Xfuncproto.h>
|
||||||
|
|
||||||
#include "dix/registry_priv.h"
|
#include "dix/registry_priv.h"
|
||||||
|
#include "dix/selection_priv.h"
|
||||||
|
#include "os/client_priv.h"
|
||||||
|
|
||||||
#include "selection.h"
|
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "propertyst.h"
|
#include "propertyst.h"
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "xacestr.h"
|
#include "xacestr.h"
|
||||||
#include "client.h"
|
|
||||||
#define _XSELINUX_NEED_FLASK_MAP
|
#define _XSELINUX_NEED_FLASK_MAP
|
||||||
#include "xselinuxint.h"
|
#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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <selinux/label.h>
|
#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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
|
@ -40,6 +38,7 @@
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/exevents_priv.h"
|
#include "dix/exevents_priv.h"
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
@ -59,7 +58,8 @@
|
||||||
#include "xserver-properties.h"
|
#include "xserver-properties.h"
|
||||||
#include "eventstr.h"
|
#include "eventstr.h"
|
||||||
#include "inpututils.h"
|
#include "inpututils.h"
|
||||||
#include "extinit_priv.h"
|
|
||||||
|
Bool noTestExtensions = FALSE;
|
||||||
|
|
||||||
/* XTest events are sent during request processing and may be interrupted by
|
/* 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
|
* a SIGIO. We need a separate event list to avoid events overwriting each
|
||||||
|
@ -79,10 +79,10 @@ static InternalEvent *xtest_evlist;
|
||||||
*/
|
*/
|
||||||
DeviceIntPtr xtestpointer, xtestkeyboard;
|
DeviceIntPtr xtestpointer, xtestkeyboard;
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef XINERAMA
|
||||||
#include "panoramiX.h"
|
#include "panoramiX.h"
|
||||||
#include "panoramiXsrv.h"
|
#include "panoramiXsrv.h"
|
||||||
#endif
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
static int XTestSwapFakeInput(ClientPtr /* client */ ,
|
static int XTestSwapFakeInput(ClientPtr /* client */ ,
|
||||||
xReq * /* req */
|
xReq * /* req */
|
||||||
|
@ -198,7 +198,7 @@ ProcXTestFakeInput(ClientPtr client)
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
int need_ptr_update = 1;
|
int need_ptr_update = 1;
|
||||||
|
|
||||||
nev = (stuff->length << 2) - sizeof(xReq);
|
nev = (client->req_len << 2) - sizeof(xReq);
|
||||||
if ((nev % sizeof(xEvent)) || !nev)
|
if ((nev % sizeof(xEvent)) || !nev)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
nev /= sizeof(xEvent);
|
nev /= sizeof(xEvent);
|
||||||
|
@ -374,7 +374,6 @@ ProcXTestFakeInput(ClientPtr client)
|
||||||
/* swap the request back so we can simply re-execute it */
|
/* swap the request back so we can simply re-execute it */
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
(void) XTestSwapFakeInput(client, (xReq *) stuff);
|
(void) XTestSwapFakeInput(client, (xReq *) stuff);
|
||||||
swaps(&stuff->length);
|
|
||||||
}
|
}
|
||||||
ResetCurrentRequest(client);
|
ResetCurrentRequest(client);
|
||||||
client->sequence--;
|
client->sequence--;
|
||||||
|
@ -488,8 +487,6 @@ static int _X_COLD
|
||||||
SProcXTestGetVersion(ClientPtr client)
|
SProcXTestGetVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXTestGetVersionReq);
|
REQUEST(xXTestGetVersionReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xXTestGetVersionReq);
|
REQUEST_SIZE_MATCH(xXTestGetVersionReq);
|
||||||
swaps(&stuff->minorVersion);
|
swaps(&stuff->minorVersion);
|
||||||
return ProcXTestGetVersion(client);
|
return ProcXTestGetVersion(client);
|
||||||
|
@ -499,8 +496,6 @@ static int _X_COLD
|
||||||
SProcXTestCompareCursor(ClientPtr client)
|
SProcXTestCompareCursor(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXTestCompareCursorReq);
|
REQUEST(xXTestCompareCursorReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xXTestCompareCursorReq);
|
REQUEST_SIZE_MATCH(xXTestCompareCursorReq);
|
||||||
swapl(&stuff->window);
|
swapl(&stuff->window);
|
||||||
swapl(&stuff->cursor);
|
swapl(&stuff->cursor);
|
||||||
|
@ -515,7 +510,7 @@ XTestSwapFakeInput(ClientPtr client, xReq * req)
|
||||||
xEvent sev;
|
xEvent sev;
|
||||||
EventSwapPtr proc;
|
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++) {
|
for (ev = (xEvent *) &req[1]; --nev >= 0; ev++) {
|
||||||
int evtype = ev->u.u.type & 0177;
|
int evtype = ev->u.u.type & 0177;
|
||||||
/* Swap event */
|
/* Swap event */
|
||||||
|
@ -538,23 +533,12 @@ SProcXTestFakeInput(ClientPtr client)
|
||||||
|
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
n = XTestSwapFakeInput(client, stuff);
|
n = XTestSwapFakeInput(client, stuff);
|
||||||
if (n != Success)
|
if (n != Success)
|
||||||
return n;
|
return n;
|
||||||
return ProcXTestFakeInput(client);
|
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
|
static int _X_COLD
|
||||||
SProcXTestDispatch(ClientPtr client)
|
SProcXTestDispatch(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
@ -567,7 +551,7 @@ SProcXTestDispatch(ClientPtr client)
|
||||||
case X_XTestFakeInput:
|
case X_XTestFakeInput:
|
||||||
return SProcXTestFakeInput(client);
|
return SProcXTestFakeInput(client);
|
||||||
case X_XTestGrabControl:
|
case X_XTestGrabControl:
|
||||||
return SProcXTestGrabControl(client);
|
return ProcXTestGrabControl(client);
|
||||||
default:
|
default:
|
||||||
return BadRequest;
|
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.
|
SOFTWARE.
|
||||||
******************************************************************/
|
******************************************************************/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -50,12 +48,12 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "xvdisp.h"
|
#include "xvdisp.h"
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef XINERAMA
|
||||||
#include "panoramiX.h"
|
#include "panoramiX.h"
|
||||||
#include "panoramiXsrv.h"
|
#include "panoramiXsrv.h"
|
||||||
|
|
||||||
unsigned long XvXRTPort;
|
unsigned long XvXRTPort;
|
||||||
#endif
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SWriteQueryExtensionReply(ClientPtr client, xvQueryExtensionReply * rep)
|
SWriteQueryExtensionReply(ClientPtr client, xvQueryExtensionReply * rep)
|
||||||
|
@ -323,7 +321,6 @@ ProcXvQueryAdaptors(ClientPtr client)
|
||||||
{
|
{
|
||||||
xvFormat format;
|
xvFormat format;
|
||||||
xvAdaptorInfo ainfo;
|
xvAdaptorInfo ainfo;
|
||||||
xvQueryAdaptorsReply rep;
|
|
||||||
int totalSize, na, nf, rc;
|
int totalSize, na, nf, rc;
|
||||||
int nameSize;
|
int nameSize;
|
||||||
XvAdaptorPtr pa;
|
XvAdaptorPtr pa;
|
||||||
|
@ -339,27 +336,20 @@ ProcXvQueryAdaptors(ClientPtr client)
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
|
xvQueryAdaptorsReply rep = {
|
||||||
|
.type = X_Reply,
|
||||||
|
.sequenceNumber = client->sequence,
|
||||||
|
};
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
|
pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
|
||||||
XvGetScreenKey());
|
XvGetScreenKey());
|
||||||
if (!pxvs) {
|
if (!pxvs) {
|
||||||
rep = (xvQueryAdaptorsReply) {
|
|
||||||
.type = X_Reply,
|
|
||||||
.sequenceNumber = client->sequence,
|
|
||||||
.length = 0,
|
|
||||||
.num_adaptors = 0
|
|
||||||
};
|
|
||||||
|
|
||||||
_WriteQueryAdaptorsReply(client, &rep);
|
_WriteQueryAdaptorsReply(client, &rep);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
rep = (xvQueryAdaptorsReply) {
|
rep.num_adaptors = pxvs->nAdaptors;
|
||||||
.type = X_Reply,
|
|
||||||
.sequenceNumber = client->sequence,
|
|
||||||
.num_adaptors = pxvs->nAdaptors
|
|
||||||
};
|
|
||||||
|
|
||||||
/* CALCULATE THE TOTAL SIZE OF THE REPLY IN BYTES */
|
/* CALCULATE THE TOTAL SIZE OF THE REPLY IN BYTES */
|
||||||
|
|
||||||
|
@ -413,7 +403,6 @@ static int
|
||||||
ProcXvQueryEncodings(ClientPtr client)
|
ProcXvQueryEncodings(ClientPtr client)
|
||||||
{
|
{
|
||||||
xvEncodingInfo einfo;
|
xvEncodingInfo einfo;
|
||||||
xvQueryEncodingsReply rep;
|
|
||||||
int totalSize;
|
int totalSize;
|
||||||
int nameSize;
|
int nameSize;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
|
@ -425,12 +414,6 @@ ProcXvQueryEncodings(ClientPtr client)
|
||||||
|
|
||||||
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
|
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 */
|
/* FOR EACH ENCODING ADD UP THE BYTES FOR ENCODING NAMES */
|
||||||
|
|
||||||
ne = pPort->pAdaptor->nEncodings;
|
ne = pPort->pAdaptor->nEncodings;
|
||||||
|
@ -441,7 +424,12 @@ ProcXvQueryEncodings(ClientPtr client)
|
||||||
pe++;
|
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);
|
_WriteQueryEncodingsReply(client, &rep);
|
||||||
|
|
||||||
|
@ -463,7 +451,7 @@ ProcXvQueryEncodings(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcXvPutVideo(ClientPtr client)
|
SingleXvPutVideo(ClientPtr client)
|
||||||
{
|
{
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
|
@ -492,8 +480,20 @@ ProcXvPutVideo(ClientPtr client)
|
||||||
stuff->drw_w, stuff->drw_h);
|
stuff->drw_w, stuff->drw_h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int XineramaXvPutVideo(ClientPtr client);
|
||||||
|
|
||||||
static int
|
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;
|
DrawablePtr pDraw;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
|
@ -522,6 +522,18 @@ ProcXvPutStill(ClientPtr client)
|
||||||
stuff->drw_w, stuff->drw_h);
|
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
|
static int
|
||||||
ProcXvGetVideo(ClientPtr client)
|
ProcXvGetVideo(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
@ -617,7 +629,6 @@ ProcXvGrabPort(ClientPtr client)
|
||||||
{
|
{
|
||||||
int result, status;
|
int result, status;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
xvGrabPortReply rep;
|
|
||||||
|
|
||||||
REQUEST(xvGrabPortReq);
|
REQUEST(xvGrabPortReq);
|
||||||
REQUEST_SIZE_MATCH(xvGrabPortReq);
|
REQUEST_SIZE_MATCH(xvGrabPortReq);
|
||||||
|
@ -629,10 +640,9 @@ ProcXvGrabPort(ClientPtr client)
|
||||||
if (status != Success) {
|
if (status != Success) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
rep = (xvGrabPortReply) {
|
xvGrabPortReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.length = 0,
|
|
||||||
.result = result
|
.result = result
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -655,7 +665,7 @@ ProcXvUngrabPort(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcXvStopVideo(ClientPtr client)
|
SingleXvStopVideo(ClientPtr client)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
@ -673,8 +683,20 @@ ProcXvStopVideo(ClientPtr client)
|
||||||
return XvdiStopVideo(client, pPort, pDraw);
|
return XvdiStopVideo(client, pPort, pDraw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int XineramaXvStopVideo(ClientPtr client);
|
||||||
|
|
||||||
static int
|
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;
|
int status;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
|
@ -700,13 +722,24 @@ ProcXvSetPortAttribute(ClientPtr client)
|
||||||
return status;
|
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
|
static int
|
||||||
ProcXvGetPortAttribute(ClientPtr client)
|
ProcXvGetPortAttribute(ClientPtr client)
|
||||||
{
|
{
|
||||||
INT32 value;
|
INT32 value;
|
||||||
int status;
|
int status;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
xvGetPortAttributeReply rep;
|
|
||||||
|
|
||||||
REQUEST(xvGetPortAttributeReq);
|
REQUEST(xvGetPortAttributeReq);
|
||||||
REQUEST_SIZE_MATCH(xvGetPortAttributeReq);
|
REQUEST_SIZE_MATCH(xvGetPortAttributeReq);
|
||||||
|
@ -724,10 +757,9 @@ ProcXvGetPortAttribute(ClientPtr client)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
rep = (xvGetPortAttributeReply) {
|
xvGetPortAttributeReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.length = 0,
|
|
||||||
.value = value
|
.value = value
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -741,7 +773,6 @@ ProcXvQueryBestSize(ClientPtr client)
|
||||||
{
|
{
|
||||||
unsigned int actual_width, actual_height;
|
unsigned int actual_width, actual_height;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
xvQueryBestSizeReply rep;
|
|
||||||
|
|
||||||
REQUEST(xvQueryBestSizeReq);
|
REQUEST(xvQueryBestSizeReq);
|
||||||
REQUEST_SIZE_MATCH(xvQueryBestSizeReq);
|
REQUEST_SIZE_MATCH(xvQueryBestSizeReq);
|
||||||
|
@ -753,10 +784,9 @@ ProcXvQueryBestSize(ClientPtr client)
|
||||||
stuff->drw_w, stuff->drw_h,
|
stuff->drw_w, stuff->drw_h,
|
||||||
&actual_width, &actual_height);
|
&actual_width, &actual_height);
|
||||||
|
|
||||||
rep = (xvQueryBestSizeReply) {
|
xvQueryBestSizeReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.length = 0,
|
|
||||||
.actual_width = actual_width,
|
.actual_width = actual_width,
|
||||||
.actual_height = actual_height
|
.actual_height = actual_height
|
||||||
};
|
};
|
||||||
|
@ -772,7 +802,6 @@ ProcXvQueryPortAttributes(ClientPtr client)
|
||||||
int size, i;
|
int size, i;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
XvAttributePtr pAtt;
|
XvAttributePtr pAtt;
|
||||||
xvQueryPortAttributesReply rep;
|
|
||||||
xvAttributeInfo Info;
|
xvAttributeInfo Info;
|
||||||
|
|
||||||
REQUEST(xvQueryPortAttributesReq);
|
REQUEST(xvQueryPortAttributesReq);
|
||||||
|
@ -780,11 +809,10 @@ ProcXvQueryPortAttributes(ClientPtr client)
|
||||||
|
|
||||||
VALIDATE_XV_PORT(stuff->port, pPort, DixGetAttrAccess);
|
VALIDATE_XV_PORT(stuff->port, pPort, DixGetAttrAccess);
|
||||||
|
|
||||||
rep = (xvQueryPortAttributesReply) {
|
xvQueryPortAttributesReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.num_attributes = pPort->pAdaptor->nAttributes,
|
.num_attributes = pPort->pAdaptor->nAttributes,
|
||||||
.text_size = 0
|
|
||||||
};
|
};
|
||||||
|
|
||||||
for (i = 0, pAtt = pPort->pAdaptor->pAttributes;
|
for (i = 0, pAtt = pPort->pAdaptor->pAttributes;
|
||||||
|
@ -815,7 +843,7 @@ ProcXvQueryPortAttributes(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcXvPutImage(ClientPtr client)
|
SingleXvPutImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
|
@ -871,10 +899,23 @@ ProcXvPutImage(ClientPtr client)
|
||||||
stuff->width, stuff->height);
|
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
|
#ifdef MITSHM
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcXvShmPutImage(ClientPtr client)
|
SingleXvShmPutImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
ShmDescPtr shmdesc;
|
ShmDescPtr shmdesc;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
@ -947,13 +988,24 @@ ProcXvShmPutImage(ClientPtr client)
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
#else /* !MITSHM */
|
|
||||||
|
static int XineramaXvShmPutImage(ClientPtr client);
|
||||||
|
|
||||||
|
#endif /* MITSHM */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcXvShmPutImage(ClientPtr client)
|
ProcXvShmPutImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
return BadImplementation;
|
#ifdef MITSHM
|
||||||
}
|
#ifdef XINERAMA
|
||||||
|
if (xvUseXinerama)
|
||||||
|
return XineramaXvShmPutImage(client);
|
||||||
#endif
|
#endif
|
||||||
|
return SingleXvShmPutImage(client);
|
||||||
|
#else
|
||||||
|
return BadImplementation;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef XvMCExtension
|
#ifdef XvMCExtension
|
||||||
#include "xvmcext.h"
|
#include "xvmcext.h"
|
||||||
|
@ -1031,7 +1083,6 @@ ProcXvListImageFormats(ClientPtr client)
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
XvImagePtr pImage;
|
XvImagePtr pImage;
|
||||||
int i;
|
int i;
|
||||||
xvListImageFormatsReply rep;
|
|
||||||
xvImageFormatInfo info;
|
xvImageFormatInfo info;
|
||||||
|
|
||||||
REQUEST(xvListImageFormatsReq);
|
REQUEST(xvListImageFormatsReq);
|
||||||
|
@ -1040,7 +1091,7 @@ ProcXvListImageFormats(ClientPtr client)
|
||||||
|
|
||||||
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
|
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
|
||||||
|
|
||||||
rep = (xvListImageFormatsReply) {
|
xvListImageFormatsReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.num_formats = pPort->pAdaptor->nImages,
|
.num_formats = pPort->pAdaptor->nImages,
|
||||||
|
@ -1081,26 +1132,6 @@ ProcXvListImageFormats(ClientPtr client)
|
||||||
return Success;
|
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
|
int
|
||||||
ProcXvDispatch(ClientPtr client)
|
ProcXvDispatch(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
@ -1108,32 +1139,61 @@ ProcXvDispatch(ClientPtr client)
|
||||||
|
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
|
|
||||||
if (stuff->data >= xvNumRequests) {
|
switch (stuff->data) {
|
||||||
return BadRequest;
|
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 */
|
/* 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
|
static int _X_COLD
|
||||||
SProcXvQueryAdaptors(ClientPtr client)
|
SProcXvQueryAdaptors(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvQueryAdaptorsReq);
|
REQUEST(xvQueryAdaptorsReq);
|
||||||
REQUEST_SIZE_MATCH(xvQueryAdaptorsReq);
|
REQUEST_SIZE_MATCH(xvQueryAdaptorsReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->window);
|
swapl(&stuff->window);
|
||||||
return XvProcVector[xv_QueryAdaptors] (client);
|
return ProcXvQueryAdaptors(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1141,9 +1201,8 @@ SProcXvQueryEncodings(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvQueryEncodingsReq);
|
REQUEST(xvQueryEncodingsReq);
|
||||||
REQUEST_SIZE_MATCH(xvQueryEncodingsReq);
|
REQUEST_SIZE_MATCH(xvQueryEncodingsReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
return XvProcVector[xv_QueryEncodings] (client);
|
return ProcXvQueryEncodings(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1151,10 +1210,9 @@ SProcXvGrabPort(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvGrabPortReq);
|
REQUEST(xvGrabPortReq);
|
||||||
REQUEST_SIZE_MATCH(xvGrabPortReq);
|
REQUEST_SIZE_MATCH(xvGrabPortReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->time);
|
swapl(&stuff->time);
|
||||||
return XvProcVector[xv_GrabPort] (client);
|
return ProcXvGrabPort(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1162,10 +1220,9 @@ SProcXvUngrabPort(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvUngrabPortReq);
|
REQUEST(xvUngrabPortReq);
|
||||||
REQUEST_SIZE_MATCH(xvUngrabPortReq);
|
REQUEST_SIZE_MATCH(xvUngrabPortReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->time);
|
swapl(&stuff->time);
|
||||||
return XvProcVector[xv_UngrabPort] (client);
|
return ProcXvUngrabPort(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1173,7 +1230,6 @@ SProcXvPutVideo(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvPutVideoReq);
|
REQUEST(xvPutVideoReq);
|
||||||
REQUEST_SIZE_MATCH(xvPutVideoReq);
|
REQUEST_SIZE_MATCH(xvPutVideoReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->gc);
|
swapl(&stuff->gc);
|
||||||
|
@ -1185,7 +1241,7 @@ SProcXvPutVideo(ClientPtr client)
|
||||||
swaps(&stuff->drw_y);
|
swaps(&stuff->drw_y);
|
||||||
swaps(&stuff->drw_w);
|
swaps(&stuff->drw_w);
|
||||||
swaps(&stuff->drw_h);
|
swaps(&stuff->drw_h);
|
||||||
return XvProcVector[xv_PutVideo] (client);
|
return ProcXvPutVideo(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1193,7 +1249,6 @@ SProcXvPutStill(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvPutStillReq);
|
REQUEST(xvPutStillReq);
|
||||||
REQUEST_SIZE_MATCH(xvPutStillReq);
|
REQUEST_SIZE_MATCH(xvPutStillReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->gc);
|
swapl(&stuff->gc);
|
||||||
|
@ -1205,7 +1260,7 @@ SProcXvPutStill(ClientPtr client)
|
||||||
swaps(&stuff->drw_y);
|
swaps(&stuff->drw_y);
|
||||||
swaps(&stuff->drw_w);
|
swaps(&stuff->drw_w);
|
||||||
swaps(&stuff->drw_h);
|
swaps(&stuff->drw_h);
|
||||||
return XvProcVector[xv_PutStill] (client);
|
return ProcXvPutStill(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1213,7 +1268,6 @@ SProcXvGetVideo(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvGetVideoReq);
|
REQUEST(xvGetVideoReq);
|
||||||
REQUEST_SIZE_MATCH(xvGetVideoReq);
|
REQUEST_SIZE_MATCH(xvGetVideoReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->gc);
|
swapl(&stuff->gc);
|
||||||
|
@ -1225,7 +1279,7 @@ SProcXvGetVideo(ClientPtr client)
|
||||||
swaps(&stuff->drw_y);
|
swaps(&stuff->drw_y);
|
||||||
swaps(&stuff->drw_w);
|
swaps(&stuff->drw_w);
|
||||||
swaps(&stuff->drw_h);
|
swaps(&stuff->drw_h);
|
||||||
return XvProcVector[xv_GetVideo] (client);
|
return ProcXvGetVideo(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1233,7 +1287,6 @@ SProcXvGetStill(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvGetStillReq);
|
REQUEST(xvGetStillReq);
|
||||||
REQUEST_SIZE_MATCH(xvGetStillReq);
|
REQUEST_SIZE_MATCH(xvGetStillReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->gc);
|
swapl(&stuff->gc);
|
||||||
|
@ -1245,7 +1298,7 @@ SProcXvGetStill(ClientPtr client)
|
||||||
swaps(&stuff->drw_y);
|
swaps(&stuff->drw_y);
|
||||||
swaps(&stuff->drw_w);
|
swaps(&stuff->drw_w);
|
||||||
swaps(&stuff->drw_h);
|
swaps(&stuff->drw_h);
|
||||||
return XvProcVector[xv_GetStill] (client);
|
return ProcXvGetStill(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1253,7 +1306,6 @@ SProcXvPutImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvPutImageReq);
|
REQUEST(xvPutImageReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xvPutImageReq);
|
REQUEST_AT_LEAST_SIZE(xvPutImageReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->gc);
|
swapl(&stuff->gc);
|
||||||
|
@ -1268,7 +1320,7 @@ SProcXvPutImage(ClientPtr client)
|
||||||
swaps(&stuff->drw_h);
|
swaps(&stuff->drw_h);
|
||||||
swaps(&stuff->width);
|
swaps(&stuff->width);
|
||||||
swaps(&stuff->height);
|
swaps(&stuff->height);
|
||||||
return XvProcVector[xv_PutImage] (client);
|
return ProcXvPutImage(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MITSHM
|
#ifdef MITSHM
|
||||||
|
@ -1277,7 +1329,6 @@ SProcXvShmPutImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvShmPutImageReq);
|
REQUEST(xvShmPutImageReq);
|
||||||
REQUEST_SIZE_MATCH(xvShmPutImageReq);
|
REQUEST_SIZE_MATCH(xvShmPutImageReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->gc);
|
swapl(&stuff->gc);
|
||||||
|
@ -1294,7 +1345,7 @@ SProcXvShmPutImage(ClientPtr client)
|
||||||
swaps(&stuff->drw_h);
|
swaps(&stuff->drw_h);
|
||||||
swaps(&stuff->width);
|
swaps(&stuff->width);
|
||||||
swaps(&stuff->height);
|
swaps(&stuff->height);
|
||||||
return XvProcVector[xv_ShmPutImage] (client);
|
return ProcXvShmPutImage(client);
|
||||||
}
|
}
|
||||||
#else /* MITSHM */
|
#else /* MITSHM */
|
||||||
#define SProcXvShmPutImage ProcXvShmPutImage
|
#define SProcXvShmPutImage ProcXvShmPutImage
|
||||||
|
@ -1305,9 +1356,8 @@ SProcXvSelectVideoNotify(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvSelectVideoNotifyReq);
|
REQUEST(xvSelectVideoNotifyReq);
|
||||||
REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq);
|
REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
return XvProcVector[xv_SelectVideoNotify] (client);
|
return ProcXvSelectVideoNotify(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1315,9 +1365,8 @@ SProcXvSelectPortNotify(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvSelectPortNotifyReq);
|
REQUEST(xvSelectPortNotifyReq);
|
||||||
REQUEST_SIZE_MATCH(xvSelectPortNotifyReq);
|
REQUEST_SIZE_MATCH(xvSelectPortNotifyReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
return XvProcVector[xv_SelectPortNotify] (client);
|
return ProcXvSelectPortNotify(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1325,10 +1374,9 @@ SProcXvStopVideo(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvStopVideoReq);
|
REQUEST(xvStopVideoReq);
|
||||||
REQUEST_SIZE_MATCH(xvStopVideoReq);
|
REQUEST_SIZE_MATCH(xvStopVideoReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
return XvProcVector[xv_StopVideo] (client);
|
return ProcXvStopVideo(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1336,11 +1384,10 @@ SProcXvSetPortAttribute(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvSetPortAttributeReq);
|
REQUEST(xvSetPortAttributeReq);
|
||||||
REQUEST_SIZE_MATCH(xvSetPortAttributeReq);
|
REQUEST_SIZE_MATCH(xvSetPortAttributeReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->attribute);
|
swapl(&stuff->attribute);
|
||||||
swapl(&stuff->value);
|
swapl(&stuff->value);
|
||||||
return XvProcVector[xv_SetPortAttribute] (client);
|
return ProcXvSetPortAttribute(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1348,10 +1395,9 @@ SProcXvGetPortAttribute(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvGetPortAttributeReq);
|
REQUEST(xvGetPortAttributeReq);
|
||||||
REQUEST_SIZE_MATCH(xvGetPortAttributeReq);
|
REQUEST_SIZE_MATCH(xvGetPortAttributeReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->attribute);
|
swapl(&stuff->attribute);
|
||||||
return XvProcVector[xv_GetPortAttribute] (client);
|
return ProcXvGetPortAttribute(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1359,13 +1405,12 @@ SProcXvQueryBestSize(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvQueryBestSizeReq);
|
REQUEST(xvQueryBestSizeReq);
|
||||||
REQUEST_SIZE_MATCH(xvQueryBestSizeReq);
|
REQUEST_SIZE_MATCH(xvQueryBestSizeReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
swaps(&stuff->vid_w);
|
swaps(&stuff->vid_w);
|
||||||
swaps(&stuff->vid_h);
|
swaps(&stuff->vid_h);
|
||||||
swaps(&stuff->drw_w);
|
swaps(&stuff->drw_w);
|
||||||
swaps(&stuff->drw_h);
|
swaps(&stuff->drw_h);
|
||||||
return XvProcVector[xv_QueryBestSize] (client);
|
return ProcXvQueryBestSize(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1373,9 +1418,8 @@ SProcXvQueryPortAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvQueryPortAttributesReq);
|
REQUEST(xvQueryPortAttributesReq);
|
||||||
REQUEST_SIZE_MATCH(xvQueryPortAttributesReq);
|
REQUEST_SIZE_MATCH(xvQueryPortAttributesReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
return XvProcVector[xv_QueryPortAttributes] (client);
|
return ProcXvQueryPortAttributes(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1383,12 +1427,11 @@ SProcXvQueryImageAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvQueryImageAttributesReq);
|
REQUEST(xvQueryImageAttributesReq);
|
||||||
REQUEST_SIZE_MATCH(xvQueryImageAttributesReq);
|
REQUEST_SIZE_MATCH(xvQueryImageAttributesReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->id);
|
swapl(&stuff->id);
|
||||||
swaps(&stuff->width);
|
swaps(&stuff->width);
|
||||||
swaps(&stuff->height);
|
swaps(&stuff->height);
|
||||||
return XvProcVector[xv_QueryImageAttributes] (client);
|
return ProcXvQueryImageAttributes(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1396,31 +1439,10 @@ SProcXvListImageFormats(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xvListImageFormatsReq);
|
REQUEST(xvListImageFormatsReq);
|
||||||
REQUEST_SIZE_MATCH(xvListImageFormatsReq);
|
REQUEST_SIZE_MATCH(xvListImageFormatsReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->port);
|
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
|
int _X_COLD
|
||||||
SProcXvDispatch(ClientPtr client)
|
SProcXvDispatch(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
@ -1428,14 +1450,53 @@ SProcXvDispatch(ClientPtr client)
|
||||||
|
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
|
|
||||||
if (stuff->data >= xvNumRequests) {
|
switch (stuff->data) {
|
||||||
return BadRequest;
|
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
|
static int
|
||||||
XineramaXvStopVideo(ClientPtr client)
|
XineramaXvStopVideo(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
@ -1459,7 +1520,7 @@ XineramaXvStopVideo(ClientPtr client)
|
||||||
if (port->info[i].id) {
|
if (port->info[i].id) {
|
||||||
stuff->drawable = draw->info[i].id;
|
stuff->drawable = draw->info[i].id;
|
||||||
stuff->port = port->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) {
|
FOR_NSCREENS_BACKWARD(i) {
|
||||||
if (port->info[i].id) {
|
if (port->info[i].id) {
|
||||||
stuff->port = port->info[i].id;
|
stuff->port = port->info[i].id;
|
||||||
result = ProcXvSetPortAttribute(client);
|
result = SingleXvSetPortAttribute(client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -1536,14 +1597,14 @@ XineramaXvShmPutImage(ClientPtr client)
|
||||||
}
|
}
|
||||||
stuff->send_event = (send_event && !i) ? 1 : 0;
|
stuff->send_event = (send_event && !i) ? 1 : 0;
|
||||||
|
|
||||||
result = ProcXvShmPutImage(client);
|
result = SingleXvShmPutImage(client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define XineramaXvShmPutImage ProcXvShmPutImage
|
#define XineramaXvShmPutImage ProcXvShmPutImage
|
||||||
#endif
|
#endif /* MITSHM */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
XineramaXvPutImage(ClientPtr client)
|
XineramaXvPutImage(ClientPtr client)
|
||||||
|
@ -1587,7 +1648,7 @@ XineramaXvPutImage(ClientPtr client)
|
||||||
stuff->drw_y -= screenInfo.screens[i]->y;
|
stuff->drw_y -= screenInfo.screens[i]->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = ProcXvPutImage(client);
|
result = SingleXvPutImage(client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -1635,7 +1696,7 @@ XineramaXvPutVideo(ClientPtr client)
|
||||||
stuff->drw_y -= screenInfo.screens[i]->y;
|
stuff->drw_y -= screenInfo.screens[i]->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = ProcXvPutVideo(client);
|
result = SingleXvPutVideo(client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -1683,7 +1744,7 @@ XineramaXvPutStill(ClientPtr client)
|
||||||
stuff->drw_y -= screenInfo.screens[i]->y;
|
stuff->drw_y -= screenInfo.screens[i]->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = ProcXvPutStill(client);
|
result = SingleXvPutStill(client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -1790,25 +1851,6 @@ XineramifyXv(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* munge the dispatch vector */
|
xvUseXinerama = 1;
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
#endif /* XINERAMA */
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
extern void XineramifyXv(void);
|
extern void XineramifyXv(void);
|
||||||
extern void XvResetProcVector(void);
|
extern int xvUseXinerama;
|
||||||
|
|
|
@ -169,6 +169,12 @@ typedef struct _XvPortRec {
|
||||||
DevUnion devPriv;
|
DevUnion devPriv;
|
||||||
} XvPortRec, *XvPortPtr;
|
} XvPortRec, *XvPortPtr;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int version, revision;
|
||||||
|
int nAdaptors;
|
||||||
|
XvAdaptorPtr pAdaptors;
|
||||||
|
} XvScreenRec, *XvScreenPtr;
|
||||||
|
|
||||||
extern _X_EXPORT int XvScreenInit(ScreenPtr);
|
extern _X_EXPORT int XvScreenInit(ScreenPtr);
|
||||||
extern _X_EXPORT DevPrivateKey XvGetScreenKey(void);
|
extern _X_EXPORT DevPrivateKey XvGetScreenKey(void);
|
||||||
extern _X_EXPORT unsigned long XvGetRTPort(void);
|
extern _X_EXPORT unsigned long XvGetRTPort(void);
|
||||||
|
|
|
@ -22,15 +22,6 @@
|
||||||
|
|
||||||
#define _XvBadPort (XvBadPort+XvErrorBase)
|
#define _XvBadPort (XvBadPort+XvErrorBase)
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int version, revision;
|
|
||||||
int nAdaptors;
|
|
||||||
XvAdaptorPtr pAdaptors;
|
|
||||||
DestroyWindowProcPtr DestroyWindow;
|
|
||||||
DestroyPixmapProcPtr DestroyPixmap;
|
|
||||||
CloseScreenProcPtr CloseScreen;
|
|
||||||
} XvScreenRec, *XvScreenPtr;
|
|
||||||
|
|
||||||
typedef struct _XvPortNotifyRec {
|
typedef struct _XvPortNotifyRec {
|
||||||
struct _XvPortNotifyRec *next;
|
struct _XvPortNotifyRec *next;
|
||||||
ClientPtr client;
|
ClientPtr client;
|
||||||
|
@ -88,4 +79,6 @@ int XvdiMatchPort(XvPortPtr pPort, DrawablePtr pDraw);
|
||||||
int XvdiGrabPort(ClientPtr client, XvPortPtr pPort, Time ctime, int *p_result);
|
int XvdiGrabPort(ClientPtr client, XvPortPtr pPort, Time ctime, int *p_result);
|
||||||
int XvdiUngrabPort(ClientPtr client, XvPortPtr pPort, Time ctime);
|
int XvdiUngrabPort(ClientPtr client, XvPortPtr pPort, Time ctime);
|
||||||
|
|
||||||
|
XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id);
|
||||||
|
|
||||||
#endif /* _XORG_XVDIX_PRIV_H */
|
#endif /* _XORG_XVDIX_PRIV_H */
|
||||||
|
|
|
@ -73,9 +73,7 @@ SOFTWARE.
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
|
@ -83,6 +81,7 @@ SOFTWARE.
|
||||||
#include <X11/extensions/Xv.h>
|
#include <X11/extensions/Xv.h>
|
||||||
#include <X11/extensions/Xvproto.h>
|
#include <X11/extensions/Xvproto.h>
|
||||||
|
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
#include "Xext/xvdix_priv.h"
|
#include "Xext/xvdix_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
@ -92,16 +91,15 @@ SOFTWARE.
|
||||||
#include "pixmapstr.h"
|
#include "pixmapstr.h"
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "extinit_priv.h"
|
|
||||||
#include "dixstruct.h"
|
#include "dixstruct.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "opaque.h"
|
#include "opaque.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef XINERAMA
|
||||||
#include "panoramiX.h"
|
#include "panoramiX.h"
|
||||||
#include "panoramiXsrv.h"
|
#include "panoramiXsrv.h"
|
||||||
#endif
|
#endif /* XINERAMA */
|
||||||
#include "xvdisp.h"
|
#include "xvdisp.h"
|
||||||
|
|
||||||
#define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = ((XvScreenPtr) \
|
#define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = ((XvScreenPtr) \
|
||||||
|
@ -130,6 +128,8 @@ int XvReqCode;
|
||||||
static int XvEventBase;
|
static int XvEventBase;
|
||||||
int XvErrorBase;
|
int XvErrorBase;
|
||||||
|
|
||||||
|
int xvUseXinerama = 0;
|
||||||
|
|
||||||
RESTYPE XvRTPort;
|
RESTYPE XvRTPort;
|
||||||
static RESTYPE XvRTEncoding;
|
static RESTYPE XvRTEncoding;
|
||||||
static RESTYPE XvRTGrab;
|
static RESTYPE XvRTGrab;
|
||||||
|
@ -143,9 +143,7 @@ static void WriteSwappedVideoNotifyEvent(xvEvent *, xvEvent *);
|
||||||
static void WriteSwappedPortNotifyEvent(xvEvent *, xvEvent *);
|
static void WriteSwappedPortNotifyEvent(xvEvent *, xvEvent *);
|
||||||
static Bool CreateResourceTypes(void);
|
static Bool CreateResourceTypes(void);
|
||||||
|
|
||||||
static Bool XvCloseScreen(ScreenPtr);
|
static void XvScreenClose(ScreenPtr, void *arg);
|
||||||
static Bool XvDestroyPixmap(PixmapPtr);
|
|
||||||
static Bool XvDestroyWindow(WindowPtr);
|
|
||||||
static void XvResetProc(ExtensionEntry *);
|
static void XvResetProc(ExtensionEntry *);
|
||||||
static int XvdiDestroyGrab(void *, XID);
|
static int XvdiDestroyGrab(void *, XID);
|
||||||
static int XvdiDestroyEncoding(void *, XID);
|
static int XvdiDestroyEncoding(void *, XID);
|
||||||
|
@ -154,6 +152,7 @@ static int XvdiDestroyPortNotify(void *, XID);
|
||||||
static int XvdiDestroyVideoNotifyList(void *, XID);
|
static int XvdiDestroyVideoNotifyList(void *, XID);
|
||||||
static int XvdiDestroyPort(void *, XID);
|
static int XvdiDestroyPort(void *, XID);
|
||||||
static int XvdiSendVideoNotify(XvPortPtr, DrawablePtr, int);
|
static int XvdiSendVideoNotify(XvPortPtr, DrawablePtr, int);
|
||||||
|
static void XvStopAdaptors(DrawablePtr pDrawable);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** XvExtensionInit
|
** XvExtensionInit
|
||||||
|
@ -176,9 +175,9 @@ XvExtensionInit(void)
|
||||||
ErrorF("XvExtensionInit: Unable to allocate resource types\n");
|
ErrorF("XvExtensionInit: Unable to allocate resource types\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef PANORAMIX
|
#ifdef XINERAMA
|
||||||
XineramaRegisterConnectionBlockCallback(XineramifyXv);
|
XineramaRegisterConnectionBlockCallback(XineramifyXv);
|
||||||
#endif
|
#endif /* XINERAMA */
|
||||||
XvScreenGeneration = serverGeneration;
|
XvScreenGeneration = serverGeneration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,6 +258,16 @@ CreateResourceTypes(void)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void XvWindowDestroy(ScreenPtr pScreen, WindowPtr pWin, void *arg)
|
||||||
|
{
|
||||||
|
XvStopAdaptors(&pWin->drawable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void XvPixmapDestroy(ScreenPtr pScreen, PixmapPtr pPixmap, void *arg)
|
||||||
|
{
|
||||||
|
XvStopAdaptors(&pPixmap->drawable);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
XvScreenInit(ScreenPtr pScreen)
|
XvScreenInit(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
|
@ -269,9 +278,9 @@ XvScreenInit(ScreenPtr pScreen)
|
||||||
ErrorF("XvScreenInit: Unable to allocate resource types\n");
|
ErrorF("XvScreenInit: Unable to allocate resource types\n");
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
#ifdef PANORAMIX
|
#ifdef XINERAMA
|
||||||
XineramaRegisterConnectionBlockCallback(XineramifyXv);
|
XineramaRegisterConnectionBlockCallback(XineramifyXv);
|
||||||
#endif
|
#endif /* XINERAMA */
|
||||||
XvScreenGeneration = serverGeneration;
|
XvScreenGeneration = serverGeneration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,40 +301,32 @@ XvScreenInit(ScreenPtr pScreen)
|
||||||
|
|
||||||
dixSetPrivate(&pScreen->devPrivates, XvScreenKey, pxvs);
|
dixSetPrivate(&pScreen->devPrivates, XvScreenKey, pxvs);
|
||||||
|
|
||||||
pxvs->DestroyPixmap = pScreen->DestroyPixmap;
|
dixScreenHookWindowDestroy(pScreen, XvWindowDestroy, NULL);
|
||||||
pxvs->DestroyWindow = pScreen->DestroyWindow;
|
dixScreenHookClose(pScreen, XvScreenClose, NULL);
|
||||||
pxvs->CloseScreen = pScreen->CloseScreen;
|
dixScreenHookPixmapDestroy(pScreen, XvPixmapDestroy, NULL);
|
||||||
|
|
||||||
pScreen->DestroyPixmap = XvDestroyPixmap;
|
|
||||||
pScreen->DestroyWindow = XvDestroyWindow;
|
|
||||||
pScreen->CloseScreen = XvCloseScreen;
|
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static void XvScreenClose(ScreenPtr pScreen, void *arg)
|
||||||
XvCloseScreen(ScreenPtr pScreen)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
XvScreenPtr pxvs;
|
XvScreenPtr pxvs;
|
||||||
|
|
||||||
pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates, XvScreenKey);
|
pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates, XvScreenKey);
|
||||||
|
|
||||||
pScreen->DestroyPixmap = pxvs->DestroyPixmap;
|
dixScreenUnhookWindowDestroy(pScreen, XvWindowDestroy, NULL);
|
||||||
pScreen->DestroyWindow = pxvs->DestroyWindow;
|
dixScreenUnhookClose(pScreen, XvScreenClose, NULL);
|
||||||
pScreen->CloseScreen = pxvs->CloseScreen;
|
dixScreenUnhookPixmapDestroy(pScreen, XvPixmapDestroy, NULL);
|
||||||
|
|
||||||
free(pxvs);
|
free(pxvs);
|
||||||
|
|
||||||
dixSetPrivate(&pScreen->devPrivates, XvScreenKey, NULL);
|
dixSetPrivate(&pScreen->devPrivates, XvScreenKey, NULL);
|
||||||
|
|
||||||
return (*pScreen->CloseScreen) (pScreen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
XvResetProc(ExtensionEntry * extEntry)
|
XvResetProc(ExtensionEntry * extEntry)
|
||||||
{
|
{
|
||||||
XvResetProcVector();
|
xvUseXinerama = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DevPrivateKey
|
DevPrivateKey
|
||||||
|
@ -369,39 +370,6 @@ XvStopAdaptors(DrawablePtr pDrawable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
|
||||||
XvDestroyPixmap(PixmapPtr pPix)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pPix->drawable.pScreen;
|
|
||||||
Bool status;
|
|
||||||
|
|
||||||
if (pPix->refcnt == 1)
|
|
||||||
XvStopAdaptors(&pPix->drawable);
|
|
||||||
|
|
||||||
SCREEN_PROLOGUE(pScreen, DestroyPixmap);
|
|
||||||
status = (*pScreen->DestroyPixmap) (pPix);
|
|
||||||
SCREEN_EPILOGUE(pScreen, DestroyPixmap, XvDestroyPixmap);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
XvDestroyWindow(WindowPtr pWin)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
Bool status;
|
|
||||||
|
|
||||||
XvStopAdaptors(&pWin->drawable);
|
|
||||||
|
|
||||||
SCREEN_PROLOGUE(pScreen, DestroyWindow);
|
|
||||||
status = (*pScreen->DestroyWindow) (pWin);
|
|
||||||
SCREEN_EPILOGUE(pScreen, DestroyWindow, XvDestroyWindow);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
XvdiDestroyPort(void *pPort, XID id)
|
XvdiDestroyPort(void *pPort, XID id)
|
||||||
{
|
{
|
||||||
|
|
32
Xext/xvmc.c
32
Xext/xvmc.c
|
@ -1,12 +1,15 @@
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
|
#include <X11/Xfuncproto.h>
|
||||||
#include <X11/Xproto.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 "Xext/xvdix_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
@ -15,14 +18,8 @@
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "extinit_priv.h"
|
|
||||||
#include "servermd.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 "xvmcext.h"
|
||||||
#include "protocol-versions.h"
|
|
||||||
|
|
||||||
#ifdef HAS_XVMCSHM
|
#ifdef HAS_XVMCSHM
|
||||||
#include <sys/ipc.h>
|
#include <sys/ipc.h>
|
||||||
|
@ -30,6 +27,9 @@
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
#endif /* HAS_XVMCSHM */
|
#endif /* HAS_XVMCSHM */
|
||||||
|
|
||||||
|
#define SERVER_XVMC_MAJOR_VERSION 1
|
||||||
|
#define SERVER_XVMC_MINOR_VERSION 1
|
||||||
|
|
||||||
#define DR_CLIENT_DRIVER_NAME_SIZE 48
|
#define DR_CLIENT_DRIVER_NAME_SIZE 48
|
||||||
#define DR_BUSID_SIZE 48
|
#define DR_BUSID_SIZE 48
|
||||||
|
|
||||||
|
@ -45,12 +45,9 @@ static RESTYPE XvMCRTContext;
|
||||||
static RESTYPE XvMCRTSurface;
|
static RESTYPE XvMCRTSurface;
|
||||||
static RESTYPE XvMCRTSubpicture;
|
static RESTYPE XvMCRTSubpicture;
|
||||||
|
|
||||||
int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr) = NULL;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int num_adaptors;
|
int num_adaptors;
|
||||||
XvMCAdaptorPtr adaptors;
|
XvMCAdaptorPtr adaptors;
|
||||||
CloseScreenProcPtr CloseScreen;
|
|
||||||
char clientDriverName[DR_CLIENT_DRIVER_NAME_SIZE];
|
char clientDriverName[DR_CLIENT_DRIVER_NAME_SIZE];
|
||||||
char busID[DR_BUSID_SIZE];
|
char busID[DR_BUSID_SIZE];
|
||||||
int major;
|
int major;
|
||||||
|
@ -735,16 +732,12 @@ XvMCExtensionInit(void)
|
||||||
extEntry->errorBase + XvMCBadSubpicture);
|
extEntry->errorBase + XvMCBadSubpicture);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static void XvMCScreenClose(ScreenPtr pScreen, void *arg)
|
||||||
XvMCCloseScreen(ScreenPtr pScreen)
|
|
||||||
{
|
{
|
||||||
XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen);
|
XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen);
|
||||||
|
|
||||||
pScreen->CloseScreen = pScreenPriv->CloseScreen;
|
|
||||||
|
|
||||||
free(pScreenPriv);
|
free(pScreenPriv);
|
||||||
|
dixSetPrivate(&pScreen->devPrivates, XvMCScreenKey, NULL);
|
||||||
return (*pScreen->CloseScreen) (pScreen);
|
dixScreenUnhookClose(pScreen, XvMCScreenClose, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -760,8 +753,7 @@ XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt)
|
||||||
|
|
||||||
dixSetPrivate(&pScreen->devPrivates, XvMCScreenKey, pScreenPriv);
|
dixSetPrivate(&pScreen->devPrivates, XvMCScreenKey, pScreenPriv);
|
||||||
|
|
||||||
pScreenPriv->CloseScreen = pScreen->CloseScreen;
|
dixScreenHookClose(pScreen, XvMCScreenClose, NULL);
|
||||||
pScreen->CloseScreen = XvMCCloseScreen;
|
|
||||||
|
|
||||||
pScreenPriv->num_adaptors = num;
|
pScreenPriv->num_adaptors = num;
|
||||||
pScreenPriv->adaptors = pAdapt;
|
pScreenPriv->adaptors = pAdapt;
|
||||||
|
|
|
@ -84,13 +84,9 @@ typedef struct {
|
||||||
XvMCDestroySubpictureProcPtr DestroySubpicture;
|
XvMCDestroySubpictureProcPtr DestroySubpicture;
|
||||||
} XvMCAdaptorRec, *XvMCAdaptorPtr;
|
} XvMCAdaptorRec, *XvMCAdaptorPtr;
|
||||||
|
|
||||||
extern int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr);
|
|
||||||
|
|
||||||
extern _X_EXPORT int XvMCScreenInit(ScreenPtr pScreen,
|
extern _X_EXPORT int XvMCScreenInit(ScreenPtr pScreen,
|
||||||
int num, XvMCAdaptorPtr adapt);
|
int num, XvMCAdaptorPtr adapt);
|
||||||
|
|
||||||
extern _X_EXPORT XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id);
|
|
||||||
|
|
||||||
extern _X_EXPORT int xf86XvMCRegisterDRInfo(ScreenPtr pScreen, const char *name,
|
extern _X_EXPORT int xf86XvMCRegisterDRInfo(ScreenPtr pScreen, const char *name,
|
||||||
const char *busID, int major, int minor,
|
const char *busID, int major, int minor,
|
||||||
int patchLevel);
|
int patchLevel);
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
|
@ -74,7 +72,6 @@ int _X_COLD
|
||||||
SProcXAllowDeviceEvents(ClientPtr client)
|
SProcXAllowDeviceEvents(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xAllowDeviceEventsReq);
|
REQUEST(xAllowDeviceEventsReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
|
REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
|
||||||
swapl(&stuff->time);
|
swapl(&stuff->time);
|
||||||
return (ProcXAllowDeviceEvents(client));
|
return (ProcXAllowDeviceEvents(client));
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h> /* control constants */
|
#include <X11/extensions/XIproto.h> /* control constants */
|
||||||
|
@ -78,7 +76,6 @@ SProcXChangeDeviceControl(ClientPtr client)
|
||||||
xDeviceCtl *ctl;
|
xDeviceCtl *ctl;
|
||||||
|
|
||||||
REQUEST(xChangeDeviceControlReq);
|
REQUEST(xChangeDeviceControlReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl));
|
REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl));
|
||||||
swaps(&stuff->control);
|
swaps(&stuff->control);
|
||||||
ctl = (xDeviceCtl *) &stuff[1];
|
ctl = (xDeviceCtl *) &stuff[1];
|
||||||
|
@ -118,7 +115,7 @@ ProcXChangeDeviceControl(ClientPtr client)
|
||||||
REQUEST(xChangeDeviceControlReq);
|
REQUEST(xChangeDeviceControlReq);
|
||||||
REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl));
|
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);
|
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
|
||||||
if (ret != Success)
|
if (ret != Success)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
|
@ -75,7 +73,6 @@ int _X_COLD
|
||||||
SProcXChangeFeedbackControl(ClientPtr client)
|
SProcXChangeFeedbackControl(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xChangeFeedbackControlReq);
|
REQUEST(xChangeFeedbackControlReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq);
|
REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq);
|
||||||
swapl(&stuff->mask);
|
swapl(&stuff->mask);
|
||||||
return (ProcXChangeFeedbackControl(client));
|
return (ProcXChangeFeedbackControl(client));
|
||||||
|
@ -438,7 +435,7 @@ ProcXChangeFeedbackControl(ClientPtr client)
|
||||||
REQUEST(xChangeFeedbackControlReq);
|
REQUEST(xChangeFeedbackControlReq);
|
||||||
REQUEST_AT_LEAST_SIZE(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);
|
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
19
Xi/chgkbd.c
19
Xi/chgkbd.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
|
@ -71,23 +69,6 @@ SOFTWARE.
|
||||||
* This procedure changes the keyboard device.
|
* 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
|
int
|
||||||
ProcXChangeKeyboardDevice(ClientPtr client)
|
ProcXChangeKeyboardDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#ifndef CHGKBD_H
|
#ifndef CHGKBD_H
|
||||||
#define CHGKBD_H 1
|
#define CHGKBD_H 1
|
||||||
|
|
||||||
int SProcXChangeKeyboardDevice(ClientPtr /* client */
|
|
||||||
);
|
|
||||||
|
|
||||||
int ProcXChangeKeyboardDevice(ClientPtr /* client */
|
int ProcXChangeKeyboardDevice(ClientPtr /* client */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
@ -77,7 +75,6 @@ SProcXChangeDeviceKeyMapping(ClientPtr client)
|
||||||
unsigned int count;
|
unsigned int count;
|
||||||
|
|
||||||
REQUEST(xChangeDeviceKeyMappingReq);
|
REQUEST(xChangeDeviceKeyMappingReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq);
|
REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq);
|
||||||
count = stuff->keyCodes * stuff->keySymsPerKeyCode;
|
count = stuff->keyCodes * stuff->keySymsPerKeyCode;
|
||||||
REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32));
|
REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32));
|
||||||
|
@ -108,7 +105,7 @@ ProcXChangeDeviceKeyMapping(ClientPtr client)
|
||||||
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
|
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
|
||||||
if (ret != Success)
|
if (ret != Success)
|
||||||
return ret;
|
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,
|
ret = ChangeKeyMapping(client, dev, len, DeviceMappingNotify,
|
||||||
stuff->firstKeyCode, stuff->keyCodes,
|
stuff->firstKeyCode, stuff->keyCodes,
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
@ -77,7 +75,6 @@ int _X_COLD
|
||||||
SProcXChangeDeviceDontPropagateList(ClientPtr client)
|
SProcXChangeDeviceDontPropagateList(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xChangeDeviceDontPropagateListReq);
|
REQUEST(xChangeDeviceDontPropagateListReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
|
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
|
||||||
swapl(&stuff->window);
|
swapl(&stuff->window);
|
||||||
swaps(&stuff->count);
|
swaps(&stuff->count);
|
||||||
|
@ -104,7 +101,7 @@ ProcXChangeDeviceDontPropagateList(ClientPtr client)
|
||||||
REQUEST(xChangeDeviceDontPropagateListReq);
|
REQUEST(xChangeDeviceDontPropagateListReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
|
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
|
||||||
|
|
||||||
if (stuff->length !=
|
if (client->req_len !=
|
||||||
bytes_to_int32(sizeof(xChangeDeviceDontPropagateListReq)) +
|
bytes_to_int32(sizeof(xChangeDeviceDontPropagateListReq)) +
|
||||||
stuff->count)
|
stuff->count)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
|
18
Xi/chgptr.c
18
Xi/chgptr.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
|
@ -67,22 +65,6 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "chgptr.h"
|
#include "chgptr.h"
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
*
|
|
||||||
* This procedure is invoked to swap the request bytes if the server and
|
|
||||||
* client have a different byte order.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXChangePointerDevice(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xChangePointerDeviceReq);
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xChangePointerDeviceReq);
|
|
||||||
return (ProcXChangePointerDevice(client));
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
*
|
*
|
||||||
* This procedure changes the device used as the X pointer.
|
* 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
|
#ifndef CHGPTR_H
|
||||||
#define CHGPTR_H 1
|
#define CHGPTR_H 1
|
||||||
|
|
||||||
int SProcXChangePointerDevice(ClientPtr /* client */
|
|
||||||
);
|
|
||||||
|
|
||||||
int ProcXChangePointerDevice(ClientPtr /* client */
|
int ProcXChangePointerDevice(ClientPtr /* client */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h" /* window structure */
|
#include "windowstr.h" /* window structure */
|
||||||
|
@ -64,21 +62,6 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "closedev.h"
|
#include "closedev.h"
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
*
|
|
||||||
* This procedure closes an input device.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXCloseDevice(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xCloseDeviceReq);
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xCloseDeviceReq);
|
|
||||||
return (ProcXCloseDevice(client));
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
*
|
*
|
||||||
* Clear out event selections and passive grabs from a window for the
|
* 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
|
#ifndef CLOSEDEV_H
|
||||||
#define CLOSEDEV_H 1
|
#define CLOSEDEV_H 1
|
||||||
|
|
||||||
int SProcXCloseDevice(ClientPtr /* client */
|
|
||||||
);
|
|
||||||
|
|
||||||
int ProcXCloseDevice(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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
|
@ -61,21 +59,6 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "devbell.h"
|
#include "devbell.h"
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
*
|
|
||||||
* This procedure is invoked to swap the request bytes if the server and
|
|
||||||
* client have a different byte order.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXDeviceBell(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xDeviceBellReq);
|
|
||||||
swaps(&stuff->length);
|
|
||||||
return (ProcXDeviceBell(client));
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
*
|
*
|
||||||
* This procedure rings a bell on an extension device.
|
* 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
|
#ifndef DEVBELL_H
|
||||||
#define DEVBELL_H 1
|
#define DEVBELL_H 1
|
||||||
|
|
||||||
int SProcXDeviceBell(ClientPtr /* client */
|
|
||||||
);
|
|
||||||
|
|
||||||
int ProcXDeviceBell(ClientPtr /* client */
|
int ProcXDeviceBell(ClientPtr /* client */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -78,9 +78,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "dix/cursor_priv.h"
|
#include "dix/cursor_priv.h"
|
||||||
|
|
||||||
|
@ -93,9 +91,11 @@ SOFTWARE.
|
||||||
#include <X11/extensions/XKBproto.h>
|
#include <X11/extensions/XKBproto.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "dix/dixgrabs_priv.h"
|
||||||
#include "dix/eventconvert.h"
|
#include "dix/eventconvert.h"
|
||||||
#include "dix/exevents_priv.h"
|
#include "dix/exevents_priv.h"
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
|
@ -105,7 +105,6 @@ SOFTWARE.
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "eventstr.h"
|
#include "eventstr.h"
|
||||||
#include "dixevents.h" /* DeliverFocusedEvent */
|
#include "dixevents.h" /* DeliverFocusedEvent */
|
||||||
#include "dixgrabs.h" /* CreateGrab() */
|
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "listdev.h" /* for CopySwapXXXClass */
|
#include "listdev.h" /* for CopySwapXXXClass */
|
||||||
#include "xace.h"
|
#include "xace.h"
|
||||||
|
|
42
Xi/extinit.c
42
Xi/extinit.c
|
@ -51,9 +51,7 @@ SOFTWARE.
|
||||||
*/
|
*/
|
||||||
#define NUMTYPES 15
|
#define NUMTYPES 15
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
@ -62,13 +60,13 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/exevents_priv.h"
|
#include "dix/exevents_priv.h"
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "gcstruct.h" /* pointer for extnsionst.h */
|
#include "gcstruct.h" /* pointer for extnsionst.h */
|
||||||
#include "extnsionst.h" /* extension entry */
|
#include "extnsionst.h" /* extension entry */
|
||||||
#include "geext.h" /* extension interfaces for ge */
|
#include "geext.h" /* extension interfaces for ge */
|
||||||
#include "dixevents.h"
|
#include "dixevents.h"
|
||||||
#include "extinit_priv.h"
|
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
#include "privates.h"
|
#include "privates.h"
|
||||||
|
@ -254,19 +252,19 @@ static int (*ProcIVector[]) (ClientPtr) = {
|
||||||
|
|
||||||
/* For swapped clients */
|
/* For swapped clients */
|
||||||
static int (*SProcIVector[]) (ClientPtr) = {
|
static int (*SProcIVector[]) (ClientPtr) = {
|
||||||
NULL, /* 0 */
|
NULL, /* 0 */
|
||||||
SProcXGetExtensionVersion, /* 1 */
|
SProcXGetExtensionVersion, /* 1 */
|
||||||
SProcXListInputDevices, /* 2 */
|
ProcXListInputDevices, /* 2 */
|
||||||
SProcXOpenDevice, /* 3 */
|
ProcXOpenDevice, /* 3 */
|
||||||
SProcXCloseDevice, /* 4 */
|
ProcXCloseDevice, /* 4 */
|
||||||
SProcXSetDeviceMode, /* 5 */
|
ProcXSetDeviceMode, /* 5 */
|
||||||
SProcXSelectExtensionEvent, /* 6 */
|
SProcXSelectExtensionEvent, /* 6 */
|
||||||
SProcXGetSelectedExtensionEvents, /* 7 */
|
SProcXGetSelectedExtensionEvents, /* 7 */
|
||||||
SProcXChangeDeviceDontPropagateList, /* 8 */
|
SProcXChangeDeviceDontPropagateList, /* 8 */
|
||||||
SProcXGetDeviceDontPropagateList, /* 9 */
|
SProcXGetDeviceDontPropagateList, /* 9 */
|
||||||
SProcXGetDeviceMotionEvents, /* 10 */
|
SProcXGetDeviceMotionEvents, /* 10 */
|
||||||
SProcXChangeKeyboardDevice, /* 11 */
|
ProcXChangeKeyboardDevice, /* 11 */
|
||||||
SProcXChangePointerDevice, /* 12 */
|
ProcXChangePointerDevice, /* 12 */
|
||||||
SProcXGrabDevice, /* 13 */
|
SProcXGrabDevice, /* 13 */
|
||||||
SProcXUngrabDevice, /* 14 */
|
SProcXUngrabDevice, /* 14 */
|
||||||
SProcXGrabDeviceKey, /* 15 */
|
SProcXGrabDeviceKey, /* 15 */
|
||||||
|
@ -274,30 +272,30 @@ static int (*SProcIVector[]) (ClientPtr) = {
|
||||||
SProcXGrabDeviceButton, /* 17 */
|
SProcXGrabDeviceButton, /* 17 */
|
||||||
SProcXUngrabDeviceButton, /* 18 */
|
SProcXUngrabDeviceButton, /* 18 */
|
||||||
SProcXAllowDeviceEvents, /* 19 */
|
SProcXAllowDeviceEvents, /* 19 */
|
||||||
SProcXGetDeviceFocus, /* 20 */
|
ProcXGetDeviceFocus, /* 20 */
|
||||||
SProcXSetDeviceFocus, /* 21 */
|
SProcXSetDeviceFocus, /* 21 */
|
||||||
SProcXGetFeedbackControl, /* 22 */
|
ProcXGetFeedbackControl, /* 22 */
|
||||||
SProcXChangeFeedbackControl, /* 23 */
|
SProcXChangeFeedbackControl, /* 23 */
|
||||||
SProcXGetDeviceKeyMapping, /* 24 */
|
ProcXGetDeviceKeyMapping, /* 24 */
|
||||||
SProcXChangeDeviceKeyMapping, /* 25 */
|
SProcXChangeDeviceKeyMapping, /* 25 */
|
||||||
SProcXGetDeviceModifierMapping, /* 26 */
|
ProcXGetDeviceModifierMapping, /* 26 */
|
||||||
SProcXSetDeviceModifierMapping, /* 27 */
|
ProcXSetDeviceModifierMapping, /* 27 */
|
||||||
SProcXGetDeviceButtonMapping, /* 28 */
|
ProcXGetDeviceButtonMapping, /* 28 */
|
||||||
SProcXSetDeviceButtonMapping, /* 29 */
|
ProcXSetDeviceButtonMapping, /* 29 */
|
||||||
SProcXQueryDeviceState, /* 30 */
|
ProcXQueryDeviceState, /* 30 */
|
||||||
SProcXSendExtensionEvent, /* 31 */
|
SProcXSendExtensionEvent, /* 31 */
|
||||||
SProcXDeviceBell, /* 32 */
|
ProcXDeviceBell, /* 32 */
|
||||||
SProcXSetDeviceValuators, /* 33 */
|
ProcXSetDeviceValuators, /* 33 */
|
||||||
SProcXGetDeviceControl, /* 34 */
|
SProcXGetDeviceControl, /* 34 */
|
||||||
SProcXChangeDeviceControl, /* 35 */
|
SProcXChangeDeviceControl, /* 35 */
|
||||||
SProcXListDeviceProperties, /* 36 */
|
ProcXListDeviceProperties, /* 36 */
|
||||||
SProcXChangeDeviceProperty, /* 37 */
|
SProcXChangeDeviceProperty, /* 37 */
|
||||||
SProcXDeleteDeviceProperty, /* 38 */
|
SProcXDeleteDeviceProperty, /* 38 */
|
||||||
SProcXGetDeviceProperty, /* 39 */
|
SProcXGetDeviceProperty, /* 39 */
|
||||||
SProcXIQueryPointer, /* 40 */
|
SProcXIQueryPointer, /* 40 */
|
||||||
SProcXIWarpPointer, /* 41 */
|
SProcXIWarpPointer, /* 41 */
|
||||||
SProcXIChangeCursor, /* 42 */
|
SProcXIChangeCursor, /* 42 */
|
||||||
SProcXIChangeHierarchy, /* 43 */
|
ProcXIChangeHierarchy, /* 43 */
|
||||||
SProcXISetClientPointer, /* 44 */
|
SProcXISetClientPointer, /* 44 */
|
||||||
SProcXIGetClientPointer, /* 45 */
|
SProcXIGetClientPointer, /* 45 */
|
||||||
SProcXISelectEvents, /* 46 */
|
SProcXISelectEvents, /* 46 */
|
||||||
|
|
16
Xi/getbmap.c
16
Xi/getbmap.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
|
@ -61,20 +59,6 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "getbmap.h"
|
#include "getbmap.h"
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
*
|
|
||||||
* This procedure gets the button mapping for the specified device.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXGetDeviceButtonMapping(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xGetDeviceButtonMappingReq);
|
|
||||||
swaps(&stuff->length);
|
|
||||||
return (ProcXGetDeviceButtonMapping(client));
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
*
|
*
|
||||||
* This procedure gets the button mapping for the specified device.
|
* 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
|
#ifndef GETBMAP_H
|
||||||
#define GETBMAP_H 1
|
#define GETBMAP_H 1
|
||||||
|
|
||||||
int SProcXGetDeviceButtonMapping(ClientPtr /* client */
|
|
||||||
);
|
|
||||||
|
|
||||||
int ProcXGetDeviceButtonMapping(ClientPtr /* client */
|
int ProcXGetDeviceButtonMapping(ClientPtr /* client */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
|
@ -72,7 +70,6 @@ int _X_COLD
|
||||||
SProcXGetDeviceControl(ClientPtr client)
|
SProcXGetDeviceControl(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xGetDeviceControlReq);
|
REQUEST(xGetDeviceControlReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xGetDeviceControlReq);
|
REQUEST_SIZE_MATCH(xGetDeviceControlReq);
|
||||||
swaps(&stuff->control);
|
swaps(&stuff->control);
|
||||||
return (ProcXGetDeviceControl(client));
|
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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
|
@ -61,21 +59,6 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "getfctl.h"
|
#include "getfctl.h"
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
*
|
|
||||||
* This procedure gets the control attributes for an extension device,
|
|
||||||
* for clients on machines with a different byte ordering than the server.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXGetFeedbackControl(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xGetFeedbackControlReq);
|
|
||||||
swaps(&stuff->length);
|
|
||||||
return (ProcXGetFeedbackControl(client));
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
*
|
*
|
||||||
* This procedure copies KbdFeedbackClass data, swapping if necessary.
|
* 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
|
#ifndef GETFCTL_H
|
||||||
#define GETFCTL_H 1
|
#define GETFCTL_H 1
|
||||||
|
|
||||||
int SProcXGetFeedbackControl(ClientPtr /* client */
|
|
||||||
);
|
|
||||||
|
|
||||||
int ProcXGetFeedbackControl(ClientPtr /* client */
|
int ProcXGetFeedbackControl(ClientPtr /* client */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "windowstr.h" /* focus struct */
|
#include "windowstr.h" /* focus struct */
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
|
@ -62,20 +60,6 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "getfocus.h"
|
#include "getfocus.h"
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
*
|
|
||||||
* This procedure gets the focus for a device.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXGetDeviceFocus(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xGetDeviceFocusReq);
|
|
||||||
swaps(&stuff->length);
|
|
||||||
return (ProcXGetDeviceFocus(client));
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
*
|
*
|
||||||
* This procedure gets the focus for a device.
|
* 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
|
#ifndef GETFOCUS_H
|
||||||
#define GETFOCUS_H 1
|
#define GETFOCUS_H 1
|
||||||
|
|
||||||
int SProcXGetDeviceFocus(ClientPtr /* client */
|
|
||||||
);
|
|
||||||
|
|
||||||
int ProcXGetDeviceFocus(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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
|
@ -64,21 +62,6 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "getkmap.h"
|
#include "getkmap.h"
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
*
|
|
||||||
* This procedure gets the key mapping for an extension device,
|
|
||||||
* for clients on machines with a different byte ordering than the server.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXGetDeviceKeyMapping(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xGetDeviceKeyMappingReq);
|
|
||||||
swaps(&stuff->length);
|
|
||||||
return (ProcXGetDeviceKeyMapping(client));
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
*
|
*
|
||||||
* Get the device key mapping.
|
* Get the device key mapping.
|
||||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#ifndef GETKMAP_H
|
#ifndef GETKMAP_H
|
||||||
#define GETKMAP_H 1
|
#define GETKMAP_H 1
|
||||||
|
|
||||||
int SProcXGetDeviceKeyMapping(ClientPtr /* client */
|
|
||||||
);
|
|
||||||
|
|
||||||
int ProcXGetDeviceKeyMapping(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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
|
@ -61,21 +59,6 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "getmmap.h"
|
#include "getmmap.h"
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
*
|
|
||||||
* This procedure gets the modifier mapping for an extension device,
|
|
||||||
* for clients on machines with a different byte ordering than the server.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXGetDeviceModifierMapping(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xGetDeviceModifierMappingReq);
|
|
||||||
swaps(&stuff->length);
|
|
||||||
return (ProcXGetDeviceModifierMapping(client));
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
*
|
*
|
||||||
* Get the device Modifier mapping.
|
* Get the device Modifier mapping.
|
||||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#ifndef GETMMAP_H
|
#ifndef GETMMAP_H
|
||||||
#define GETMMAP_H 1
|
#define GETMMAP_H 1
|
||||||
|
|
||||||
int SProcXGetDeviceModifierMapping(ClientPtr /* client */
|
|
||||||
);
|
|
||||||
|
|
||||||
int ProcXGetDeviceModifierMapping(ClientPtr /* client */
|
int ProcXGetDeviceModifierMapping(ClientPtr /* client */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
@ -78,7 +76,6 @@ int _X_COLD
|
||||||
SProcXGetDeviceDontPropagateList(ClientPtr client)
|
SProcXGetDeviceDontPropagateList(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xGetDeviceDontPropagateListReq);
|
REQUEST(xGetDeviceDontPropagateListReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq);
|
REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq);
|
||||||
swapl(&stuff->window);
|
swapl(&stuff->window);
|
||||||
return (ProcXGetDeviceDontPropagateList(client));
|
return (ProcXGetDeviceDontPropagateList(client));
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
@ -76,7 +74,6 @@ int _X_COLD
|
||||||
SProcXGetSelectedExtensionEvents(ClientPtr client)
|
SProcXGetSelectedExtensionEvents(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xGetSelectedExtensionEventsReq);
|
REQUEST(xGetSelectedExtensionEventsReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xGetSelectedExtensionEventsReq);
|
REQUEST_SIZE_MATCH(xGetSelectedExtensionEventsReq);
|
||||||
swapl(&stuff->window);
|
swapl(&stuff->window);
|
||||||
return (ProcXGetSelectedExtensionEvents(client));
|
return (ProcXGetSelectedExtensionEvents(client));
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
|
@ -74,7 +72,6 @@ int _X_COLD
|
||||||
SProcXGetExtensionVersion(ClientPtr client)
|
SProcXGetExtensionVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xGetExtensionVersionReq);
|
REQUEST(xGetExtensionVersionReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
|
REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
|
||||||
swaps(&stuff->nbytes);
|
swaps(&stuff->nbytes);
|
||||||
return (ProcXGetExtensionVersion(client));
|
return (ProcXGetExtensionVersion(client));
|
||||||
|
@ -94,7 +91,7 @@ ProcXGetExtensionVersion(ClientPtr client)
|
||||||
REQUEST(xGetExtensionVersionReq);
|
REQUEST(xGetExtensionVersionReq);
|
||||||
REQUEST_AT_LEAST_SIZE(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))
|
stuff->nbytes))
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
@ -78,13 +76,13 @@ int _X_COLD
|
||||||
SProcXGrabDevice(ClientPtr client)
|
SProcXGrabDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xGrabDeviceReq);
|
REQUEST(xGrabDeviceReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
|
REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
|
||||||
|
|
||||||
swapl(&stuff->grabWindow);
|
swapl(&stuff->grabWindow);
|
||||||
swapl(&stuff->time);
|
swapl(&stuff->time);
|
||||||
swaps(&stuff->event_count);
|
swaps(&stuff->event_count);
|
||||||
|
|
||||||
if (stuff->length !=
|
if (client->req_len !=
|
||||||
bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count)
|
bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
|
||||||
|
@ -111,7 +109,7 @@ ProcXGrabDevice(ClientPtr client)
|
||||||
REQUEST(xGrabDeviceReq);
|
REQUEST(xGrabDeviceReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
|
REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
|
||||||
|
|
||||||
if (stuff->length !=
|
if (client->req_len !=
|
||||||
bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count)
|
bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
@ -76,7 +74,6 @@ int _X_COLD
|
||||||
SProcXGrabDeviceButton(ClientPtr client)
|
SProcXGrabDeviceButton(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xGrabDeviceButtonReq);
|
REQUEST(xGrabDeviceButtonReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
|
REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
|
||||||
swapl(&stuff->grabWindow);
|
swapl(&stuff->grabWindow);
|
||||||
swaps(&stuff->modifiers);
|
swaps(&stuff->modifiers);
|
||||||
|
@ -108,7 +105,7 @@ ProcXGrabDeviceButton(ClientPtr client)
|
||||||
REQUEST(xGrabDeviceButtonReq);
|
REQUEST(xGrabDeviceButtonReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
|
REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
|
||||||
|
|
||||||
if (stuff->length !=
|
if (client->req_len !=
|
||||||
bytes_to_int32(sizeof(xGrabDeviceButtonReq)) + stuff->event_count)
|
bytes_to_int32(sizeof(xGrabDeviceButtonReq)) + stuff->event_count)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
@ -76,7 +74,6 @@ int _X_COLD
|
||||||
SProcXGrabDeviceKey(ClientPtr client)
|
SProcXGrabDeviceKey(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xGrabDeviceKeyReq);
|
REQUEST(xGrabDeviceKeyReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
|
REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
|
||||||
swapl(&stuff->grabWindow);
|
swapl(&stuff->grabWindow);
|
||||||
swaps(&stuff->modifiers);
|
swaps(&stuff->modifiers);
|
||||||
|
@ -106,7 +103,7 @@ ProcXGrabDeviceKey(ClientPtr client)
|
||||||
REQUEST(xGrabDeviceKeyReq);
|
REQUEST(xGrabDeviceKeyReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
|
REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
|
||||||
|
|
||||||
if (stuff->length !=
|
if (client->req_len !=
|
||||||
bytes_to_int32(sizeof(xGrabDeviceKeyReq)) + stuff->event_count)
|
bytes_to_int32(sizeof(xGrabDeviceKeyReq)) + stuff->event_count)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
@ -73,7 +71,6 @@ int _X_COLD
|
||||||
SProcXGetDeviceMotionEvents(ClientPtr client)
|
SProcXGetDeviceMotionEvents(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xGetDeviceMotionEventsReq);
|
REQUEST(xGetDeviceMotionEventsReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq);
|
REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq);
|
||||||
swapl(&stuff->start);
|
swapl(&stuff->start);
|
||||||
swapl(&stuff->stop);
|
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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
#include <X11/X.h> /* for inputstr.h */
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
#include <X11/Xproto.h> /* Request macro */
|
||||||
|
@ -70,20 +68,6 @@ SOFTWARE.
|
||||||
#include "xkbstr.h"
|
#include "xkbstr.h"
|
||||||
#include "listdev.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
|
* 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 */
|
#define VPC 20 /* Max # valuators per chunk */
|
||||||
|
|
||||||
int SProcXListInputDevices(ClientPtr /* client */
|
|
||||||
);
|
|
||||||
|
|
||||||
int ProcXListInputDevices(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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
|
@ -66,21 +64,6 @@ SOFTWARE.
|
||||||
|
|
||||||
extern CARD8 event_base[];
|
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.
|
* 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
|
#ifndef OPENDEV_H
|
||||||
#define OPENDEV_H 1
|
#define OPENDEV_H 1
|
||||||
|
|
||||||
int SProcXOpenDevice(ClientPtr /* client */
|
|
||||||
);
|
|
||||||
|
|
||||||
int ProcXOpenDevice(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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
@ -49,20 +47,6 @@ from The Open Group.
|
||||||
#include "xkbstr.h"
|
#include "xkbstr.h"
|
||||||
#include "queryst.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.
|
* 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
|
#ifndef QUERYST_H
|
||||||
#define QUERYST_H 1
|
#define QUERYST_H 1
|
||||||
|
|
||||||
int SProcXQueryDeviceState(ClientPtr /* client */
|
|
||||||
);
|
|
||||||
|
|
||||||
int ProcXQueryDeviceState(ClientPtr /* client */
|
int ProcXQueryDeviceState(ClientPtr /* client */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XI2.h>
|
#include <X11/extensions/XI2.h>
|
||||||
|
@ -123,7 +121,6 @@ int _X_COLD
|
||||||
SProcXSelectExtensionEvent(ClientPtr client)
|
SProcXSelectExtensionEvent(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSelectExtensionEventReq);
|
REQUEST(xSelectExtensionEventReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq);
|
REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq);
|
||||||
swapl(&stuff->window);
|
swapl(&stuff->window);
|
||||||
swaps(&stuff->count);
|
swaps(&stuff->count);
|
||||||
|
@ -150,7 +147,7 @@ ProcXSelectExtensionEvent(ClientPtr client)
|
||||||
REQUEST(xSelectExtensionEventReq);
|
REQUEST(xSelectExtensionEventReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq);
|
REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq);
|
||||||
|
|
||||||
if (stuff->length !=
|
if (client->req_len !=
|
||||||
bytes_to_int32(sizeof(xSelectExtensionEventReq)) + stuff->count)
|
bytes_to_int32(sizeof(xSelectExtensionEventReq)) + stuff->count)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
@ -84,12 +82,11 @@ SProcXSendExtensionEvent(ClientPtr client)
|
||||||
EventSwapPtr proc;
|
EventSwapPtr proc;
|
||||||
|
|
||||||
REQUEST(xSendExtensionEventReq);
|
REQUEST(xSendExtensionEventReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq);
|
REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq);
|
||||||
swapl(&stuff->destination);
|
swapl(&stuff->destination);
|
||||||
swaps(&stuff->count);
|
swaps(&stuff->count);
|
||||||
|
|
||||||
if (stuff->length !=
|
if (client->req_len !=
|
||||||
bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count +
|
bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count +
|
||||||
bytes_to_int32(stuff->num_events * sizeof(xEvent)))
|
bytes_to_int32(stuff->num_events * sizeof(xEvent)))
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
@ -135,7 +132,7 @@ ProcXSendExtensionEvent(ClientPtr client)
|
||||||
REQUEST(xSendExtensionEventReq);
|
REQUEST(xSendExtensionEventReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq);
|
REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq);
|
||||||
|
|
||||||
if (stuff->length !=
|
if (client->req_len !=
|
||||||
bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count +
|
bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count +
|
||||||
(stuff->num_events * bytes_to_int32(sizeof(xEvent))))
|
(stuff->num_events * bytes_to_int32(sizeof(xEvent))))
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
|
18
Xi/setbmap.c
18
Xi/setbmap.c
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
@ -64,20 +62,6 @@ SOFTWARE.
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "setbmap.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.
|
* This procedure lists the input devices available to the server.
|
||||||
|
@ -94,7 +78,7 @@ ProcXSetDeviceButtonMapping(ClientPtr client)
|
||||||
REQUEST(xSetDeviceButtonMappingReq);
|
REQUEST(xSetDeviceButtonMappingReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xSetDeviceButtonMappingReq);
|
REQUEST_AT_LEAST_SIZE(xSetDeviceButtonMappingReq);
|
||||||
|
|
||||||
if (stuff->length !=
|
if (client->req_len !=
|
||||||
bytes_to_int32(sizeof(xSetDeviceButtonMappingReq) + stuff->map_length))
|
bytes_to_int32(sizeof(xSetDeviceButtonMappingReq) + stuff->map_length))
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#ifndef SETBMAP_H
|
#ifndef SETBMAP_H
|
||||||
#define SETBMAP_H 1
|
#define SETBMAP_H 1
|
||||||
|
|
||||||
int SProcXSetDeviceButtonMapping(ClientPtr /* client */
|
|
||||||
);
|
|
||||||
|
|
||||||
int ProcXSetDeviceButtonMapping(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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
@ -64,20 +62,6 @@ SOFTWARE.
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "setdval.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.
|
* This procedure sets the value of valuators on an extension input device.
|
||||||
|
@ -102,7 +86,7 @@ ProcXSetDeviceValuators(ClientPtr client)
|
||||||
.status = Success
|
.status = Success
|
||||||
};
|
};
|
||||||
|
|
||||||
if (stuff->length != bytes_to_int32(sizeof(xSetDeviceValuatorsReq)) +
|
if (client->req_len != bytes_to_int32(sizeof(xSetDeviceValuatorsReq)) +
|
||||||
stuff->num_valuators)
|
stuff->num_valuators)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#ifndef SETDVAL_H
|
#ifndef SETDVAL_H
|
||||||
#define SETDVAL_H 1
|
#define SETDVAL_H 1
|
||||||
|
|
||||||
int SProcXSetDeviceValuators(ClientPtr /* client */
|
|
||||||
);
|
|
||||||
|
|
||||||
int ProcXSetDeviceValuators(ClientPtr /* client */
|
int ProcXSetDeviceValuators(ClientPtr /* client */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
@ -76,7 +74,6 @@ int _X_COLD
|
||||||
SProcXSetDeviceFocus(ClientPtr client)
|
SProcXSetDeviceFocus(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSetDeviceFocusReq);
|
REQUEST(xSetDeviceFocusReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xSetDeviceFocusReq);
|
REQUEST_SIZE_MATCH(xSetDeviceFocusReq);
|
||||||
swapl(&stuff->focus);
|
swapl(&stuff->focus);
|
||||||
swapl(&stuff->time);
|
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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XI2.h>
|
#include <X11/extensions/XI2.h>
|
||||||
|
@ -65,21 +63,6 @@ SOFTWARE.
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "setmmap.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.
|
* Set the device Modifier mapping.
|
||||||
|
@ -96,7 +79,7 @@ ProcXSetDeviceModifierMapping(ClientPtr client)
|
||||||
REQUEST(xSetDeviceModifierMappingReq);
|
REQUEST(xSetDeviceModifierMappingReq);
|
||||||
REQUEST_AT_LEAST_SIZE(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))
|
(stuff->numKeyPerModifier << 1))
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#ifndef SETMMAP_H
|
#ifndef SETMMAP_H
|
||||||
#define SETMMAP_H 1
|
#define SETMMAP_H 1
|
||||||
|
|
||||||
int SProcXSetDeviceModifierMapping(ClientPtr /* client */
|
|
||||||
);
|
|
||||||
|
|
||||||
int ProcXSetDeviceModifierMapping(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>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
@ -64,20 +62,6 @@ SOFTWARE.
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "setmode.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.
|
* 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
|
#ifndef SETMODE_H
|
||||||
#define SETMODE_H 1
|
#define SETMODE_H 1
|
||||||
|
|
||||||
int SProcXSetDeviceMode(ClientPtr /* client */
|
|
||||||
);
|
|
||||||
|
|
||||||
int ProcXSetDeviceMode(ClientPtr /* client */
|
int ProcXSetDeviceMode(ClientPtr /* client */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,7 @@ SOFTWARE.
|
||||||
* Xnest could do the same thing.
|
* Xnest could do the same thing.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
|
|
|
@ -50,9 +50,7 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h" /* window structure */
|
#include "windowstr.h" /* window structure */
|
||||||
|
@ -71,7 +69,6 @@ int _X_COLD
|
||||||
SProcXUngrabDevice(ClientPtr client)
|
SProcXUngrabDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xUngrabDeviceReq);
|
REQUEST(xUngrabDeviceReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xUngrabDeviceReq);
|
REQUEST_SIZE_MATCH(xUngrabDeviceReq);
|
||||||
swapl(&stuff->time);
|
swapl(&stuff->time);
|
||||||
return (ProcXUngrabDevice(client));
|
return (ProcXUngrabDevice(client));
|
||||||
|
|
|
@ -50,19 +50,17 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "dix/dixgrabs_priv.h"
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h" /* window structure */
|
#include "windowstr.h" /* window structure */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "dixgrabs.h"
|
|
||||||
#include "ungrdevb.h"
|
#include "ungrdevb.h"
|
||||||
|
|
||||||
#define AllModifiersMask ( \
|
#define AllModifiersMask ( \
|
||||||
|
@ -79,7 +77,6 @@ int _X_COLD
|
||||||
SProcXUngrabDeviceButton(ClientPtr client)
|
SProcXUngrabDeviceButton(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xUngrabDeviceButtonReq);
|
REQUEST(xUngrabDeviceButtonReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
|
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
|
||||||
swapl(&stuff->grabWindow);
|
swapl(&stuff->grabWindow);
|
||||||
swaps(&stuff->modifiers);
|
swaps(&stuff->modifiers);
|
||||||
|
|
|
@ -50,19 +50,17 @@ SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "dix/dixgrabs_priv.h"
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h" /* window structure */
|
#include "windowstr.h" /* window structure */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "dixgrabs.h"
|
|
||||||
#include "xkbsrv.h"
|
#include "xkbsrv.h"
|
||||||
#include "xkbstr.h"
|
#include "xkbstr.h"
|
||||||
#include "ungrdevk.h"
|
#include "ungrdevk.h"
|
||||||
|
@ -81,7 +79,6 @@ int _X_COLD
|
||||||
SProcXUngrabDeviceKey(ClientPtr client)
|
SProcXUngrabDeviceKey(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xUngrabDeviceKeyReq);
|
REQUEST(xUngrabDeviceKeyReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq);
|
REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq);
|
||||||
swapl(&stuff->grabWindow);
|
swapl(&stuff->grabWindow);
|
||||||
swaps(&stuff->modifiers);
|
swaps(&stuff->modifiers);
|
||||||
|
|
|
@ -29,9 +29,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI2.h>
|
#include <X11/extensions/XI2.h>
|
||||||
#include <X11/extensions/XI2proto.h>
|
#include <X11/extensions/XI2proto.h>
|
||||||
|
@ -53,10 +51,9 @@ SProcXIAllowEvents(ClientPtr client)
|
||||||
REQUEST(xXIAllowEventsReq);
|
REQUEST(xXIAllowEventsReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xXIAllowEventsReq);
|
REQUEST_AT_LEAST_SIZE(xXIAllowEventsReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
swaps(&stuff->deviceid);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->time);
|
swapl(&stuff->time);
|
||||||
if (stuff->length > 3) {
|
if (client->req_len > 3) {
|
||||||
xXI2_2AllowEventsReq *req_xi22 = (xXI2_2AllowEventsReq *) stuff;
|
xXI2_2AllowEventsReq *req_xi22 = (xXI2_2AllowEventsReq *) stuff;
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xXI2_2AllowEventsReq);
|
REQUEST_AT_LEAST_SIZE(xXI2_2AllowEventsReq);
|
||||||
|
|
|
@ -41,9 +41,7 @@
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "dix/cursor_priv.h"
|
#include "dix/cursor_priv.h"
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
@ -844,7 +842,6 @@ SProcXIBarrierReleasePointer(ClientPtr client)
|
||||||
REQUEST(xXIBarrierReleasePointerReq);
|
REQUEST(xXIBarrierReleasePointerReq);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq);
|
REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq);
|
||||||
|
|
||||||
swapl(&stuff->num_barriers);
|
swapl(&stuff->num_barriers);
|
||||||
|
|
|
@ -29,9 +29,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
#include <X11/X.h> /* for inputstr.h */
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
#include <X11/Xproto.h> /* Request macro */
|
||||||
|
@ -61,7 +59,6 @@ SProcXIChangeCursor(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXIChangeCursorReq);
|
REQUEST(xXIChangeCursorReq);
|
||||||
REQUEST_SIZE_MATCH(xXIChangeCursorReq);
|
REQUEST_SIZE_MATCH(xXIChangeCursorReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->win);
|
swapl(&stuff->win);
|
||||||
swapl(&stuff->cursor);
|
swapl(&stuff->cursor);
|
||||||
swaps(&stuff->deviceid);
|
swaps(&stuff->deviceid);
|
||||||
|
|
|
@ -30,9 +30,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
#include <X11/X.h> /* for inputstr.h */
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
#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
|
static int
|
||||||
add_master(ClientPtr client, xXIAddMasterInfo * c, int flags[MAXDEVICES])
|
add_master(ClientPtr client, xXIAddMasterInfo * c, int flags[MAXDEVICES])
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
#ifndef CHDEVHIER_H
|
#ifndef CHDEVHIER_H
|
||||||
#define CHDEVHIER_H 1
|
#define CHDEVHIER_H 1
|
||||||
|
|
||||||
int SProcXIChangeHierarchy(ClientPtr /* client */ );
|
|
||||||
int ProcXIChangeHierarchy(ClientPtr /* client */ );
|
int ProcXIChangeHierarchy(ClientPtr /* client */ );
|
||||||
|
|
||||||
void XISendDeviceHierarchyEvent(int flags[MAXDEVICES]);
|
void XISendDeviceHierarchyEvent(int flags[MAXDEVICES]);
|
||||||
|
|
|
@ -23,9 +23,7 @@
|
||||||
* Author: Peter Hutterer, University of South Australia, NICTA
|
* Author: Peter Hutterer, University of South Australia, NICTA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
#include <X11/X.h> /* for inputstr.h */
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
#include <X11/Xproto.h> /* Request macro */
|
||||||
|
@ -38,7 +36,6 @@
|
||||||
#include "windowstr.h" /* window structure */
|
#include "windowstr.h" /* window structure */
|
||||||
#include "scrnintstr.h" /* screen structure */
|
#include "scrnintstr.h" /* screen structure */
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "xigetclientpointer.h"
|
#include "xigetclientpointer.h"
|
||||||
|
@ -54,7 +51,6 @@ SProcXIGetClientPointer(ClientPtr client)
|
||||||
REQUEST(xXIGetClientPointerReq);
|
REQUEST(xXIGetClientPointerReq);
|
||||||
REQUEST_SIZE_MATCH(xXIGetClientPointerReq);
|
REQUEST_SIZE_MATCH(xXIGetClientPointerReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->win);
|
swapl(&stuff->win);
|
||||||
return ProcXIGetClientPointer(client);
|
return ProcXIGetClientPointer(client);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI2.h>
|
#include <X11/extensions/XI2.h>
|
||||||
#include <X11/extensions/XI2proto.h>
|
#include <X11/extensions/XI2proto.h>
|
||||||
|
@ -55,7 +53,6 @@ SProcXIGrabDevice(ClientPtr client)
|
||||||
*/
|
*/
|
||||||
REQUEST_AT_LEAST_SIZE(xXIGrabDeviceReq);
|
REQUEST_AT_LEAST_SIZE(xXIGrabDeviceReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
swaps(&stuff->deviceid);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->grab_window);
|
swapl(&stuff->grab_window);
|
||||||
swapl(&stuff->cursor);
|
swapl(&stuff->cursor);
|
||||||
|
@ -140,7 +137,6 @@ SProcXIUngrabDevice(ClientPtr client)
|
||||||
REQUEST(xXIUngrabDeviceReq);
|
REQUEST(xXIUngrabDeviceReq);
|
||||||
REQUEST_SIZE_MATCH(xXIUngrabDeviceReq);
|
REQUEST_SIZE_MATCH(xXIUngrabDeviceReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
swaps(&stuff->deviceid);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->time);
|
swapl(&stuff->time);
|
||||||
|
|
||||||
|
|
|
@ -29,14 +29,13 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/extensions/XI2.h>
|
#include <X11/extensions/XI2.h>
|
||||||
#include <X11/extensions/XI2proto.h>
|
#include <X11/extensions/XI2proto.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "dix/dixgrabs_priv.h"
|
||||||
#include "dix/exevents_priv.h"
|
#include "dix/exevents_priv.h"
|
||||||
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
|
@ -44,7 +43,6 @@
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
#include "exglobals.h" /* BadDevice */
|
#include "exglobals.h" /* BadDevice */
|
||||||
#include "xipassivegrab.h"
|
#include "xipassivegrab.h"
|
||||||
#include "dixgrabs.h"
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "inpututils.h"
|
#include "inpututils.h"
|
||||||
|
|
||||||
|
@ -57,7 +55,6 @@ SProcXIPassiveGrabDevice(ClientPtr client)
|
||||||
REQUEST(xXIPassiveGrabDeviceReq);
|
REQUEST(xXIPassiveGrabDeviceReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq);
|
REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
swaps(&stuff->deviceid);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->grab_window);
|
swapl(&stuff->grab_window);
|
||||||
swapl(&stuff->cursor);
|
swapl(&stuff->cursor);
|
||||||
|
@ -282,7 +279,6 @@ SProcXIPassiveUngrabDevice(ClientPtr client)
|
||||||
REQUEST(xXIPassiveUngrabDeviceReq);
|
REQUEST(xXIPassiveUngrabDeviceReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq);
|
REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->grab_window);
|
swapl(&stuff->grab_window);
|
||||||
swaps(&stuff->deviceid);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->detail);
|
swapl(&stuff->detail);
|
||||||
|
|
|
@ -25,9 +25,7 @@
|
||||||
|
|
||||||
/* This code is a modified version of randr/rrproperty.c */
|
/* This code is a modified version of randr/rrproperty.c */
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
|
@ -1015,23 +1013,12 @@ ProcXGetDeviceProperty(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXListDeviceProperties(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xListDevicePropertiesReq);
|
|
||||||
REQUEST_SIZE_MATCH(xListDevicePropertiesReq);
|
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
return (ProcXListDeviceProperties(client));
|
|
||||||
}
|
|
||||||
|
|
||||||
int _X_COLD
|
int _X_COLD
|
||||||
SProcXChangeDeviceProperty(ClientPtr client)
|
SProcXChangeDeviceProperty(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xChangeDevicePropertyReq);
|
REQUEST(xChangeDevicePropertyReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq);
|
REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->property);
|
swapl(&stuff->property);
|
||||||
swapl(&stuff->type);
|
swapl(&stuff->type);
|
||||||
swapl(&stuff->nUnits);
|
swapl(&stuff->nUnits);
|
||||||
|
@ -1044,7 +1031,6 @@ SProcXDeleteDeviceProperty(ClientPtr client)
|
||||||
REQUEST(xDeleteDevicePropertyReq);
|
REQUEST(xDeleteDevicePropertyReq);
|
||||||
REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq);
|
REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->property);
|
swapl(&stuff->property);
|
||||||
return (ProcXDeleteDeviceProperty(client));
|
return (ProcXDeleteDeviceProperty(client));
|
||||||
}
|
}
|
||||||
|
@ -1055,7 +1041,6 @@ SProcXGetDeviceProperty(ClientPtr client)
|
||||||
REQUEST(xGetDevicePropertyReq);
|
REQUEST(xGetDevicePropertyReq);
|
||||||
REQUEST_SIZE_MATCH(xGetDevicePropertyReq);
|
REQUEST_SIZE_MATCH(xGetDevicePropertyReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
swapl(&stuff->property);
|
swapl(&stuff->property);
|
||||||
swapl(&stuff->type);
|
swapl(&stuff->type);
|
||||||
swapl(&stuff->longOffset);
|
swapl(&stuff->longOffset);
|
||||||
|
@ -1263,7 +1248,6 @@ SProcXIListProperties(ClientPtr client)
|
||||||
REQUEST(xXIListPropertiesReq);
|
REQUEST(xXIListPropertiesReq);
|
||||||
REQUEST_SIZE_MATCH(xXIListPropertiesReq);
|
REQUEST_SIZE_MATCH(xXIListPropertiesReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
swaps(&stuff->deviceid);
|
swaps(&stuff->deviceid);
|
||||||
return (ProcXIListProperties(client));
|
return (ProcXIListProperties(client));
|
||||||
}
|
}
|
||||||
|
@ -1274,7 +1258,6 @@ SProcXIChangeProperty(ClientPtr client)
|
||||||
REQUEST(xXIChangePropertyReq);
|
REQUEST(xXIChangePropertyReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq);
|
REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
swaps(&stuff->deviceid);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->property);
|
swapl(&stuff->property);
|
||||||
swapl(&stuff->type);
|
swapl(&stuff->type);
|
||||||
|
@ -1288,7 +1271,6 @@ SProcXIDeleteProperty(ClientPtr client)
|
||||||
REQUEST(xXIDeletePropertyReq);
|
REQUEST(xXIDeletePropertyReq);
|
||||||
REQUEST_SIZE_MATCH(xXIDeletePropertyReq);
|
REQUEST_SIZE_MATCH(xXIDeletePropertyReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
swaps(&stuff->deviceid);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->property);
|
swapl(&stuff->property);
|
||||||
return (ProcXIDeleteProperty(client));
|
return (ProcXIDeleteProperty(client));
|
||||||
|
@ -1300,7 +1282,6 @@ SProcXIGetProperty(ClientPtr client)
|
||||||
REQUEST(xXIGetPropertyReq);
|
REQUEST(xXIGetPropertyReq);
|
||||||
REQUEST_SIZE_MATCH(xXIGetPropertyReq);
|
REQUEST_SIZE_MATCH(xXIGetPropertyReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
swaps(&stuff->deviceid);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->property);
|
swapl(&stuff->property);
|
||||||
swapl(&stuff->type);
|
swapl(&stuff->type);
|
||||||
|
|
|
@ -36,7 +36,6 @@ int ProcXDeleteDeviceProperty(ClientPtr client);
|
||||||
int ProcXGetDeviceProperty(ClientPtr client);
|
int ProcXGetDeviceProperty(ClientPtr client);
|
||||||
|
|
||||||
/* request swapping */
|
/* request swapping */
|
||||||
int SProcXListDeviceProperties(ClientPtr client);
|
|
||||||
int SProcXChangeDeviceProperty(ClientPtr client);
|
int SProcXChangeDeviceProperty(ClientPtr client);
|
||||||
int SProcXDeleteDeviceProperty(ClientPtr client);
|
int SProcXDeleteDeviceProperty(ClientPtr client);
|
||||||
int SProcXGetDeviceProperty(ClientPtr client);
|
int SProcXGetDeviceProperty(ClientPtr client);
|
||||||
|
|
|
@ -28,9 +28,7 @@
|
||||||
* @file Protocol handling for the XIQueryDevice request/reply.
|
* @file Protocol handling for the XIQueryDevice request/reply.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
@ -60,7 +58,6 @@ SProcXIQueryDevice(ClientPtr client)
|
||||||
REQUEST(xXIQueryDeviceReq);
|
REQUEST(xXIQueryDeviceReq);
|
||||||
REQUEST_SIZE_MATCH(xXIQueryDeviceReq);
|
REQUEST_SIZE_MATCH(xXIQueryDeviceReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
swaps(&stuff->deviceid);
|
swaps(&stuff->deviceid);
|
||||||
|
|
||||||
return ProcXIQueryDevice(client);
|
return ProcXIQueryDevice(client);
|
||||||
|
|
|
@ -29,9 +29,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
#include <X11/X.h> /* for inputstr.h */
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
#include <X11/Xproto.h> /* Request macro */
|
||||||
|
@ -50,9 +48,9 @@
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "xkbsrv.h"
|
#include "xkbsrv.h"
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef XINERAMA
|
||||||
#include "panoramiXsrv.h"
|
#include "panoramiXsrv.h"
|
||||||
#endif
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
#include "inpututils.h"
|
#include "inpututils.h"
|
||||||
#include "xiquerypointer.h"
|
#include "xiquerypointer.h"
|
||||||
|
@ -69,7 +67,6 @@ SProcXIQueryPointer(ClientPtr client)
|
||||||
REQUEST(xXIQueryPointerReq);
|
REQUEST(xXIQueryPointerReq);
|
||||||
REQUEST_SIZE_MATCH(xXIQueryPointerReq);
|
REQUEST_SIZE_MATCH(xXIQueryPointerReq);
|
||||||
|
|
||||||
swaps(&stuff->length);
|
|
||||||
swaps(&stuff->deviceid);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->win);
|
swapl(&stuff->win);
|
||||||
return (ProcXIQueryPointer(client));
|
return (ProcXIQueryPointer(client));
|
||||||
|
@ -186,7 +183,7 @@ ProcXIQueryPointer(ClientPtr client)
|
||||||
rep.win_y = 0;
|
rep.win_y = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef XINERAMA
|
||||||
if (!noPanoramiXExtension) {
|
if (!noPanoramiXExtension) {
|
||||||
rep.root_x += double_to_fp1616(screenInfo.screens[0]->x);
|
rep.root_x += double_to_fp1616(screenInfo.screens[0]->x);
|
||||||
rep.root_y += double_to_fp1616(screenInfo.screens[0]->y);
|
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);
|
rep.win_y += double_to_fp1616(screenInfo.screens[0]->y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
WriteReplyToClient(client, sizeof(xXIQueryPointerReply), &rep);
|
WriteReplyToClient(client, sizeof(xXIQueryPointerReply), &rep);
|
||||||
if (buttons)
|
if (buttons)
|
||||||
|
|
|
@ -29,9 +29,7 @@
|
||||||
* Protocol handling for the XIQueryVersion request/reply.
|
* Protocol handling for the XIQueryVersion request/reply.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
|
|
||||||
|
@ -135,7 +133,6 @@ int _X_COLD
|
||||||
SProcXIQueryVersion(ClientPtr client)
|
SProcXIQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXIQueryVersionReq);
|
REQUEST(xXIQueryVersionReq);
|
||||||
swaps(&stuff->length);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xXIQueryVersionReq);
|
REQUEST_AT_LEAST_SIZE(xXIQueryVersionReq);
|
||||||
swaps(&stuff->major_version);
|
swaps(&stuff->major_version);
|
||||||
swaps(&stuff->minor_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