Compare commits
248 Commits
master
...
wip/xwin-2
Author | SHA1 | Date | |
---|---|---|---|
|
c002b468a5 | ||
|
b5555c768c | ||
|
0b66320b0a | ||
|
07136784f0 | ||
|
ca5c59282d | ||
|
9bfdd642f2 | ||
|
646a9ae840 | ||
|
b2b0f689f3 | ||
|
f6d9a1328a | ||
|
464d90f51f | ||
|
f089a051dd | ||
|
ba9987084d | ||
|
35f3bc35d0 | ||
|
ca1fd624d1 | ||
|
08c40176b7 | ||
|
fd3e71d43f | ||
|
bf4ad69fd0 | ||
|
1e65f1f277 | ||
|
3a870c4966 | ||
|
d23b7a1afc | ||
|
b49c721cca | ||
|
1c752c1e89 | ||
|
224ff30b03 | ||
|
e447bd5ac2 | ||
|
a57215e493 | ||
|
77190f5f49 | ||
|
2e832c5610 | ||
|
ca455bb576 | ||
|
a2a7a73602 | ||
|
a4931305d4 | ||
|
6796d0b0aa | ||
|
b295da292a | ||
|
424aab0a49 | ||
|
729e261776 | ||
|
4f6e399b16 | ||
|
260fb36531 | ||
|
7ea2bde1fc | ||
|
bfb18f9dd9 | ||
|
68b7da3903 | ||
|
90139fff55 | ||
|
f5904e298b | ||
|
54a40fe3f6 | ||
|
5c69562bd2 | ||
|
64645c3651 | ||
|
fa67c90419 | ||
|
54a13393a1 | ||
|
3fbb7f2292 | ||
|
9eb6c9f3f9 | ||
|
079a8c6145 | ||
|
ae8fab563b | ||
|
9a79e41344 | ||
|
658461ebe6 | ||
|
7f7c3c8845 | ||
|
a16a2954b4 | ||
|
e8448cdae9 | ||
|
5fa1c5fa21 | ||
|
de6d1f6808 | ||
|
955a1ce385 | ||
|
160c640bff | ||
|
741b019769 | ||
|
e8f8b605c7 | ||
|
13ebe52348 | ||
|
f540e39e11 | ||
|
fb042961a9 | ||
|
d9f8e7a321 | ||
|
ab0cb5ded1 | ||
|
fb074d7f1e | ||
|
4a864fa091 | ||
|
2a7a0ab44e | ||
|
94dcb32f7a | ||
|
955f8683c9 | ||
|
495fd2bbb4 | ||
|
9cd7989eb2 | ||
|
33a042b6f8 | ||
|
907d04d0dd | ||
|
d9098a8e46 | ||
|
562943f1bb | ||
|
7c57c2d89f | ||
|
075b9ae6c1 | ||
|
af4bdb6d3e | ||
|
d6e8e7f70f | ||
|
967267d60a | ||
|
d7cbe9613e | ||
|
3537231d57 | ||
|
edde433640 | ||
|
d146d1f8de | ||
|
0973fc8410 | ||
|
45b4877ff3 | ||
|
61d3a56302 | ||
|
3be5207c67 | ||
|
dd87de6cc8 | ||
|
bf757a5164 | ||
|
848e12874d | ||
|
61b2983863 | ||
|
ce484e3c30 | ||
|
66c727ab79 | ||
|
806bbae1e1 | ||
|
3efc02f4ff | ||
|
54ce887c51 | ||
|
bdf4a745bf | ||
|
67db87e4c1 | ||
|
682a4805e0 | ||
|
78b6f4be97 | ||
|
432deaeb46 | ||
|
69bb48b07e | ||
|
af64b96e88 | ||
|
4f4463477c | ||
|
e61460e469 | ||
|
a43e009f5d | ||
|
a4313db46b | ||
|
a1377e4b3c | ||
|
c74a77f619 | ||
|
13de55b44a | ||
|
b7857feca4 | ||
|
c8a1cc71db | ||
|
c8f90647be | ||
|
7c2b54d9fd | ||
|
7108b36006 | ||
|
73c8b74b99 | ||
|
df20e9e2b4 | ||
|
9781db08d2 | ||
|
9a4d45d29a | ||
|
fb03311900 | ||
|
b591ea4fe6 | ||
|
a9dc4124ee | ||
|
991f131014 | ||
|
e9773e6746 | ||
|
df324c6150 | ||
|
0f20702684 | ||
|
e65b9a3618 | ||
|
db9c571da2 | ||
|
9e657bf0fc | ||
|
e9e52dda3e | ||
|
144a1f01fd | ||
|
eb3f6505e1 | ||
|
897020f338 | ||
|
5c4e17cf74 | ||
|
6c301f468b | ||
|
50159397bd | ||
|
17686bf085 | ||
|
78f10a9a9c | ||
|
dd703f91cb | ||
|
947f258415 | ||
|
874bd3e8c3 | ||
|
9a9113b61d | ||
|
11931842cf | ||
|
a969ed51cf | ||
|
9637417df7 | ||
|
d1dd76233f | ||
|
2dfef51805 | ||
|
19505cf492 | ||
|
e3d3b07232 | ||
|
f3d4fdfc67 | ||
|
f4fa2a78e2 | ||
|
ab5fdbb9b4 | ||
|
f10f055bf8 | ||
|
e4b1fab4c8 | ||
|
45b1a0001d | ||
|
39ca976eb8 | ||
|
5ad2a00ac7 | ||
|
dfe5f1a749 | ||
|
cc1a05c5af | ||
|
1f999dc94e | ||
|
1ae32c0fa8 | ||
|
5cbd74a178 | ||
|
dd094c8270 | ||
|
47fcb6798a | ||
|
1f3a8f42ef | ||
|
2504bff578 | ||
|
b29ffcd79c | ||
|
4426951b20 | ||
|
742f398e23 | ||
|
9868a2ca5b | ||
|
a809fc7d82 | ||
|
a186427921 | ||
|
43418c8930 | ||
|
032200f1de | ||
|
8ddabaa8f1 | ||
|
289fe01302 | ||
|
936efc2359 | ||
|
dbbdb2cbb6 | ||
|
15052889b9 | ||
|
c6fb4baea9 | ||
|
3d4c4d4e86 | ||
|
d5f6ff80b0 | ||
|
cbb5d8aa79 | ||
|
dd04d3fe5c | ||
|
c248346e78 | ||
|
987f37270b | ||
|
2f7c911730 | ||
|
5ec097d808 | ||
|
c320ef0bb0 | ||
|
1ecd80dc59 | ||
|
2070c4b596 | ||
|
c9680408a2 | ||
|
7ee9f4e397 | ||
|
ff29e0294e | ||
|
6b6dd29921 | ||
|
11b536415c | ||
|
33abdc49cf | ||
|
e5f5bb62f3 | ||
|
a801164bf5 | ||
|
c4f89e4edc | ||
|
08e8e1af35 | ||
|
b3f592b481 | ||
|
d4deaac6e1 | ||
|
dd10f37777 | ||
|
26ce5c0eaa | ||
|
c302f4bee4 | ||
|
af38f95dc5 | ||
|
95f8fe39e0 | ||
|
e539a4e333 | ||
|
5101d9ce63 | ||
|
539902e8b0 | ||
|
8aae0777bb | ||
|
227c77c575 | ||
|
c1c6045ca1 | ||
|
d375bcd41a | ||
|
539bea0360 | ||
|
b5844fca4d | ||
|
fdd94d7a2a | ||
|
2c42e1eee9 | ||
|
1603cf9df3 | ||
|
f7e2c1030d | ||
|
fa46ba1901 | ||
|
29a965d373 | ||
|
1ded56e9e6 | ||
|
9d02bc2f3f | ||
|
8f6f536324 | ||
|
5b0fe6cfe8 | ||
|
1caa65d8bc | ||
|
0f723a691b | ||
|
e5f89d0f14 | ||
|
15ceff0167 | ||
|
881184d664 | ||
|
44d38c9e8e | ||
|
74ba2b1af5 | ||
|
43b20e2369 | ||
|
cfdc7b7caa | ||
|
f365b8f211 | ||
|
03967f3242 | ||
|
f8cec9cd77 | ||
|
14aa275b97 | ||
|
2eb9c61fb0 | ||
|
b48b09b950 | ||
|
fac6868a87 | ||
|
7f805bf1a6 | ||
|
0fd6315f74 |
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. .github/scripts/util.sh
|
||||||
|
|
||||||
|
export PKG_CONFIG_PATH="/usr/local/lib/x86_64-linux-gnu/pkgconfig/:$PKG_CONFIG_PATH"
|
||||||
|
export ACLOCAL_PATH="/usr/share/aclocal:/usr/local/share/aclocal"
|
||||||
|
export XORG_DRV_GIT=https://gitlab.freedesktop.org/xorg/driver
|
||||||
|
export XMTX_DRV_GIT=https://gitlab.freedesktop.org/metux/
|
||||||
|
|
||||||
|
mkdir -p $DRV_BUILD_DIR
|
||||||
|
cd $DRV_BUILD_DIR
|
||||||
|
|
||||||
|
# FIXME: add more drivers
|
||||||
|
build_drv_ac xf86-input-elographics $XORG_DRV_GIT/xf86-input-elographics xf86-input-elographics-1.4.4
|
||||||
|
build_drv_ac xf86-input-evdev $XORG_DRV_GIT/xf86-input-evdev xf86-input-evdev-2.10.6
|
||||||
|
build_drv_ac xf86-input-libinput $XORG_DRV_GIT/xf86-input-libinput xf86-input-libinput-1.4.0
|
||||||
|
build_drv_ac xf86-input-mouse $XORG_DRV_GIT/xf86-input-mouse master
|
||||||
|
build_drv_ac xf86-input-synaptics $XORG_DRV_GIT/xf86-input-synaptics xf86-input-synaptics-1.10.0
|
||||||
|
|
||||||
|
build_drv_ac xf86-video-amdgpu $XORG_DRV_GIT/xf86-video-amdgpu xf86-video-amdgpu-23.0.0
|
||||||
|
build_drv_ac xf86-video-armsoc $XORG_DRV_GIT/xf86-video-armsoc 1.4.1
|
||||||
|
build_drv_ac xf86-video-ati $XORG_DRV_GIT/xf86-video-ati xf86-video-ati-22.0.0
|
||||||
|
build_drv_ac xf86-video-intel $XMTX_DRV_GIT/xf86-video-intel.git incubate # upstream broken against current Xserver
|
||||||
|
build_drv_ac xf86-video-nouveau $XORG_DRV_GIT/xf86-video-nouveau xf86-video-nouveau-1.0.18
|
||||||
|
build_drv_ac xf86-video-omap $XORG_DRV_GIT/xf86-video-omap master
|
||||||
|
build_drv_ac xf86-video-qxl $XORG_DRV_GIT/xf86-video-qxl master
|
||||||
|
build_drv_ac xf86-video-r128 $XORG_DRV_GIT/xf86-video-r128 master
|
||||||
|
build_drv_ac xf86-video-vesa $XORG_DRV_GIT/xf86-video-vesa xf86-video-vesa-2.6.0
|
||||||
|
build_drv_ac xf86-video-vmware $XORG_DRV_GIT/xf86-video-vmware xf86-video-vmware-13.4.0
|
||||||
|
|
||||||
|
# doesn't compile on Linux
|
||||||
|
# build_drv_ac xf86-input-keyboard $XORG_DRV_GIT/xf86-input-keyboard master
|
|
@ -0,0 +1,6 @@
|
||||||
|
export X11_PREFIX=/home/runner/x11
|
||||||
|
export PATH="$X11_PREFIX/bin:$PATH"
|
||||||
|
export PKG_CONFIG_PATH="$X11_PREFIX/lib/x86_64-linux-gnu/pkgconfig:$X11_PREFIX/lib/pkgconfig:$X11_PREFIX/share/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
|
export FDO_CI_CONCURRENT=`nproc`
|
||||||
|
export X11_BUILD_DIR=/home/runner/build-deps
|
||||||
|
export DRV_BUILD_DIR=/home/runner/build-drivers
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. .github/scripts/util.sh
|
||||||
|
|
||||||
|
mkdir -p $X11_BUILD_DIR
|
||||||
|
cd $X11_BUILD_DIR
|
||||||
|
|
||||||
|
build_meson rendercheck https://gitlab.freedesktop.org/xorg/test/rendercheck rendercheck-1.6
|
||||||
|
build_meson drm https://gitlab.freedesktop.org/mesa/drm libdrm-2.4.121 \
|
||||||
|
-Domap=enabled
|
||||||
|
build_meson libxcvt https://gitlab.freedesktop.org/xorg/lib/libxcvt libxcvt-0.1.0
|
||||||
|
build_ac xorgproto https://gitlab.freedesktop.org/xorg/proto/xorgproto xorgproto-2024.1
|
||||||
|
build_meson wayland https://gitlab.freedesktop.org/wayland/wayland 1.21.0 \
|
||||||
|
-Dtests=false -Ddocumentation=false -Ddtd_validation=false
|
||||||
|
build_meson wayland-protocols https://gitlab.freedesktop.org/wayland/wayland-protocols 1.38
|
||||||
|
build_meson libdecor https://gitlab.freedesktop.org/libdecor/libdecor 0.1.1 \
|
||||||
|
-D{demo,install_demo}=false
|
||||||
|
build_meson libei https://gitlab.freedesktop.org/libinput/libei 1.0.0 \
|
||||||
|
-Dtests=disabled -Ddocumentation=[] -Dliboeffis=enabled
|
||||||
|
build_ac_xts xts https://gitlab.freedesktop.org/xorg/test/xts master # dbbfa96c036e596346147081cbceda136e7c86c1
|
||||||
|
|
||||||
|
clone_source piglit https://gitlab.freedesktop.org/mesa/piglit main # 265896c86f90cb72e8f218ba6a3617fca8b9a1e3
|
||||||
|
|
||||||
|
echo '[xts]' > piglit/piglit.conf
|
||||||
|
echo "path=$X11_BUILD_DIR/xts" >> piglit/piglit.conf
|
|
@ -0,0 +1,104 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Packages which are needed by this script, but not for the xserver build
|
||||||
|
EPHEMERAL="
|
||||||
|
libexpat-dev
|
||||||
|
libgles2-mesa-dev
|
||||||
|
libxkbcommon-dev
|
||||||
|
x11-utils
|
||||||
|
x11-xserver-utils
|
||||||
|
xauth
|
||||||
|
xvfb
|
||||||
|
"
|
||||||
|
|
||||||
|
apt-get update
|
||||||
|
|
||||||
|
# mingw-w64-tools \
|
||||||
|
# gcc-mingw-w64-i686 \
|
||||||
|
# libz-mingw-w64-dev \
|
||||||
|
|
||||||
|
apt-get install -y \
|
||||||
|
$EPHEMERAL \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
build-essential \
|
||||||
|
ca-certificates \
|
||||||
|
libaudit-dev \
|
||||||
|
libbsd-dev \
|
||||||
|
libcairo2-dev \
|
||||||
|
libdbus-1-dev \
|
||||||
|
libdrm-dev \
|
||||||
|
libegl1-mesa-dev \
|
||||||
|
libepoxy-dev \
|
||||||
|
libevdev2 \
|
||||||
|
libexpat1 \
|
||||||
|
libffi-dev \
|
||||||
|
libgbm-dev \
|
||||||
|
libgcrypt-dev \
|
||||||
|
libgl1-mesa-dev \
|
||||||
|
libgles2 \
|
||||||
|
libglx-mesa0 \
|
||||||
|
libinput10 \
|
||||||
|
libinput-dev \
|
||||||
|
libnvidia-egl-wayland-dev \
|
||||||
|
libpciaccess-dev \
|
||||||
|
libpixman-1-dev \
|
||||||
|
libselinux1-dev \
|
||||||
|
libspice-protocol-dev \
|
||||||
|
libsystemd-dev \
|
||||||
|
libudev-dev \
|
||||||
|
libunwind-dev \
|
||||||
|
libx11-dev \
|
||||||
|
libx11-xcb-dev \
|
||||||
|
libxau-dev \
|
||||||
|
libxcb-glx0-dev \
|
||||||
|
libxcb-icccm4-dev \
|
||||||
|
libxcb-image0-dev \
|
||||||
|
libxcb-keysyms1-dev \
|
||||||
|
libxcb-randr0-dev \
|
||||||
|
libxcb-render-util0-dev \
|
||||||
|
libxcb-render0-dev \
|
||||||
|
libxcb-shape0-dev \
|
||||||
|
libxcb-shm0-dev \
|
||||||
|
libxcb-util0-dev \
|
||||||
|
libxcb-xf86dri0-dev \
|
||||||
|
libxcb-xkb-dev \
|
||||||
|
libxcb-xv0-dev \
|
||||||
|
libxcb1-dev \
|
||||||
|
libxdmcp-dev \
|
||||||
|
libxext-dev \
|
||||||
|
libxfixes-dev \
|
||||||
|
libxfont-dev \
|
||||||
|
libxi-dev \
|
||||||
|
libxinerama-dev \
|
||||||
|
libxkbcommon0 \
|
||||||
|
libxkbfile-dev \
|
||||||
|
libxmu-dev \
|
||||||
|
libxmuu-dev \
|
||||||
|
libxpm-dev \
|
||||||
|
libxrender-dev \
|
||||||
|
libxres-dev \
|
||||||
|
libxshmfence-dev \
|
||||||
|
libxt-dev \
|
||||||
|
libxtst-dev \
|
||||||
|
libxv-dev \
|
||||||
|
mesa-common-dev \
|
||||||
|
meson \
|
||||||
|
nettle-dev \
|
||||||
|
libpango1.0-dev \
|
||||||
|
pkg-config \
|
||||||
|
x11-xkb-utils \
|
||||||
|
xfonts-utils \
|
||||||
|
xkb-data \
|
||||||
|
xtrans-dev \
|
||||||
|
xutils-dev \
|
||||||
|
libxaw7-dev \
|
||||||
|
python3-mako \
|
||||||
|
|
||||||
|
# python3-attr \
|
||||||
|
# python3-jinja2 \
|
||||||
|
# python3-numpy \
|
||||||
|
# python3-six \
|
||||||
|
# weston \
|
|
@ -0,0 +1,161 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
apt-mark auto \
|
||||||
|
7zip \
|
||||||
|
7zip-rar \
|
||||||
|
acl \
|
||||||
|
ant \
|
||||||
|
apache2 \
|
||||||
|
apache2-bin \
|
||||||
|
aria2 \
|
||||||
|
azure-cli \
|
||||||
|
brotli \
|
||||||
|
buildah \
|
||||||
|
chrony \
|
||||||
|
cifs-utils \
|
||||||
|
clang-format-16 \
|
||||||
|
clang-format-17 \
|
||||||
|
clang-format-18 \
|
||||||
|
clang-tidy-16 \
|
||||||
|
clang-tidy-17 \
|
||||||
|
clang-tidy-18 \
|
||||||
|
cloud-init \
|
||||||
|
dbus \
|
||||||
|
dotnet-sdk-8.0 \
|
||||||
|
eatmydata \
|
||||||
|
efibootmgr \
|
||||||
|
firefox \
|
||||||
|
fonts-noto-color-emoji \
|
||||||
|
gfortran \
|
||||||
|
gfortran-12 \
|
||||||
|
gfortran-13 \
|
||||||
|
gfortran-14 \
|
||||||
|
google-chrome-stable \
|
||||||
|
google-cloud-cli \
|
||||||
|
haveged \
|
||||||
|
keyutils \
|
||||||
|
kubectl \
|
||||||
|
libeatmydata1 \
|
||||||
|
libgmp-dev \
|
||||||
|
liblz4-dev \
|
||||||
|
libmysqlclient-dev \
|
||||||
|
libpq-dev \
|
||||||
|
libsqlite3-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libtss2-esys-3.0.2-0t64 \
|
||||||
|
libtss2-mu-4.0.1-0t64 \
|
||||||
|
libtss2-rc0t64 \
|
||||||
|
libwrap0 \
|
||||||
|
libyaml-dev \
|
||||||
|
lsscsi \
|
||||||
|
lz4 \
|
||||||
|
mediainfo \
|
||||||
|
mercurial \
|
||||||
|
microsoft-edge-stable \
|
||||||
|
mysql-client \
|
||||||
|
mysql-server \
|
||||||
|
ncurses-base \
|
||||||
|
ncurses-bin \
|
||||||
|
ncurses-term \
|
||||||
|
nginx \
|
||||||
|
nvme-cli \
|
||||||
|
packages-microsoft-prod \
|
||||||
|
php-pear \
|
||||||
|
php8.3 \
|
||||||
|
php8.3-amqp \
|
||||||
|
php8.3-apcu \
|
||||||
|
php8.3-bcmath \
|
||||||
|
php8.3-bz2 \
|
||||||
|
php8.3-cgi \
|
||||||
|
php8.3-cli \
|
||||||
|
php8.3-common \
|
||||||
|
php8.3-curl \
|
||||||
|
php8.3-dba \
|
||||||
|
php8.3-dev \
|
||||||
|
php8.3-enchant \
|
||||||
|
php8.3-fpm \
|
||||||
|
php8.3-gd \
|
||||||
|
php8.3-gmp \
|
||||||
|
php8.3-igbinary \
|
||||||
|
php8.3-imagick \
|
||||||
|
php8.3-imap \
|
||||||
|
php8.3-interbase \
|
||||||
|
php8.3-intl \
|
||||||
|
php8.3-ldap \
|
||||||
|
php8.3-mbstring \
|
||||||
|
php8.3-memcache \
|
||||||
|
php8.3-memcached \
|
||||||
|
php8.3-mongodb \
|
||||||
|
php8.3-mysql \
|
||||||
|
php8.3-odbc \
|
||||||
|
php8.3-opcache \
|
||||||
|
php8.3-pcov \
|
||||||
|
php8.3-pgsql \
|
||||||
|
php8.3-phpdbg \
|
||||||
|
php8.3-pspell \
|
||||||
|
php8.3-readline \
|
||||||
|
php8.3-redis \
|
||||||
|
php8.3-snmp \
|
||||||
|
php8.3-soap \
|
||||||
|
php8.3-sqlite3 \
|
||||||
|
php8.3-sybase \
|
||||||
|
php8.3-tidy \
|
||||||
|
php8.3-xdebug \
|
||||||
|
php8.3-xml \
|
||||||
|
php8.3-xsl \
|
||||||
|
php8.3-yaml \
|
||||||
|
php8.3-zip \
|
||||||
|
php8.3-zmq \
|
||||||
|
pigz \
|
||||||
|
podman \
|
||||||
|
pollinate \
|
||||||
|
postgresql-16 \
|
||||||
|
powershell \
|
||||||
|
python-babel-localedata \
|
||||||
|
python3-babel \
|
||||||
|
python3-dev \
|
||||||
|
python3-jinja2 \
|
||||||
|
python3-json-pointer \
|
||||||
|
python3-jsonpatch \
|
||||||
|
python3-jsonschema \
|
||||||
|
python3-markupsafe \
|
||||||
|
python3-parted \
|
||||||
|
python3-pyrsistent \
|
||||||
|
python3-serial \
|
||||||
|
python3-six \
|
||||||
|
python3-tz \
|
||||||
|
python3-venv \
|
||||||
|
rpm \
|
||||||
|
ruby-full \
|
||||||
|
session-manager-plugin \
|
||||||
|
shellcheck \
|
||||||
|
shim-signed \
|
||||||
|
skopeo \
|
||||||
|
snap \
|
||||||
|
snmp \
|
||||||
|
software-properties-common \
|
||||||
|
sphinxsearch \
|
||||||
|
sqlite3 \
|
||||||
|
swig \
|
||||||
|
sysstat \
|
||||||
|
systemd-coredump \
|
||||||
|
temurin-11-jdk \
|
||||||
|
temurin-17-jdk \
|
||||||
|
temurin-21-jdk \
|
||||||
|
temurin-8-jdk \
|
||||||
|
texinfo \
|
||||||
|
tk \
|
||||||
|
tree \
|
||||||
|
tzdata \
|
||||||
|
ubuntu-server \
|
||||||
|
ubuntu-standard \
|
||||||
|
unzip \
|
||||||
|
upx-ucl \
|
||||||
|
util-linux \
|
||||||
|
walinuxagent \
|
||||||
|
xvfb \
|
||||||
|
xz-utils \
|
||||||
|
zip \
|
||||||
|
zsync
|
||||||
|
|
||||||
|
apt-get autoremove -y
|
|
@ -0,0 +1,90 @@
|
||||||
|
|
||||||
|
. .github/scripts/conf.sh
|
||||||
|
|
||||||
|
clone_source() {
|
||||||
|
local pkgname="$1"
|
||||||
|
local url="$2"
|
||||||
|
local ref="$3"
|
||||||
|
|
||||||
|
if [ ! -f $pkgname/.git/config ]; then
|
||||||
|
echo "need to clone $pkgname"
|
||||||
|
git clone $url $pkgname --branch=$ref --depth 1
|
||||||
|
else
|
||||||
|
echo "already cloned $pkgname"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
build_meson() {
|
||||||
|
local pkgname="$1"
|
||||||
|
local url="$2"
|
||||||
|
local ref="$3"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
if [ -f $X11_PREFIX/$pkgname.DONE ]; then
|
||||||
|
echo "package $pkgname already built"
|
||||||
|
else
|
||||||
|
clone_source "$pkgname" "$url" "$ref"
|
||||||
|
(
|
||||||
|
cd $pkgname
|
||||||
|
meson "$@" build -Dprefix=$X11_PREFIX
|
||||||
|
ninja -j${FDO_CI_CONCURRENT:-4} -C build install
|
||||||
|
)
|
||||||
|
touch $X11_PREFIX/$pkgname.DONE
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
build_ac() {
|
||||||
|
local pkgname="$1"
|
||||||
|
local url="$2"
|
||||||
|
local ref="$3"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
if [ -f $X11_PREFIX/$pkgname.DONE ]; then
|
||||||
|
echo "package $pkgname already built"
|
||||||
|
else
|
||||||
|
clone_source "$pkgname" "$url" "$ref"
|
||||||
|
(
|
||||||
|
cd $pkgname
|
||||||
|
./autogen.sh --prefix=$X11_PREFIX
|
||||||
|
make -j${FDO_CI_CONCURRENT:-4} install
|
||||||
|
)
|
||||||
|
touch $X11_PREFIX/$pkgname.DONE
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
build_drv_ac() {
|
||||||
|
local pkgname="$1"
|
||||||
|
local url="$2"
|
||||||
|
local ref="$3"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
clone_source "$pkgname" "$url" "$ref"
|
||||||
|
(
|
||||||
|
cd $pkgname
|
||||||
|
./autogen.sh # --prefix=$X11_PREFIX
|
||||||
|
make -j${FDO_CI_CONCURRENT:-4} # install
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
build_ac_xts() {
|
||||||
|
local pkgname="$1"
|
||||||
|
local url="$2"
|
||||||
|
local ref="$3"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
if [ -f $X11_PREFIX/$pkgname.DONE ]; then
|
||||||
|
echo "package $pkgname already built"
|
||||||
|
else
|
||||||
|
clone_source "$pkgname" "$url" "$ref"
|
||||||
|
(
|
||||||
|
cd $pkgname
|
||||||
|
CFLAGS=-fcommon ./autogen.sh --prefix=$X11_PREFIX
|
||||||
|
xvfb-run make -j${FDO_CI_CONCURRENT:-4} install
|
||||||
|
)
|
||||||
|
touch $X11_PREFIX/$pkgname.DONE
|
||||||
|
fi
|
||||||
|
}
|
|
@ -0,0 +1,118 @@
|
||||||
|
name: Build X servers
|
||||||
|
|
||||||
|
env:
|
||||||
|
MESON_BUILDDIR: "build"
|
||||||
|
X11_PREFIX: /home/runner/x11
|
||||||
|
X11_BUILD_DIR: /home/runner/build-deps
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
xserver-build-ubuntu:
|
||||||
|
env:
|
||||||
|
MESON_ARGS: -Dc_args="-fno-common" -Dprefix=/usr -Dxephyr=true -Dwerror=false -Dxcsecurity=true -Dxwayland=true -Dxorg=true -Dxvfb=true -Dxnest=true
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: prepare build environment
|
||||||
|
run: |
|
||||||
|
export MACHINE=`gcc -dumpmachine`
|
||||||
|
echo "PKG_CONFIG_PATH=$X11_PREFIX/share/pkgconfig:$X11_PREFIX/lib/$MACHINE/pkgconfig:$X11_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" >> "$GITHUB_ENV"
|
||||||
|
sudo chown root /bin/tar && sudo chmod u+s /bin/tar
|
||||||
|
|
||||||
|
- name: apt cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: /var/cache/apt
|
||||||
|
key: apt-cache-${{ hashFiles('.github/scripts/ubuntu/install-pkg.sh') }}
|
||||||
|
restore-keys: apt-cache-
|
||||||
|
|
||||||
|
- name: pkg install
|
||||||
|
run: sudo .github/scripts/ubuntu/install-pkg.sh
|
||||||
|
|
||||||
|
- name: X11 prereq cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
${{ env.X11_PREFIX }}
|
||||||
|
${{ env.X11_BUILD_DIR }}/xts
|
||||||
|
${{ env.X11_BUILD_DIR }}/piglit
|
||||||
|
key: ${{ runner.os }}-x11-deps-${{ hashFiles('.github/scripts/install-prereq.sh') }}
|
||||||
|
restore-keys: ${{ runner.os }}-x11-deps-
|
||||||
|
|
||||||
|
- name: generic prereq
|
||||||
|
run: sudo .github/scripts/install-prereq.sh
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
run: .gitlab-ci/meson-build.sh
|
||||||
|
|
||||||
|
- name: tests (may fail)
|
||||||
|
continue-on-error: true
|
||||||
|
run: meson test -C "${{ env.MESON_BUILDDIR }}" --print-errorlogs || true
|
||||||
|
env:
|
||||||
|
XTEST_DIR: ${{ env.X11_BUILD_DIR }}/xts
|
||||||
|
PIGLIT_DIR: ${{ env.X11_BUILD_DIR }}/piglit
|
||||||
|
|
||||||
|
- name: archive build logs
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: build-logs
|
||||||
|
path: |
|
||||||
|
build/meson-logs/*
|
||||||
|
- name: ddx build check
|
||||||
|
run: .gitlab-ci/check-ddx-build.sh
|
||||||
|
- name: manpage check
|
||||||
|
run: .gitlab-ci/manpages-check
|
||||||
|
|
||||||
|
drivers-build-ubuntu:
|
||||||
|
env:
|
||||||
|
MESON_ARGS: -Dc_args="-fno-common" -Dprefix=/usr -Dxephyr=false -Dwerror=false -Dxcsecurity=false -Dxwayland=false -Dxorg=true -Dxvfb=false -Dxnest=false
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: prepare build environment
|
||||||
|
run: |
|
||||||
|
export MACHINE=`gcc -dumpmachine`
|
||||||
|
echo "PKG_CONFIG_PATH=$X11_PREFIX/share/pkgconfig:$X11_PREFIX/lib/$MACHINE/pkgconfig:$X11_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" >> "$GITHUB_ENV"
|
||||||
|
sudo chown root /bin/tar && sudo chmod u+s /bin/tar
|
||||||
|
|
||||||
|
- name: apt cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: /var/cache/apt
|
||||||
|
key: apt-cache-${{ hashFiles('.github/scripts/ubuntu/install-pkg.sh') }}
|
||||||
|
restore-keys: apt-cache-
|
||||||
|
|
||||||
|
- name: pkg install
|
||||||
|
run: sudo .github/scripts/ubuntu/install-pkg.sh
|
||||||
|
|
||||||
|
- name: X11 prereq cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
${{ env.X11_PREFIX }}
|
||||||
|
${{ env.X11_BUILD_DIR }}/xts
|
||||||
|
${{ env.X11_BUILD_DIR }}/piglit
|
||||||
|
key: ${{ runner.os }}-x11-deps-${{ hashFiles('.github/scripts/install-prereq.sh') }}
|
||||||
|
restore-keys: ${{ runner.os }}-x11-deps-
|
||||||
|
|
||||||
|
- name: generic prereq
|
||||||
|
run: sudo .github/scripts/install-prereq.sh
|
||||||
|
|
||||||
|
- name: build xserver sdk
|
||||||
|
run: |
|
||||||
|
echo -n > .meson_environment
|
||||||
|
echo "export MESON_BUILDDIR=$MESON_BUILDDIR" >> .meson_environment
|
||||||
|
echo "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> .meson_environment
|
||||||
|
.gitlab-ci/meson-build.sh --skip-test
|
||||||
|
sudo meson install --no-rebuild -C "$MESON_BUILDDIR"
|
||||||
|
sudo mkdir -p /usr/local/lib/$MACHINE/xorg/modules # /home/runner/x11/lib/xorg/modules
|
||||||
|
sudo chown -R runner /usr/local/lib/$MACHINE/xorg/modules # /home/runner/x11/lib/xorg/modules
|
||||||
|
|
||||||
|
- name: compile drivers
|
||||||
|
run: .github/scripts/compile-drivers.sh
|
105
.gitlab-ci.yml
105
.gitlab-ci.yml
|
@ -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: '2025-02-10-intel'
|
XORG_DEBIAN_TAG: '2025-02-12-xvmc'
|
||||||
XORG_FREEBSD_VERSION: '14.0'
|
XORG_FREEBSD_VERSION: '14.1'
|
||||||
XORG_FREEBSD_EXEC: ''
|
XORG_FREEBSD_EXEC: ''
|
||||||
XORG_FREEBSD_TAG: '2024-06-10.0'
|
XORG_FREEBSD_TAG: '2024-06-10.0-1'
|
||||||
|
|
||||||
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
|
||||||
|
@ -202,14 +202,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
|
||||||
|
@ -218,6 +218,8 @@ freebsd:
|
||||||
- /app/vmctl start
|
- /app/vmctl start
|
||||||
- set +e
|
- set +e
|
||||||
- scp -r $PWD "vm:"
|
- scp -r $PWD "vm:"
|
||||||
|
# need to install extra packages, as long as image cant be rebuilt
|
||||||
|
- /app/vmctl exec "pkg update && pkg add libxvmc xcb-util xcb-util-wm"
|
||||||
# need to install newer xorgproto
|
# need to install newer xorgproto
|
||||||
- /app/vmctl exec "cd $CI_PROJECT_NAME/dep.xorgproto && ./autogen.sh --prefix=/usr && make && make install"
|
- /app/vmctl exec "cd $CI_PROJECT_NAME/dep.xorgproto && ./autogen.sh --prefix=/usr && make && make install"
|
||||||
- /app/vmctl exec "cd $CI_PROJECT_NAME && PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\" MESON_ARGS=\"$MESON_ARGS\" MESON_BUILDDIR=\"$MESON_BUILDDIR\" .gitlab-ci/meson-build.sh --skip-test" && touch .success
|
- /app/vmctl exec "cd $CI_PROJECT_NAME && PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\" MESON_ARGS=\"$MESON_ARGS\" MESON_BUILDDIR=\"$MESON_BUILDDIR\" .gitlab-ci/meson-build.sh --skip-test" && touch .success
|
||||||
|
@ -250,26 +252,104 @@ 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-intel
|
- REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-chips
|
||||||
SHA: e6a4c4740c15ace9dd79dc7c18955f2eb413a6a5 # no release yet
|
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/metux/xf86-video-intel
|
||||||
|
SHA: incubate # temporary
|
||||||
|
- 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
|
||||||
|
@ -290,13 +370,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
|
||||||
|
|
|
@ -33,13 +33,13 @@ from The Open Group.
|
||||||
#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)
|
||||||
|
|
|
@ -30,7 +30,9 @@ Equipment Corporation.
|
||||||
|
|
||||||
#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"
|
||||||
|
@ -38,9 +40,7 @@ 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"
|
||||||
|
|
|
@ -24,13 +24,16 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#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;
|
Bool noGEExtension = FALSE;
|
||||||
|
|
||||||
|
|
|
@ -32,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"
|
||||||
|
@ -55,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
|
||||||
|
|
|
@ -36,6 +36,7 @@ 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/osdep.h"
|
||||||
#include "os/screensaver.h"
|
#include "os/screensaver.h"
|
||||||
|
|
||||||
|
@ -61,7 +62,6 @@ in this Software without prior written authorization from the X Consortium.
|
||||||
#include "dpmsproc.h"
|
#include "dpmsproc.h"
|
||||||
#endif
|
#endif
|
||||||
#include "protocol-versions.h"
|
#include "protocol-versions.h"
|
||||||
#include "extinit_priv.h"
|
|
||||||
|
|
||||||
// temporary workaround for win32/mingw32 name clash
|
// temporary workaround for win32/mingw32 name clash
|
||||||
// see: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1355
|
// see: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1355
|
||||||
|
|
|
@ -32,7 +32,7 @@ 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 "os/osdep.h"
|
||||||
|
@ -45,7 +45,6 @@ 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;
|
Bool noSecurityExtension = FALSE;
|
||||||
|
|
|
@ -33,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"
|
||||||
|
@ -45,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"
|
||||||
|
|
||||||
Bool noShapeExtension = FALSE;
|
Bool noShapeExtension = FALSE;
|
||||||
|
|
194
Xext/shm.c
194
Xext/shm.c
|
@ -43,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"
|
||||||
|
@ -59,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 */
|
||||||
|
@ -95,9 +96,7 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#endif /* XINERAMA */
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
typedef struct _ShmScrPrivateRec {
|
typedef struct _ShmScrPrivateRec {
|
||||||
CloseScreenProcPtr CloseScreen;
|
|
||||||
ShmFuncsPtr shmFuncs;
|
ShmFuncsPtr shmFuncs;
|
||||||
DestroyPixmapProcPtr destroyPixmap;
|
|
||||||
} ShmScrPrivateRec;
|
} ShmScrPrivateRec;
|
||||||
|
|
||||||
Bool noMITShmExtension = FALSE;
|
Bool noMITShmExtension = FALSE;
|
||||||
|
@ -108,7 +107,7 @@ 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);
|
||||||
|
|
||||||
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,28 +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 = TRUE;
|
|
||||||
|
|
||||||
if (pPixmap->refcnt == 1)
|
|
||||||
shmdesc = dixLookupPrivate(&pPixmap->devPrivates, shmPixmapPrivateKey);
|
|
||||||
|
|
||||||
pScreen->DestroyPixmap = screen_priv->destroyPixmap;
|
|
||||||
if (pScreen->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)
|
||||||
|
@ -373,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;
|
||||||
|
@ -436,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
|
||||||
|
@ -455,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;
|
||||||
|
@ -516,16 +499,13 @@ doShmPutImage(DrawablePtr dst, GCPtr pGC,
|
||||||
}
|
}
|
||||||
|
|
||||||
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))
|
||||||
|
@ -615,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;
|
||||||
|
@ -626,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;
|
||||||
|
@ -733,16 +710,22 @@ ProcShmGetImage(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XINERAMA
|
|
||||||
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);
|
||||||
|
@ -769,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;
|
||||||
|
@ -789,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;
|
||||||
|
@ -804,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)
|
||||||
|
@ -915,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;
|
||||||
|
@ -1028,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 /* XINERAMA */
|
||||||
|
}
|
||||||
|
|
||||||
static PixmapPtr
|
static PixmapPtr
|
||||||
fbShmCreatePixmap(ScreenPtr pScreen,
|
fbShmCreatePixmap(ScreenPtr pScreen,
|
||||||
|
@ -1052,7 +1056,7 @@ fbShmCreatePixmap(ScreenPtr pScreen,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcShmCreatePixmap(ClientPtr client)
|
ShmCreatePixmap(ClientPtr client, xShmCreatePixmapReq *stuff)
|
||||||
{
|
{
|
||||||
PixmapPtr pMap;
|
PixmapPtr pMap;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
@ -1060,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;
|
||||||
|
@ -1147,13 +1148,17 @@ 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);
|
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;
|
||||||
|
@ -1262,9 +1267,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,
|
||||||
|
@ -1272,7 +1282,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;
|
||||||
|
@ -1337,34 +1346,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 XINERAMA
|
|
||||||
if (!noPanoramiXExtension)
|
|
||||||
return ProcPanoramiXShmPutImage(client);
|
|
||||||
#endif /* XINERAMA */
|
|
||||||
return ProcShmPutImage(client);
|
return ProcShmPutImage(client);
|
||||||
case X_ShmGetImage:
|
case X_ShmGetImage:
|
||||||
#ifdef XINERAMA
|
|
||||||
if (!noPanoramiXExtension)
|
|
||||||
return ProcPanoramiXShmGetImage(client);
|
|
||||||
#endif /* XINERAMA */
|
|
||||||
return ProcShmGetImage(client);
|
return ProcShmGetImage(client);
|
||||||
case X_ShmCreatePixmap:
|
case X_ShmCreatePixmap:
|
||||||
#ifdef XINERAMA
|
|
||||||
if (!noPanoramiXExtension)
|
|
||||||
return ProcPanoramiXShmCreatePixmap(client);
|
|
||||||
#endif /* XINERAMA */
|
|
||||||
return ProcShmCreatePixmap(client);
|
return ProcShmCreatePixmap(client);
|
||||||
#ifdef SHM_FD_PASSING
|
#ifdef SHM_FD_PASSING
|
||||||
case X_ShmAttachFd:
|
case X_ShmAttachFd:
|
||||||
|
@ -1485,13 +1478,9 @@ SProcShmDispatch(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 SProcShmAttach(client);
|
return SProcShmAttach(client);
|
||||||
case X_ShmDetach:
|
case X_ShmDetach:
|
||||||
|
@ -1513,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)
|
||||||
{
|
{
|
||||||
|
@ -1541,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 &&
|
||||||
|
|
|
@ -59,6 +59,7 @@ 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 "os/osdep.h"
|
||||||
|
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
|
@ -77,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
|
||||||
*/
|
*/
|
||||||
|
|
649
Xext/vidmode.c
649
Xext/vidmode.c
File diff suppressed because it is too large
Load Diff
12
Xext/xace.c
12
Xext/xace.c
|
@ -278,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 */
|
||||||
|
|
|
@ -28,17 +28,18 @@ from The Open Group.
|
||||||
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
|
|
||||||
|
#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)
|
||||||
|
|
|
@ -41,10 +41,6 @@
|
||||||
#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>
|
||||||
|
@ -58,13 +54,14 @@
|
||||||
#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"
|
||||||
|
@ -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) {
|
||||||
|
@ -712,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
|
||||||
|
|
151
Xext/xres.c
151
Xext/xres.c
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
#include "dix/registry_priv.h"
|
#include "dix/registry_priv.h"
|
||||||
#include "os/client_priv.h"
|
#include "os/client_priv.h"
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
|
@ -22,11 +23,9 @@
|
||||||
#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 "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"
|
||||||
|
|
||||||
|
@ -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 (!counts[i])
|
|
||||||
continue;
|
|
||||||
|
|
||||||
scratch.resource_type = resourceTypeAtom(i + 1);
|
|
||||||
scratch.count = counts[i];
|
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swapl(&scratch.resource_type);
|
swapl(&scratch[i].resource_type);
|
||||||
swapl(&scratch.count);
|
swapl(&scratch[i].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,6 +549,19 @@ ProcXResQueryClientIds (ClientPtr client)
|
||||||
rc = ConstructClientIds(client, stuff->numSpecs, specs, &ctx);
|
rc = ConstructClientIds(client, stuff->numSpecs, specs, &ctx);
|
||||||
|
|
||||||
if (rc == Success) {
|
if (rc == Success) {
|
||||||
|
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 = {
|
xXResQueryClientIdsReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
|
@ -594,8 +569,6 @@ ProcXResQueryClientIds (ClientPtr client)
|
||||||
.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);
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(rep), &rep);
|
char *buf = calloc(1, ctx.resultBytes);
|
||||||
WriteFragmentsToClient(client, &ctx.response);
|
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, ctx.resultBytes, buf);
|
||||||
|
free(buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
DestroyConstructResourceBytesCtx(&ctx);
|
DestroyConstructResourceBytesCtx(&ctx);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
|
|
@ -21,13 +21,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
#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)
|
||||||
|
|
|
@ -33,9 +33,9 @@ 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 "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"
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "dix/exevents_priv.h"
|
#include "dix/exevents_priv.h"
|
||||||
#include "mi/mi_priv.h"
|
#include "mi/mi_priv.h"
|
||||||
#include "mi/mipointer_priv.h"
|
#include "mi/mipointer_priv.h"
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
@ -58,7 +59,6 @@
|
||||||
#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;
|
Bool noTestExtensions = FALSE;
|
||||||
|
|
||||||
|
|
344
Xext/xvdisp.c
344
Xext/xvdisp.c
|
@ -321,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;
|
||||||
|
@ -337,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 */
|
||||||
|
|
||||||
|
@ -411,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;
|
||||||
|
@ -423,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;
|
||||||
|
@ -439,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);
|
||||||
|
|
||||||
|
@ -461,7 +451,7 @@ ProcXvQueryEncodings(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcXvPutVideo(ClientPtr client)
|
SingleXvPutVideo(ClientPtr client)
|
||||||
{
|
{
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
|
@ -490,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;
|
||||||
|
@ -520,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)
|
||||||
{
|
{
|
||||||
|
@ -615,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);
|
||||||
|
@ -627,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
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -653,7 +665,7 @@ ProcXvUngrabPort(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcXvStopVideo(ClientPtr client)
|
SingleXvStopVideo(ClientPtr client)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
@ -671,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;
|
||||||
|
@ -698,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);
|
||||||
|
@ -722,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
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -739,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);
|
||||||
|
@ -751,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
|
||||||
};
|
};
|
||||||
|
@ -770,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);
|
||||||
|
@ -778,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;
|
||||||
|
@ -813,7 +843,7 @@ ProcXvQueryPortAttributes(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcXvPutImage(ClientPtr client)
|
SingleXvPutImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
|
@ -869,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;
|
||||||
|
@ -945,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"
|
||||||
|
@ -1029,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);
|
||||||
|
@ -1038,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,
|
||||||
|
@ -1079,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)
|
||||||
{
|
{
|
||||||
|
@ -1106,11 +1139,50 @@ ProcXvDispatch(ClientPtr client)
|
||||||
|
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
|
|
||||||
if (stuff->data >= xvNumRequests) {
|
switch (stuff->data) {
|
||||||
|
case xv_QueryExtension:
|
||||||
|
return ProcXvQueryExtension(client);
|
||||||
|
case xv_QueryAdaptors:
|
||||||
|
return ProcXvQueryAdaptors(client);
|
||||||
|
case xv_QueryEncodings:
|
||||||
|
return ProcXvQueryEncodings(client);
|
||||||
|
case xv_GrabPort:
|
||||||
|
return ProcXvGrabPort(client);
|
||||||
|
case xv_UngrabPort:
|
||||||
|
return ProcXvUngrabPort(client);
|
||||||
|
case xv_PutVideo:
|
||||||
|
return ProcXvPutVideo(client);
|
||||||
|
case xv_PutStill:
|
||||||
|
return ProcXvPutStill(client);
|
||||||
|
case xv_GetVideo:
|
||||||
|
return ProcXvGetVideo(client);
|
||||||
|
case xv_GetStill:
|
||||||
|
return ProcXvGetStill(client);
|
||||||
|
case xv_StopVideo:
|
||||||
|
return ProcXvStopVideo(client);
|
||||||
|
case xv_SelectVideoNotify:
|
||||||
|
return ProcXvSelectVideoNotify(client);
|
||||||
|
case xv_SelectPortNotify:
|
||||||
|
return ProcXvSelectPortNotify(client);
|
||||||
|
case xv_QueryBestSize:
|
||||||
|
return ProcXvQueryBestSize(client);
|
||||||
|
case xv_SetPortAttribute:
|
||||||
|
return ProcXvSetPortAttribute(client);
|
||||||
|
case xv_GetPortAttribute:
|
||||||
|
return ProcXvGetPortAttribute(client);
|
||||||
|
case xv_QueryPortAttributes:
|
||||||
|
return ProcXvQueryPortAttributes(client);
|
||||||
|
case xv_ListImageFormats:
|
||||||
|
return ProcXvListImageFormats(client);
|
||||||
|
case xv_QueryImageAttributes:
|
||||||
|
return ProcXvQueryImageAttributes(client);
|
||||||
|
case xv_PutImage:
|
||||||
|
return ProcXvPutImage(client);
|
||||||
|
case xv_ShmPutImage:
|
||||||
|
return ProcXvShmPutImage(client);
|
||||||
|
default:
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
return XvProcVector[stuff->data] (client);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Swapped Procs */
|
/* Swapped Procs */
|
||||||
|
@ -1121,7 +1193,7 @@ SProcXvQueryAdaptors(ClientPtr client)
|
||||||
REQUEST(xvQueryAdaptorsReq);
|
REQUEST(xvQueryAdaptorsReq);
|
||||||
REQUEST_SIZE_MATCH(xvQueryAdaptorsReq);
|
REQUEST_SIZE_MATCH(xvQueryAdaptorsReq);
|
||||||
swapl(&stuff->window);
|
swapl(&stuff->window);
|
||||||
return XvProcVector[xv_QueryAdaptors] (client);
|
return ProcXvQueryAdaptors(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1130,7 +1202,7 @@ SProcXvQueryEncodings(ClientPtr client)
|
||||||
REQUEST(xvQueryEncodingsReq);
|
REQUEST(xvQueryEncodingsReq);
|
||||||
REQUEST_SIZE_MATCH(xvQueryEncodingsReq);
|
REQUEST_SIZE_MATCH(xvQueryEncodingsReq);
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
return XvProcVector[xv_QueryEncodings] (client);
|
return ProcXvQueryEncodings(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1140,7 +1212,7 @@ SProcXvGrabPort(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xvGrabPortReq);
|
REQUEST_SIZE_MATCH(xvGrabPortReq);
|
||||||
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
|
||||||
|
@ -1150,7 +1222,7 @@ SProcXvUngrabPort(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xvUngrabPortReq);
|
REQUEST_SIZE_MATCH(xvUngrabPortReq);
|
||||||
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
|
||||||
|
@ -1169,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
|
||||||
|
@ -1188,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
|
||||||
|
@ -1207,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
|
||||||
|
@ -1226,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
|
||||||
|
@ -1248,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
|
||||||
|
@ -1273,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
|
||||||
|
@ -1285,7 +1357,7 @@ SProcXvSelectVideoNotify(ClientPtr client)
|
||||||
REQUEST(xvSelectVideoNotifyReq);
|
REQUEST(xvSelectVideoNotifyReq);
|
||||||
REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq);
|
REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
return XvProcVector[xv_SelectVideoNotify] (client);
|
return ProcXvSelectVideoNotify(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1294,7 +1366,7 @@ SProcXvSelectPortNotify(ClientPtr client)
|
||||||
REQUEST(xvSelectPortNotifyReq);
|
REQUEST(xvSelectPortNotifyReq);
|
||||||
REQUEST_SIZE_MATCH(xvSelectPortNotifyReq);
|
REQUEST_SIZE_MATCH(xvSelectPortNotifyReq);
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
return XvProcVector[xv_SelectPortNotify] (client);
|
return ProcXvSelectPortNotify(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1304,7 +1376,7 @@ SProcXvStopVideo(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xvStopVideoReq);
|
REQUEST_SIZE_MATCH(xvStopVideoReq);
|
||||||
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
|
||||||
|
@ -1315,7 +1387,7 @@ SProcXvSetPortAttribute(ClientPtr client)
|
||||||
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
|
||||||
|
@ -1325,7 +1397,7 @@ SProcXvGetPortAttribute(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xvGetPortAttributeReq);
|
REQUEST_SIZE_MATCH(xvGetPortAttributeReq);
|
||||||
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
|
||||||
|
@ -1338,7 +1410,7 @@ SProcXvQueryBestSize(ClientPtr client)
|
||||||
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
|
||||||
|
@ -1347,7 +1419,7 @@ SProcXvQueryPortAttributes(ClientPtr client)
|
||||||
REQUEST(xvQueryPortAttributesReq);
|
REQUEST(xvQueryPortAttributesReq);
|
||||||
REQUEST_SIZE_MATCH(xvQueryPortAttributesReq);
|
REQUEST_SIZE_MATCH(xvQueryPortAttributesReq);
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
return XvProcVector[xv_QueryPortAttributes] (client);
|
return ProcXvQueryPortAttributes(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -1359,7 +1431,7 @@ SProcXvQueryImageAttributes(ClientPtr client)
|
||||||
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
|
||||||
|
@ -1368,29 +1440,9 @@ SProcXvListImageFormats(ClientPtr client)
|
||||||
REQUEST(xvListImageFormatsReq);
|
REQUEST(xvListImageFormatsReq);
|
||||||
REQUEST_SIZE_MATCH(xvListImageFormatsReq);
|
REQUEST_SIZE_MATCH(xvListImageFormatsReq);
|
||||||
swapl(&stuff->port);
|
swapl(&stuff->port);
|
||||||
return XvProcVector[xv_ListImageFormats] (client);
|
return ProcXvListImageFormats(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int (*SXvProcVector[xvNumRequests]) (ClientPtr) = {
|
|
||||||
ProcXvQueryExtension,
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
|
@ -1398,11 +1450,50 @@ SProcXvDispatch(ClientPtr client)
|
||||||
|
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
|
|
||||||
if (stuff->data >= xvNumRequests) {
|
switch (stuff->data) {
|
||||||
|
case xv_QueryExtension:
|
||||||
|
return ProcXvQueryExtension(client);
|
||||||
|
case xv_QueryAdaptors:
|
||||||
|
return SProcXvQueryAdaptors(client);
|
||||||
|
case xv_QueryEncodings:
|
||||||
|
return SProcXvQueryEncodings(client);
|
||||||
|
case xv_GrabPort:
|
||||||
|
return SProcXvGrabPort(client);
|
||||||
|
case xv_UngrabPort:
|
||||||
|
return SProcXvUngrabPort(client);
|
||||||
|
case xv_PutVideo:
|
||||||
|
return SProcXvPutVideo(client);
|
||||||
|
case xv_PutStill:
|
||||||
|
return SProcXvPutStill(client);
|
||||||
|
case xv_GetVideo:
|
||||||
|
return SProcXvGetVideo(client);
|
||||||
|
case xv_GetStill:
|
||||||
|
return SProcXvGetStill(client);
|
||||||
|
case xv_StopVideo:
|
||||||
|
return SProcXvStopVideo(client);
|
||||||
|
case xv_SelectVideoNotify:
|
||||||
|
return SProcXvSelectVideoNotify(client);
|
||||||
|
case xv_SelectPortNotify:
|
||||||
|
return SProcXvSelectPortNotify(client);
|
||||||
|
case xv_QueryBestSize:
|
||||||
|
return SProcXvQueryBestSize(client);
|
||||||
|
case xv_SetPortAttribute:
|
||||||
|
return SProcXvSetPortAttribute(client);
|
||||||
|
case xv_GetPortAttribute:
|
||||||
|
return SProcXvGetPortAttribute(client);
|
||||||
|
case xv_QueryPortAttributes:
|
||||||
|
return SProcXvQueryPortAttributes(client);
|
||||||
|
case xv_ListImageFormats:
|
||||||
|
return SProcXvListImageFormats(client);
|
||||||
|
case xv_QueryImageAttributes:
|
||||||
|
return SProcXvQueryImageAttributes(client);
|
||||||
|
case xv_PutImage:
|
||||||
|
return SProcXvPutImage(client);
|
||||||
|
case xv_ShmPutImage:
|
||||||
|
return SProcXvShmPutImage(client);
|
||||||
|
default:
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
return SXvProcVector[stuff->data] (client);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
|
@ -1429,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1453,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;
|
||||||
|
@ -1506,7 +1597,7 @@ 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;
|
||||||
|
@ -1557,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;
|
||||||
|
@ -1605,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;
|
||||||
|
@ -1653,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;
|
||||||
|
@ -1760,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 /* XINERAMA */
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
void
|
|
||||||
XvResetProcVector(void)
|
|
||||||
{
|
|
||||||
#ifdef XINERAMA
|
|
||||||
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 /* XINERAMA */
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
extern void XineramifyXv(void);
|
extern void XineramifyXv(void);
|
||||||
extern void XvResetProcVector(void);
|
extern int xvUseXinerama;
|
||||||
|
|
|
@ -173,9 +173,6 @@ typedef struct {
|
||||||
int version, revision;
|
int version, revision;
|
||||||
int nAdaptors;
|
int nAdaptors;
|
||||||
XvAdaptorPtr pAdaptors;
|
XvAdaptorPtr pAdaptors;
|
||||||
DestroyWindowProcPtr DestroyWindow;
|
|
||||||
DestroyPixmapProcPtr DestroyPixmap;
|
|
||||||
CloseScreenProcPtr CloseScreen;
|
|
||||||
} XvScreenRec, *XvScreenPtr;
|
} XvScreenRec, *XvScreenPtr;
|
||||||
|
|
||||||
extern _X_EXPORT int XvScreenInit(ScreenPtr);
|
extern _X_EXPORT int XvScreenInit(ScreenPtr);
|
||||||
|
|
|
@ -81,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"
|
||||||
|
@ -90,7 +91,6 @@ 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"
|
||||||
|
@ -128,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;
|
||||||
|
@ -141,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);
|
||||||
|
@ -152,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
|
||||||
|
@ -257,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)
|
||||||
{
|
{
|
||||||
|
@ -290,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
|
||||||
|
@ -367,40 +370,6 @@ XvStopAdaptors(DrawablePtr pDrawable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
|
||||||
XvDestroyPixmap(PixmapPtr pPix)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pPix->drawable.pScreen;
|
|
||||||
Bool status = TRUE;
|
|
||||||
|
|
||||||
if (pPix->refcnt == 1)
|
|
||||||
XvStopAdaptors(&pPix->drawable);
|
|
||||||
|
|
||||||
SCREEN_PROLOGUE(pScreen, DestroyPixmap);
|
|
||||||
if (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)
|
||||||
{
|
{
|
||||||
|
|
24
Xext/xvmc.c
24
Xext/xvmc.c
|
@ -3,8 +3,13 @@
|
||||||
|
|
||||||
#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"
|
||||||
|
@ -13,12 +18,7 @@
|
||||||
#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"
|
||||||
|
|
||||||
#ifdef HAS_XVMCSHM
|
#ifdef HAS_XVMCSHM
|
||||||
|
@ -48,7 +48,6 @@ static RESTYPE XvMCRTSubpicture;
|
||||||
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;
|
||||||
|
@ -733,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
|
||||||
|
@ -758,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;
|
||||||
|
|
|
@ -96,6 +96,7 @@ SOFTWARE.
|
||||||
#include "dix/exevents_priv.h"
|
#include "dix/exevents_priv.h"
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
#include "mi/mi_priv.h"
|
#include "mi/mi_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
|
|
|
@ -60,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"
|
||||||
|
|
|
@ -36,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"
|
||||||
|
|
|
@ -43,10 +43,11 @@
|
||||||
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
|
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
|
||||||
#include "compint.h"
|
#include "compint.h"
|
||||||
#include "xace.h"
|
#include "xace.h"
|
||||||
#include "protocol-versions.h"
|
#include "protocol-versions.h"
|
||||||
#include "extinit_priv.h"
|
|
||||||
|
|
||||||
static CARD8 CompositeReqCode;
|
static CARD8 CompositeReqCode;
|
||||||
static DevPrivateKeyRec CompositeClientPrivateKeyRec;
|
static DevPrivateKeyRec CompositeClientPrivateKeyRec;
|
||||||
|
|
|
@ -76,12 +76,13 @@ compCloseScreen(ScreenPtr pScreen)
|
||||||
pScreen->ClipNotify = cs->ClipNotify;
|
pScreen->ClipNotify = cs->ClipNotify;
|
||||||
pScreen->UnrealizeWindow = cs->UnrealizeWindow;
|
pScreen->UnrealizeWindow = cs->UnrealizeWindow;
|
||||||
pScreen->RealizeWindow = cs->RealizeWindow;
|
pScreen->RealizeWindow = cs->RealizeWindow;
|
||||||
pScreen->DestroyWindow = cs->DestroyWindow;
|
|
||||||
pScreen->CreateWindow = cs->CreateWindow;
|
pScreen->CreateWindow = cs->CreateWindow;
|
||||||
pScreen->CopyWindow = cs->CopyWindow;
|
pScreen->CopyWindow = cs->CopyWindow;
|
||||||
pScreen->PositionWindow = cs->PositionWindow;
|
|
||||||
pScreen->SourceValidate = cs->SourceValidate;
|
pScreen->SourceValidate = cs->SourceValidate;
|
||||||
|
|
||||||
|
dixScreenUnhookWindowDestroy(pScreen, compWindowDestroy, NULL);
|
||||||
|
dixScreenUnhookWindowPosition(pScreen, compWindowPosition, NULL);
|
||||||
|
|
||||||
free(cs);
|
free(cs);
|
||||||
dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, NULL);
|
dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, NULL);
|
||||||
ret = (*pScreen->CloseScreen) (pScreen);
|
ret = (*pScreen->CloseScreen) (pScreen);
|
||||||
|
@ -368,8 +369,8 @@ compScreenInit(ScreenPtr pScreen)
|
||||||
if (!disableBackingStore)
|
if (!disableBackingStore)
|
||||||
pScreen->backingStoreSupport = WhenMapped;
|
pScreen->backingStoreSupport = WhenMapped;
|
||||||
|
|
||||||
cs->PositionWindow = pScreen->PositionWindow;
|
dixScreenHookWindowDestroy(pScreen, compWindowDestroy, NULL);
|
||||||
pScreen->PositionWindow = compPositionWindow;
|
dixScreenHookWindowPosition(pScreen, compWindowPosition, NULL);
|
||||||
|
|
||||||
cs->CopyWindow = pScreen->CopyWindow;
|
cs->CopyWindow = pScreen->CopyWindow;
|
||||||
pScreen->CopyWindow = compCopyWindow;
|
pScreen->CopyWindow = compCopyWindow;
|
||||||
|
@ -377,9 +378,6 @@ compScreenInit(ScreenPtr pScreen)
|
||||||
cs->CreateWindow = pScreen->CreateWindow;
|
cs->CreateWindow = pScreen->CreateWindow;
|
||||||
pScreen->CreateWindow = compCreateWindow;
|
pScreen->CreateWindow = compCreateWindow;
|
||||||
|
|
||||||
cs->DestroyWindow = pScreen->DestroyWindow;
|
|
||||||
pScreen->DestroyWindow = compDestroyWindow;
|
|
||||||
|
|
||||||
cs->RealizeWindow = pScreen->RealizeWindow;
|
cs->RealizeWindow = pScreen->RealizeWindow;
|
||||||
pScreen->RealizeWindow = compRealizeWindow;
|
pScreen->RealizeWindow = compRealizeWindow;
|
||||||
|
|
||||||
|
|
|
@ -125,10 +125,8 @@ typedef struct _CompImplicitRedirectException {
|
||||||
} CompImplicitRedirectException;
|
} CompImplicitRedirectException;
|
||||||
|
|
||||||
typedef struct _CompScreen {
|
typedef struct _CompScreen {
|
||||||
PositionWindowProcPtr PositionWindow;
|
|
||||||
CopyWindowProcPtr CopyWindow;
|
CopyWindowProcPtr CopyWindow;
|
||||||
CreateWindowProcPtr CreateWindow;
|
CreateWindowProcPtr CreateWindow;
|
||||||
DestroyWindowProcPtr DestroyWindow;
|
|
||||||
RealizeWindowProcPtr RealizeWindow;
|
RealizeWindowProcPtr RealizeWindow;
|
||||||
UnrealizeWindowProcPtr UnrealizeWindow;
|
UnrealizeWindowProcPtr UnrealizeWindow;
|
||||||
ClipNotifyProcPtr ClipNotify;
|
ClipNotifyProcPtr ClipNotify;
|
||||||
|
@ -280,8 +278,7 @@ void
|
||||||
Bool
|
Bool
|
||||||
compCheckRedirect(WindowPtr pWin);
|
compCheckRedirect(WindowPtr pWin);
|
||||||
|
|
||||||
Bool
|
void compWindowPosition(ScreenPtr pScreen, WindowPtr pWin, void *arg, int32_t x, int32_t y);
|
||||||
compPositionWindow(WindowPtr pWin, int x, int y);
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
compRealizeWindow(WindowPtr pWin);
|
compRealizeWindow(WindowPtr pWin);
|
||||||
|
@ -309,8 +306,7 @@ void
|
||||||
Bool
|
Bool
|
||||||
compCreateWindow(WindowPtr pWin);
|
compCreateWindow(WindowPtr pWin);
|
||||||
|
|
||||||
Bool
|
void compWindowDestroy(ScreenPtr pScreen, WindowPtr pWin, void *arg);
|
||||||
compDestroyWindow(WindowPtr pWin);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
compSetRedirectBorderClip(WindowPtr pWin, RegionPtr pRegion);
|
compSetRedirectBorderClip(WindowPtr pWin, RegionPtr pRegion);
|
||||||
|
|
|
@ -224,14 +224,8 @@ updateOverlayWindow(ScreenPtr pScreen)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
void compWindowPosition(ScreenPtr pScreen, WindowPtr pWin, void *arg, int32_t x, int32_t y)
|
||||||
compPositionWindow(WindowPtr pWin, int x, int y)
|
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
CompScreenPtr cs = GetCompScreen(pScreen);
|
|
||||||
Bool ret = TRUE;
|
|
||||||
|
|
||||||
pScreen->PositionWindow = cs->PositionWindow;
|
|
||||||
/*
|
/*
|
||||||
* "Shouldn't need this as all possible places should be wrapped
|
* "Shouldn't need this as all possible places should be wrapped
|
||||||
*
|
*
|
||||||
|
@ -255,14 +249,8 @@ compPositionWindow(WindowPtr pWin, int x, int y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(*pScreen->PositionWindow) (pWin, x, y))
|
|
||||||
ret = FALSE;
|
|
||||||
cs->PositionWindow = pScreen->PositionWindow;
|
|
||||||
pScreen->PositionWindow = compPositionWindow;
|
|
||||||
compCheckTree(pWin->drawable.pScreen);
|
compCheckTree(pWin->drawable.pScreen);
|
||||||
if (updateOverlayWindow(pScreen) != Success)
|
updateOverlayWindow(pScreen);
|
||||||
ret = FALSE;
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
|
@ -596,16 +584,12 @@ compCreateWindow(WindowPtr pWin)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
void compWindowDestroy(ScreenPtr pScreen, WindowPtr pWin, void *arg)
|
||||||
compDestroyWindow(WindowPtr pWin)
|
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
CompScreenPtr cs = GetCompScreen(pScreen);
|
CompScreenPtr cs = GetCompScreen(pScreen);
|
||||||
CompWindowPtr cw;
|
CompWindowPtr cw;
|
||||||
CompSubwindowsPtr csw;
|
CompSubwindowsPtr csw;
|
||||||
Bool ret;
|
|
||||||
|
|
||||||
pScreen->DestroyWindow = cs->DestroyWindow;
|
|
||||||
while ((cw = GetCompWindow(pWin)))
|
while ((cw = GetCompWindow(pWin)))
|
||||||
FreeResource(cw->clients->id, X11_RESTYPE_NONE);
|
FreeResource(cw->clients->id, X11_RESTYPE_NONE);
|
||||||
while ((csw = GetCompSubwindows(pWin)))
|
while ((csw = GetCompSubwindows(pWin)))
|
||||||
|
@ -617,16 +601,12 @@ compDestroyWindow(WindowPtr pWin)
|
||||||
compSetParentPixmap(pWin);
|
compSetParentPixmap(pWin);
|
||||||
dixDestroyPixmap(pPixmap, 0);
|
dixDestroyPixmap(pPixmap, 0);
|
||||||
}
|
}
|
||||||
ret = (*pScreen->DestroyWindow) (pWin);
|
|
||||||
cs->DestroyWindow = pScreen->DestroyWindow;
|
|
||||||
pScreen->DestroyWindow = compDestroyWindow;
|
|
||||||
|
|
||||||
/* Did we just destroy the overlay window? */
|
/* Did we just destroy the overlay window? */
|
||||||
if (pWin == cs->pOverlayWin)
|
if (pWin == cs->pOverlayWin)
|
||||||
cs->pOverlayWin = NULL;
|
cs->pOverlayWin = NULL;
|
||||||
|
|
||||||
/* compCheckTree (pWin->drawable.pScreen); can't check -- tree isn't good*/
|
/* compCheckTree (pWin->drawable.pScreen); can't check -- tree isn't good*/
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -32,7 +32,8 @@
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "config-backends.h"
|
#include "config-backends.h"
|
||||||
#include "systemd-logind.h"
|
|
||||||
|
#include "../hw/xfree86/os-support/linux/systemd-logind.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
config_pre_init(void)
|
config_pre_init(void)
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#include <dbus/dbus.h>
|
#include <dbus/dbus.h>
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "dix.h"
|
#include "dix.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,8 @@
|
||||||
#include "config-backends.h"
|
#include "config-backends.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "systemd-logind.h"
|
|
||||||
|
#include "../hw/xfree86/os-support/linux/systemd-logind.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SYSMACROS_H
|
#ifdef HAVE_SYS_SYSMACROS_H
|
||||||
#include <sys/sysmacros.h>
|
#include <sys/sysmacros.h>
|
||||||
|
|
|
@ -24,11 +24,11 @@
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
|
||||||
#include "damageextint.h"
|
#include "damageextint.h"
|
||||||
#include "damagestr.h"
|
#include "damagestr.h"
|
||||||
#include "protocol-versions.h"
|
#include "protocol-versions.h"
|
||||||
#include "extinit_priv.h"
|
|
||||||
#include "dixstruct_priv.h"
|
#include "dixstruct_priv.h"
|
||||||
|
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
|
@ -41,7 +41,9 @@ typedef struct {
|
||||||
} PanoramiXDamageRes;
|
} PanoramiXDamageRes;
|
||||||
|
|
||||||
static RESTYPE XRT_DAMAGE;
|
static RESTYPE XRT_DAMAGE;
|
||||||
static int (*PanoramiXSaveDamageCreate) (ClientPtr);
|
static int damageUseXinerama = 0;
|
||||||
|
|
||||||
|
static int PanoramiXDamageCreate(ClientPtr client, xDamageCreateReq *stuff);
|
||||||
|
|
||||||
#endif /* XINERAMA */
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
|
@ -95,13 +97,12 @@ DamageExtNotify(DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes)
|
||||||
{
|
{
|
||||||
ClientPtr pClient = pDamageExt->pClient;
|
ClientPtr pClient = pDamageExt->pClient;
|
||||||
DrawablePtr pDrawable = pDamageExt->pDrawable;
|
DrawablePtr pDrawable = pDamageExt->pDrawable;
|
||||||
xDamageNotifyEvent ev;
|
|
||||||
int i, x, y, w, h;
|
int i, x, y, w, h;
|
||||||
|
|
||||||
damageGetGeometry(pDrawable, &x, &y, &w, &h);
|
damageGetGeometry(pDrawable, &x, &y, &w, &h);
|
||||||
|
|
||||||
UpdateCurrentTimeIf();
|
UpdateCurrentTimeIf();
|
||||||
ev = (xDamageNotifyEvent) {
|
xDamageNotifyEvent ev = {
|
||||||
.type = DamageEventBase + XDamageNotify,
|
.type = DamageEventBase + XDamageNotify,
|
||||||
.level = pDamageExt->level,
|
.level = pDamageExt->level,
|
||||||
.drawable = pDamageExt->drawable,
|
.drawable = pDamageExt->drawable,
|
||||||
|
@ -183,7 +184,6 @@ ProcDamageQueryVersion(ClientPtr client)
|
||||||
xDamageQueryVersionReply rep = {
|
xDamageQueryVersionReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.length = 0
|
|
||||||
};
|
};
|
||||||
|
|
||||||
REQUEST(xDamageQueryVersionReq);
|
REQUEST(xDamageQueryVersionReq);
|
||||||
|
@ -258,14 +258,12 @@ DamageExtCreate(DrawablePtr pDrawable, DamageReportLevel level,
|
||||||
}
|
}
|
||||||
|
|
||||||
static DamageExtPtr
|
static DamageExtPtr
|
||||||
doDamageCreate(ClientPtr client, int *rc)
|
doDamageCreate(ClientPtr client, int *rc, xDamageCreateReq *stuff)
|
||||||
{
|
{
|
||||||
DrawablePtr pDrawable;
|
DrawablePtr pDrawable;
|
||||||
DamageExtPtr pDamageExt;
|
DamageExtPtr pDamageExt;
|
||||||
DamageReportLevel level;
|
DamageReportLevel level;
|
||||||
|
|
||||||
REQUEST(xDamageCreateReq);
|
|
||||||
|
|
||||||
*rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0,
|
*rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0,
|
||||||
DixGetAttrAccess | DixReadAccess);
|
DixGetAttrAccess | DixReadAccess);
|
||||||
if (*rc != Success)
|
if (*rc != Success)
|
||||||
|
@ -304,8 +302,14 @@ ProcDamageCreate(ClientPtr client)
|
||||||
int rc;
|
int rc;
|
||||||
REQUEST(xDamageCreateReq);
|
REQUEST(xDamageCreateReq);
|
||||||
REQUEST_SIZE_MATCH(xDamageCreateReq);
|
REQUEST_SIZE_MATCH(xDamageCreateReq);
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
|
if (damageUseXinerama)
|
||||||
|
return PanoramiXDamageCreate(client, stuff);
|
||||||
|
#endif
|
||||||
|
|
||||||
LEGAL_NEW_RESOURCE(stuff->damage, client);
|
LEGAL_NEW_RESOURCE(stuff->damage, client);
|
||||||
doDamageCreate(client, &rc);
|
doDamageCreate(client, &rc, stuff);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -461,33 +465,26 @@ ProcDamageAdd(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Major version controls available requests */
|
|
||||||
static const int version_requests[] = {
|
|
||||||
X_DamageQueryVersion, /* before client sends QueryVersion */
|
|
||||||
X_DamageAdd, /* Version 1 */
|
|
||||||
};
|
|
||||||
|
|
||||||
static int (*ProcDamageVector[XDamageNumberRequests]) (ClientPtr) = {
|
|
||||||
/*************** Version 1 ******************/
|
|
||||||
ProcDamageQueryVersion,
|
|
||||||
ProcDamageCreate,
|
|
||||||
ProcDamageDestroy,
|
|
||||||
ProcDamageSubtract,
|
|
||||||
/*************** Version 1.1 ****************/
|
|
||||||
ProcDamageAdd,
|
|
||||||
};
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcDamageDispatch(ClientPtr client)
|
ProcDamageDispatch(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDamageReq);
|
REQUEST(xReq);
|
||||||
DamageClientPtr pDamageClient = GetDamageClient(client);
|
switch (stuff->data) {
|
||||||
|
/* version 1 */
|
||||||
if (pDamageClient->major_version >= ARRAY_SIZE(version_requests))
|
case X_DamageQueryVersion:
|
||||||
|
return ProcDamageQueryVersion(client);
|
||||||
|
case X_DamageCreate:
|
||||||
|
return ProcDamageCreate(client);
|
||||||
|
case X_DamageDestroy:
|
||||||
|
return ProcDamageDestroy(client);
|
||||||
|
case X_DamageSubtract:
|
||||||
|
return ProcDamageSubtract(client);
|
||||||
|
/* version 1.1 */
|
||||||
|
case X_DamageAdd:
|
||||||
|
return ProcDamageAdd(client);
|
||||||
|
default:
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
if (stuff->damageReqType > version_requests[pDamageClient->major_version])
|
}
|
||||||
return BadRequest;
|
|
||||||
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -497,7 +494,7 @@ SProcDamageQueryVersion(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xDamageQueryVersionReq);
|
REQUEST_SIZE_MATCH(xDamageQueryVersionReq);
|
||||||
swapl(&stuff->majorVersion);
|
swapl(&stuff->majorVersion);
|
||||||
swapl(&stuff->minorVersion);
|
swapl(&stuff->minorVersion);
|
||||||
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
return ProcDamageQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -507,7 +504,7 @@ SProcDamageCreate(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xDamageCreateReq);
|
REQUEST_SIZE_MATCH(xDamageCreateReq);
|
||||||
swapl(&stuff->damage);
|
swapl(&stuff->damage);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
return ProcDamageCreate(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -516,7 +513,7 @@ SProcDamageDestroy(ClientPtr client)
|
||||||
REQUEST(xDamageDestroyReq);
|
REQUEST(xDamageDestroyReq);
|
||||||
REQUEST_SIZE_MATCH(xDamageDestroyReq);
|
REQUEST_SIZE_MATCH(xDamageDestroyReq);
|
||||||
swapl(&stuff->damage);
|
swapl(&stuff->damage);
|
||||||
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
return ProcDamageDestroy(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -527,7 +524,7 @@ SProcDamageSubtract(ClientPtr client)
|
||||||
swapl(&stuff->damage);
|
swapl(&stuff->damage);
|
||||||
swapl(&stuff->repair);
|
swapl(&stuff->repair);
|
||||||
swapl(&stuff->parts);
|
swapl(&stuff->parts);
|
||||||
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
return ProcDamageSubtract(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
|
@ -537,30 +534,29 @@ SProcDamageAdd(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xDamageSubtractReq);
|
REQUEST_SIZE_MATCH(xDamageSubtractReq);
|
||||||
swapl(&stuff->drawable);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->region);
|
swapl(&stuff->region);
|
||||||
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
return ProcDamageAdd(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int (*SProcDamageVector[XDamageNumberRequests]) (ClientPtr) = {
|
|
||||||
/*************** Version 1 ******************/
|
|
||||||
SProcDamageQueryVersion,
|
|
||||||
SProcDamageCreate,
|
|
||||||
SProcDamageDestroy,
|
|
||||||
SProcDamageSubtract,
|
|
||||||
/*************** Version 1.1 ****************/
|
|
||||||
SProcDamageAdd,
|
|
||||||
};
|
|
||||||
|
|
||||||
static int _X_COLD
|
static int _X_COLD
|
||||||
SProcDamageDispatch(ClientPtr client)
|
SProcDamageDispatch(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDamageReq);
|
REQUEST(xReq);
|
||||||
DamageClientPtr pDamageClient = GetDamageClient(client);
|
switch (stuff->data) {
|
||||||
|
/* version 1 */
|
||||||
if (pDamageClient->major_version >= ARRAY_SIZE(version_requests))
|
case X_DamageQueryVersion:
|
||||||
|
return SProcDamageQueryVersion(client);
|
||||||
|
case X_DamageCreate:
|
||||||
|
return SProcDamageCreate(client);
|
||||||
|
case X_DamageDestroy:
|
||||||
|
return SProcDamageDestroy(client);
|
||||||
|
case X_DamageSubtract:
|
||||||
|
return SProcDamageSubtract(client);
|
||||||
|
/* version 1.1 */
|
||||||
|
case X_DamageAdd:
|
||||||
|
return SProcDamageAdd(client);
|
||||||
|
default:
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
if (stuff->damageReqType > version_requests[pDamageClient->major_version])
|
}
|
||||||
return BadRequest;
|
|
||||||
return (*SProcDamageVector[stuff->damageReqType]) (client);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -629,15 +625,12 @@ PanoramiXDamageExtDestroy(DamagePtr pDamage, void *closure)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
PanoramiXDamageCreate(ClientPtr client)
|
PanoramiXDamageCreate(ClientPtr client, xDamageCreateReq *stuff)
|
||||||
{
|
{
|
||||||
PanoramiXDamageRes *damage;
|
PanoramiXDamageRes *damage;
|
||||||
PanoramiXRes *draw;
|
PanoramiXRes *draw;
|
||||||
int i, rc;
|
int i, rc;
|
||||||
|
|
||||||
REQUEST(xDamageCreateReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDamageCreateReq);
|
|
||||||
LEGAL_NEW_RESOURCE(stuff->damage, client);
|
LEGAL_NEW_RESOURCE(stuff->damage, client);
|
||||||
rc = dixLookupResourceByClass((void **)&draw, stuff->drawable, XRC_DRAWABLE,
|
rc = dixLookupResourceByClass((void **)&draw, stuff->drawable, XRC_DRAWABLE,
|
||||||
client, DixGetAttrAccess | DixReadAccess);
|
client, DixGetAttrAccess | DixReadAccess);
|
||||||
|
@ -650,7 +643,7 @@ PanoramiXDamageCreate(ClientPtr client)
|
||||||
if (!AddResource(stuff->damage, XRT_DAMAGE, damage))
|
if (!AddResource(stuff->damage, XRT_DAMAGE, damage))
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
|
||||||
damage->ext = doDamageCreate(client, &rc);
|
damage->ext = doDamageCreate(client, &rc, stuff);
|
||||||
if (rc == Success && draw->type == XRT_WINDOW) {
|
if (rc == Success && draw->type == XRT_WINDOW) {
|
||||||
FOR_NSCREENS_FORWARD(i) {
|
FOR_NSCREENS_FORWARD(i) {
|
||||||
DrawablePtr pDrawable;
|
DrawablePtr pDrawable;
|
||||||
|
@ -705,14 +698,13 @@ PanoramiXDamageInit(void)
|
||||||
if (!XRT_DAMAGE)
|
if (!XRT_DAMAGE)
|
||||||
FatalError("Couldn't Xineramify Damage extension\n");
|
FatalError("Couldn't Xineramify Damage extension\n");
|
||||||
|
|
||||||
PanoramiXSaveDamageCreate = ProcDamageVector[X_DamageCreate];
|
damageUseXinerama = 1;
|
||||||
ProcDamageVector[X_DamageCreate] = PanoramiXDamageCreate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PanoramiXDamageReset(void)
|
PanoramiXDamageReset(void)
|
||||||
{
|
{
|
||||||
ProcDamageVector[X_DamageCreate] = PanoramiXSaveDamageCreate;
|
damageUseXinerama = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* XINERAMA */
|
#endif /* XINERAMA */
|
||||||
|
|
|
@ -29,13 +29,15 @@
|
||||||
|
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
|
#include <X11/extensions/damageproto.h>
|
||||||
|
|
||||||
|
#include "dix/selection_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 <X11/extensions/damageproto.h>
|
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "selection.h"
|
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "damage.h"
|
#include "damage.h"
|
||||||
#include "xfixes.h"
|
#include "xfixes.h"
|
||||||
|
|
99
dbe/dbe.c
99
dbe/dbe.c
|
@ -40,10 +40,10 @@
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "extinit_priv.h"
|
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
#include "dixstruct.h"
|
#include "dixstruct.h"
|
||||||
#include "dbestruct.h"
|
#include "dbestruct.h"
|
||||||
|
@ -81,12 +81,6 @@ DbeStubScreen(DbeScreenPrivPtr pDbeScreenPriv, int *nStubbedScreens)
|
||||||
/* Stub DIX. */
|
/* Stub DIX. */
|
||||||
pDbeScreenPriv->SetupBackgroundPainter = NULL;
|
pDbeScreenPriv->SetupBackgroundPainter = NULL;
|
||||||
|
|
||||||
/* Do not unwrap PositionWindow nor DestroyWindow. If the DDX
|
|
||||||
* initialization function failed, we assume that it did not wrap
|
|
||||||
* PositionWindow. Also, DestroyWindow is only wrapped if the DDX
|
|
||||||
* initialization function succeeded.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Stub DDX. */
|
/* Stub DDX. */
|
||||||
pDbeScreenPriv->GetVisualInfo = NULL;
|
pDbeScreenPriv->GetVisualInfo = NULL;
|
||||||
pDbeScreenPriv->AllocBackBufferName = NULL;
|
pDbeScreenPriv->AllocBackBufferName = NULL;
|
||||||
|
@ -1201,7 +1195,9 @@ DbeWindowPrivDelete(void *pDbeWinPriv, XID id)
|
||||||
return Success;
|
return Success;
|
||||||
|
|
||||||
} /* DbeWindowPrivDelete() */
|
} /* DbeWindowPrivDelete() */
|
||||||
|
|
||||||
|
static void miDbeWindowDestroy(ScreenPtr pScreen, WindowPtr pWin, void *closure);
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* DBE DIX Procedure: DbeResetProc
|
* DBE DIX Procedure: DbeResetProc
|
||||||
|
@ -1225,55 +1221,30 @@ DbeResetProc(ExtensionEntry * extEntry)
|
||||||
pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen);
|
pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen);
|
||||||
|
|
||||||
if (pDbeScreenPriv) {
|
if (pDbeScreenPriv) {
|
||||||
/* Unwrap DestroyWindow, which was wrapped in DbeExtensionInit(). */
|
dixScreenUnhookWindowDestroy(pScreen, miDbeWindowDestroy, NULL);
|
||||||
pScreen->DestroyWindow = pDbeScreenPriv->DestroyWindow;
|
dixScreenUnhookWindowPosition(pScreen, miDbeWindowPosition, NULL);
|
||||||
pScreen->PositionWindow = pDbeScreenPriv->PositionWindow;
|
|
||||||
free(pDbeScreenPriv);
|
free(pDbeScreenPriv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} /* DbeResetProc() */
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* DBE DIX Procedure: DbeDestroyWindow
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
*
|
|
||||||
* This is the wrapper for pScreen->DestroyWindow.
|
|
||||||
* This function frees buffer resources for a window before it is
|
|
||||||
* destroyed.
|
|
||||||
*
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
static Bool
|
/**
|
||||||
DbeDestroyWindow(WindowPtr pWin)
|
* @brief window destroy callback
|
||||||
{
|
*
|
||||||
DbeScreenPrivPtr pDbeScreenPriv;
|
* Called by DIX when window is being destroyed.
|
||||||
DbeWindowPrivPtr pDbeWindowPriv;
|
*
|
||||||
ScreenPtr pScreen;
|
|
||||||
Bool ret;
|
|
||||||
|
|
||||||
/*
|
|
||||||
**************************************************************************
|
|
||||||
** 1. Unwrap the member routine.
|
|
||||||
**************************************************************************
|
|
||||||
*/
|
*/
|
||||||
|
static void miDbeWindowDestroy(ScreenPtr pScreen, WindowPtr pWin, void *closure)
|
||||||
pScreen = pWin->drawable.pScreen;
|
{
|
||||||
pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen);
|
|
||||||
pScreen->DestroyWindow = pDbeScreenPriv->DestroyWindow;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
** 2. Do any work necessary before the member routine is called.
|
|
||||||
**
|
|
||||||
** Call the window priv delete function for all buffer IDs associated
|
** Call the window priv delete function for all buffer IDs associated
|
||||||
** with this window.
|
** with this window.
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ((pDbeWindowPriv = DBE_WINDOW_PRIV(pWin))) {
|
DbeWindowPrivPtr pDbeWindowPriv;
|
||||||
while (pDbeWindowPriv) {
|
while ((pDbeWindowPriv = DBE_WINDOW_PRIV(pWin))) {
|
||||||
/* *DbeWinPrivDelete() will free the window private and set it to
|
/* *DbeWinPrivDelete() will free the window private and set it to
|
||||||
* NULL if there are no more buffer IDs associated with this
|
* NULL if there are no more buffer IDs associated with this
|
||||||
* window.
|
* window.
|
||||||
|
@ -1283,36 +1254,6 @@ DbeDestroyWindow(WindowPtr pWin)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
**************************************************************************
|
|
||||||
** 3. Call the member routine, saving its result if necessary.
|
|
||||||
**************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
ret = (*pScreen->DestroyWindow) (pWin);
|
|
||||||
|
|
||||||
/*
|
|
||||||
**************************************************************************
|
|
||||||
** 4. Rewrap the member routine, restoring the wrapper value first in case
|
|
||||||
** the wrapper (or something that it wrapped) change this value.
|
|
||||||
**************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
pDbeScreenPriv->DestroyWindow = pScreen->DestroyWindow;
|
|
||||||
pScreen->DestroyWindow = DbeDestroyWindow;
|
|
||||||
|
|
||||||
/*
|
|
||||||
**************************************************************************
|
|
||||||
** 5. Do any work necessary after the member routine has been called.
|
|
||||||
**
|
|
||||||
** In this case we do not need to do anything.
|
|
||||||
**************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
} /* DbeDestroyWindow() */
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* DBE DIX Procedure: DbeExtensionInit
|
* DBE DIX Procedure: DbeExtensionInit
|
||||||
|
@ -1395,12 +1336,10 @@ DbeExtensionInit(void)
|
||||||
pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen);
|
pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen);
|
||||||
|
|
||||||
if (ddxInitSuccess) {
|
if (ddxInitSuccess) {
|
||||||
/* Wrap DestroyWindow. The DDX initialization function
|
/* Hook in our window destructor. The DDX initialization function
|
||||||
* already wrapped PositionWindow for us.
|
* already added WindowPosition hook for us.
|
||||||
*/
|
*/
|
||||||
|
dixScreenHookWindowDestroy(pScreen, miDbeWindowDestroy, NULL);
|
||||||
pDbeScreenPriv->DestroyWindow = pScreen->DestroyWindow;
|
|
||||||
pScreen->DestroyWindow = DbeDestroyWindow;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* DDX initialization failed. Stub the screen. */
|
/* DDX initialization failed. Stub the screen. */
|
||||||
|
|
|
@ -169,13 +169,6 @@ typedef struct _DbeWindowPrivRec {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _DbeScreenPrivRec {
|
typedef struct _DbeScreenPrivRec {
|
||||||
/* Wrapped functions
|
|
||||||
* It is the responsibility of the DDX layer to wrap PositionWindow().
|
|
||||||
* DbeExtensionInit wraps DestroyWindow().
|
|
||||||
*/
|
|
||||||
PositionWindowProcPtr PositionWindow;
|
|
||||||
DestroyWindowProcPtr DestroyWindow;
|
|
||||||
|
|
||||||
/* Per-screen DIX routines */
|
/* Per-screen DIX routines */
|
||||||
Bool (*SetupBackgroundPainter) (WindowPtr /*pWin */ ,
|
Bool (*SetupBackgroundPainter) (WindowPtr /*pWin */ ,
|
||||||
GCPtr /*pGC */
|
GCPtr /*pGC */
|
||||||
|
|
71
dbe/midbe.c
71
dbe/midbe.c
|
@ -375,14 +375,13 @@ miDbeSwapBuffers(ClientPtr client, int *pNumWindows, DbeSwapInfoPtr swapInfo)
|
||||||
* the resources associated with a DBE buffer ID. There are 5 ways that
|
* the resources associated with a DBE buffer ID. There are 5 ways that
|
||||||
* miDbeWinPrivDelete() can be called by FreeResource(). They are:
|
* miDbeWinPrivDelete() can be called by FreeResource(). They are:
|
||||||
*
|
*
|
||||||
* - A DBE window is destroyed, in which case the DbeDestroyWindow()
|
* - A DBE window is destroyed, in which case the DbeWindowDestroy()
|
||||||
* wrapper is invoked. The wrapper calls FreeResource() for all DBE
|
* callback is invoked. It calls FreeResource() for all DBE buffer IDs.
|
||||||
* buffer IDs.
|
|
||||||
*
|
*
|
||||||
* - miDbeAllocBackBufferName() calls FreeResource() to clean up resources
|
* - miDbeAllocBackBufferName() calls FreeResource() to clean up resources
|
||||||
* after a buffer allocation failure.
|
* after a buffer allocation failure.
|
||||||
*
|
*
|
||||||
* - The PositionWindow wrapper, miDbePositionWindow(), calls
|
* - The WindowPosition hook, miDbeWindowPosition(), calls
|
||||||
* FreeResource() when it fails to create buffers of the new size.
|
* FreeResource() when it fails to create buffers of the new size.
|
||||||
* FreeResource() is called for all DBE buffer IDs.
|
* FreeResource() is called for all DBE buffer IDs.
|
||||||
*
|
*
|
||||||
|
@ -432,22 +431,20 @@ miDbeWinPrivDelete(DbeWindowPrivPtr pDbeWindowPriv, XID bufId)
|
||||||
if (pDbeWindowPriv->pBackBuffer)
|
if (pDbeWindowPriv->pBackBuffer)
|
||||||
dixDestroyPixmap(pDbeWindowPriv->pBackBuffer, 0);
|
dixDestroyPixmap(pDbeWindowPriv->pBackBuffer, 0);
|
||||||
} /* miDbeWinPrivDelete() */
|
} /* miDbeWinPrivDelete() */
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* DBE MI Procedure: miDbePositionWindow
|
* DBE MI Procedure: miDbeWindowPosition
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
*
|
*
|
||||||
* This function was cloned from miMbxPositionWindow() in mimultibuf.c.
|
* This function was cloned from miMbxWindowPosition() in mimultibuf.c.
|
||||||
* This function resizes the buffer when the window is resized.
|
* This function resizes the buffer when the window is resized.
|
||||||
*
|
*
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
static Bool
|
void miDbeWindowPosition(ScreenPtr pScreen, WindowPtr pWin, void *arg, int32_t x, int32_t y)
|
||||||
miDbePositionWindow(WindowPtr pWin, int x, int y)
|
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen;
|
|
||||||
DbeScreenPrivPtr pDbeScreenPriv;
|
DbeScreenPrivPtr pDbeScreenPriv;
|
||||||
DbeWindowPrivPtr pDbeWindowPriv;
|
DbeWindowPrivPtr pDbeWindowPriv;
|
||||||
int width, height;
|
int width, height;
|
||||||
|
@ -460,43 +457,9 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
|
||||||
Bool clear;
|
Bool clear;
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
xRectangle clearRect;
|
xRectangle clearRect;
|
||||||
Bool ret;
|
|
||||||
|
|
||||||
/*
|
|
||||||
**************************************************************************
|
|
||||||
** 1. Unwrap the member routine.
|
|
||||||
**************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen);
|
pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen);
|
||||||
pScreen->PositionWindow = pDbeScreenPriv->PositionWindow;
|
|
||||||
|
|
||||||
/*
|
|
||||||
**************************************************************************
|
|
||||||
** 2. Do any work necessary before the member routine is called.
|
|
||||||
**
|
|
||||||
** In this case we do not need to do anything.
|
|
||||||
**************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
**************************************************************************
|
|
||||||
** 3. Call the member routine, saving its result if necessary.
|
|
||||||
**************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
ret = (*pScreen->PositionWindow) (pWin, x, y);
|
|
||||||
|
|
||||||
/*
|
|
||||||
**************************************************************************
|
|
||||||
** 4. Rewrap the member routine, restoring the wrapper value first in case
|
|
||||||
** the wrapper (or something that it wrapped) change this value.
|
|
||||||
**************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
pDbeScreenPriv->PositionWindow = pScreen->PositionWindow;
|
|
||||||
pScreen->PositionWindow = miDbePositionWindow;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
|
@ -504,14 +467,12 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!(pDbeWindowPriv = DBE_WINDOW_PRIV(pWin))) {
|
if (!(pDbeWindowPriv = DBE_WINDOW_PRIV(pWin)))
|
||||||
return ret;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (pDbeWindowPriv->width == pWin->drawable.width &&
|
if (pDbeWindowPriv->width == pWin->drawable.width &&
|
||||||
pDbeWindowPriv->height == pWin->drawable.height) {
|
pDbeWindowPriv->height == pWin->drawable.height)
|
||||||
return ret;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
width = pWin->drawable.width;
|
width = pWin->drawable.width;
|
||||||
height = pWin->drawable.height;
|
height = pWin->drawable.height;
|
||||||
|
@ -595,7 +556,7 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
|
||||||
}
|
}
|
||||||
|
|
||||||
FreeScratchGC(pGC);
|
FreeScratchGC(pGC);
|
||||||
return FALSE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
@ -645,11 +606,8 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
|
||||||
|
|
||||||
FreeScratchGC(pGC);
|
FreeScratchGC(pGC);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
} /* miDbePositionWindow() */
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* DBE MI Procedure: miDbeInit
|
* DBE MI Procedure: miDbeInit
|
||||||
|
@ -664,8 +622,7 @@ Bool
|
||||||
miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv)
|
miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv)
|
||||||
{
|
{
|
||||||
/* Wrap functions. */
|
/* Wrap functions. */
|
||||||
pDbeScreenPriv->PositionWindow = pScreen->PositionWindow;
|
dixScreenUnhookWindowPosition(pScreen, miDbeWindowPosition, NULL);
|
||||||
pScreen->PositionWindow = miDbePositionWindow;
|
|
||||||
|
|
||||||
/* Initialize the per-screen DBE function pointers. */
|
/* Initialize the per-screen DBE function pointers. */
|
||||||
pDbeScreenPriv->GetVisualInfo = miDbeGetVisualInfo;
|
pDbeScreenPriv->GetVisualInfo = miDbeGetVisualInfo;
|
||||||
|
|
|
@ -53,4 +53,6 @@ extern DevPrivateKeyRec dbeWindowPrivKeyRec;
|
||||||
extern RESTYPE dbeDrawableResType;
|
extern RESTYPE dbeDrawableResType;
|
||||||
extern RESTYPE dbeWindowPrivResType;
|
extern RESTYPE dbeWindowPrivResType;
|
||||||
|
|
||||||
|
void miDbeWindowPosition(ScreenPtr pScreen, WindowPtr pWin, void *arg, int32_t x, int32_t y);
|
||||||
|
|
||||||
#endif /* MIDBE_H */
|
#endif /* MIDBE_H */
|
||||||
|
|
|
@ -99,7 +99,7 @@ typedef struct _LFclosure {
|
||||||
typedef struct _PTclosure {
|
typedef struct _PTclosure {
|
||||||
ClientPtr client;
|
ClientPtr client;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
unsigned char *pElt;
|
unsigned char *pElt;
|
||||||
unsigned char *endReq;
|
unsigned char *endReq;
|
||||||
unsigned char *data;
|
unsigned char *data;
|
||||||
|
@ -115,7 +115,7 @@ typedef struct _PTclosure {
|
||||||
typedef struct _ITclosure {
|
typedef struct _ITclosure {
|
||||||
ClientPtr client;
|
ClientPtr client;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
BYTE nChars;
|
BYTE nChars;
|
||||||
unsigned char *data;
|
unsigned char *data;
|
||||||
int xorg;
|
int xorg;
|
||||||
|
|
|
@ -61,6 +61,7 @@ SOFTWARE.
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
#include "dix/ptrveloc_priv.h"
|
#include "dix/ptrveloc_priv.h"
|
||||||
#include "mi/mi_priv.h"
|
#include "mi/mi_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
#include "xkb/xkbsrv_priv.h"
|
#include "xkb/xkbsrv_priv.h"
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,9 @@ Equipment Corporation.
|
||||||
#include "dix/gc_priv.h"
|
#include "dix/gc_priv.h"
|
||||||
#include "dix/registry_priv.h"
|
#include "dix/registry_priv.h"
|
||||||
#include "dix/screenint_priv.h"
|
#include "dix/screenint_priv.h"
|
||||||
|
#include "dix/selection_priv.h"
|
||||||
#include "include/resource.h"
|
#include "include/resource.h"
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
#include "os/auth.h"
|
#include "os/auth.h"
|
||||||
#include "os/client_priv.h"
|
#include "os/client_priv.h"
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
@ -120,7 +122,6 @@ Equipment Corporation.
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "dixfontstr.h"
|
#include "dixfontstr.h"
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
#include "selection.h"
|
|
||||||
#include "colormapst.h"
|
#include "colormapst.h"
|
||||||
#include "cursorstr.h"
|
#include "cursorstr.h"
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
|
@ -1462,6 +1463,8 @@ int
|
||||||
dixDestroyPixmap(void *value, XID pid)
|
dixDestroyPixmap(void *value, XID pid)
|
||||||
{
|
{
|
||||||
PixmapPtr pPixmap = (PixmapPtr) value;
|
PixmapPtr pPixmap = (PixmapPtr) value;
|
||||||
|
if (pPixmap && pPixmap->refcnt == 1)
|
||||||
|
dixScreenRaisePixmapDestroy(pPixmap);
|
||||||
if (pPixmap && pPixmap->drawable.pScreen && pPixmap->drawable.pScreen->DestroyPixmap)
|
if (pPixmap && pPixmap->drawable.pScreen && pPixmap->drawable.pScreen->DestroyPixmap)
|
||||||
return pPixmap->drawable.pScreen->DestroyPixmap(pPixmap);
|
return pPixmap->drawable.pScreen->DestroyPixmap(pPixmap);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1558,7 +1561,7 @@ int
|
||||||
ProcCreateGC(ClientPtr client)
|
ProcCreateGC(ClientPtr client)
|
||||||
{
|
{
|
||||||
int error, rc;
|
int error, rc;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
unsigned len;
|
unsigned len;
|
||||||
|
|
||||||
|
@ -1575,7 +1578,7 @@ ProcCreateGC(ClientPtr client)
|
||||||
len = client->req_len - bytes_to_int32(sizeof(xCreateGCReq));
|
len = client->req_len - bytes_to_int32(sizeof(xCreateGCReq));
|
||||||
if (len != Ones(stuff->mask))
|
if (len != Ones(stuff->mask))
|
||||||
return BadLength;
|
return BadLength;
|
||||||
pGC = (GC *) CreateGC(pDraw, stuff->mask, (XID *) &stuff[1], &error,
|
pGC = (GCPtr) CreateGC(pDraw, stuff->mask, (XID *) &stuff[1], &error,
|
||||||
stuff->gc, client);
|
stuff->gc, client);
|
||||||
if (error != Success)
|
if (error != Success)
|
||||||
return error;
|
return error;
|
||||||
|
@ -1587,7 +1590,7 @@ ProcCreateGC(ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcChangeGC(ClientPtr client)
|
ProcChangeGC(ClientPtr client)
|
||||||
{
|
{
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
int result;
|
int result;
|
||||||
unsigned len;
|
unsigned len;
|
||||||
|
|
||||||
|
@ -1608,8 +1611,8 @@ ProcChangeGC(ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcCopyGC(ClientPtr client)
|
ProcCopyGC(ClientPtr client)
|
||||||
{
|
{
|
||||||
GC *dstGC;
|
GCPtr dstGC;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
REQUEST(xCopyGCReq);
|
REQUEST(xCopyGCReq);
|
||||||
|
@ -1633,7 +1636,7 @@ ProcCopyGC(ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcSetDashes(ClientPtr client)
|
ProcSetDashes(ClientPtr client)
|
||||||
{
|
{
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
REQUEST(xSetDashesReq);
|
REQUEST(xSetDashesReq);
|
||||||
|
@ -1659,7 +1662,7 @@ int
|
||||||
ProcSetClipRectangles(ClientPtr client)
|
ProcSetClipRectangles(ClientPtr client)
|
||||||
{
|
{
|
||||||
int nr, result;
|
int nr, result;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
|
|
||||||
REQUEST(xSetClipRectanglesReq);
|
REQUEST(xSetClipRectanglesReq);
|
||||||
|
|
||||||
|
@ -1684,7 +1687,7 @@ ProcSetClipRectangles(ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcFreeGC(ClientPtr client)
|
ProcFreeGC(ClientPtr client)
|
||||||
{
|
{
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
@ -1774,7 +1777,7 @@ ProcCopyArea(ClientPtr client)
|
||||||
{
|
{
|
||||||
DrawablePtr pDst;
|
DrawablePtr pDst;
|
||||||
DrawablePtr pSrc;
|
DrawablePtr pSrc;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
|
|
||||||
REQUEST(xCopyAreaReq);
|
REQUEST(xCopyAreaReq);
|
||||||
RegionPtr pRgn;
|
RegionPtr pRgn;
|
||||||
|
@ -1812,7 +1815,7 @@ int
|
||||||
ProcCopyPlane(ClientPtr client)
|
ProcCopyPlane(ClientPtr client)
|
||||||
{
|
{
|
||||||
DrawablePtr psrcDraw, pdstDraw;
|
DrawablePtr psrcDraw, pdstDraw;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
|
|
||||||
REQUEST(xCopyPlaneReq);
|
REQUEST(xCopyPlaneReq);
|
||||||
RegionPtr pRgn;
|
RegionPtr pRgn;
|
||||||
|
@ -1858,7 +1861,7 @@ int
|
||||||
ProcPolyPoint(ClientPtr client)
|
ProcPolyPoint(ClientPtr client)
|
||||||
{
|
{
|
||||||
int npoint;
|
int npoint;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
|
||||||
REQUEST(xPolyPointReq);
|
REQUEST(xPolyPointReq);
|
||||||
|
@ -1881,7 +1884,7 @@ int
|
||||||
ProcPolyLine(ClientPtr client)
|
ProcPolyLine(ClientPtr client)
|
||||||
{
|
{
|
||||||
int npoint;
|
int npoint;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
|
||||||
REQUEST(xPolyLineReq);
|
REQUEST(xPolyLineReq);
|
||||||
|
@ -1904,7 +1907,7 @@ int
|
||||||
ProcPolySegment(ClientPtr client)
|
ProcPolySegment(ClientPtr client)
|
||||||
{
|
{
|
||||||
int nsegs;
|
int nsegs;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
|
||||||
REQUEST(xPolySegmentReq);
|
REQUEST(xPolySegmentReq);
|
||||||
|
@ -1924,7 +1927,7 @@ int
|
||||||
ProcPolyRectangle(ClientPtr client)
|
ProcPolyRectangle(ClientPtr client)
|
||||||
{
|
{
|
||||||
int nrects;
|
int nrects;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
|
||||||
REQUEST(xPolyRectangleReq);
|
REQUEST(xPolyRectangleReq);
|
||||||
|
@ -1945,7 +1948,7 @@ int
|
||||||
ProcPolyArc(ClientPtr client)
|
ProcPolyArc(ClientPtr client)
|
||||||
{
|
{
|
||||||
int narcs;
|
int narcs;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
|
||||||
REQUEST(xPolyArcReq);
|
REQUEST(xPolyArcReq);
|
||||||
|
@ -1965,7 +1968,7 @@ int
|
||||||
ProcFillPoly(ClientPtr client)
|
ProcFillPoly(ClientPtr client)
|
||||||
{
|
{
|
||||||
int things;
|
int things;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
|
||||||
REQUEST(xFillPolyReq);
|
REQUEST(xFillPolyReq);
|
||||||
|
@ -1995,7 +1998,7 @@ int
|
||||||
ProcPolyFillRectangle(ClientPtr client)
|
ProcPolyFillRectangle(ClientPtr client)
|
||||||
{
|
{
|
||||||
int things;
|
int things;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
|
||||||
REQUEST(xPolyFillRectangleReq);
|
REQUEST(xPolyFillRectangleReq);
|
||||||
|
@ -2017,7 +2020,7 @@ int
|
||||||
ProcPolyFillArc(ClientPtr client)
|
ProcPolyFillArc(ClientPtr client)
|
||||||
{
|
{
|
||||||
int narcs;
|
int narcs;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
|
||||||
REQUEST(xPolyFillArcReq);
|
REQUEST(xPolyFillArcReq);
|
||||||
|
@ -2090,7 +2093,7 @@ ReformatImage(char *base, int nbytes, int bpp, int order)
|
||||||
int
|
int
|
||||||
ProcPutImage(ClientPtr client)
|
ProcPutImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
long length; /* length of scanline server padded */
|
long length; /* length of scanline server padded */
|
||||||
long lengthProto; /* length of scanline protocol padded */
|
long lengthProto; /* length of scanline protocol padded */
|
||||||
|
@ -2361,7 +2364,7 @@ ProcPolyText(ClientPtr client)
|
||||||
|
|
||||||
REQUEST(xPolyTextReq);
|
REQUEST(xPolyTextReq);
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xPolyTextReq);
|
REQUEST_AT_LEAST_SIZE(xPolyTextReq);
|
||||||
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
|
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
|
||||||
|
@ -2385,7 +2388,7 @@ ProcImageText8(ClientPtr client)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
|
|
||||||
REQUEST(xImageTextReq);
|
REQUEST(xImageTextReq);
|
||||||
|
|
||||||
|
@ -2411,7 +2414,7 @@ ProcImageText16(ClientPtr client)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
|
|
||||||
REQUEST(xImageTextReq);
|
REQUEST(xImageTextReq);
|
||||||
|
|
||||||
|
|
|
@ -253,4 +253,68 @@ extern Bool explicit_display;
|
||||||
extern Bool disableBackingStore;
|
extern Bool disableBackingStore;
|
||||||
extern Bool enableBackingStore;
|
extern Bool enableBackingStore;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief call screen's window destructors
|
||||||
|
* @see dixScreenHookWindowDestroy
|
||||||
|
* @param pWin the window thats being destroyed
|
||||||
|
* @result the ScreenRec's DestroyWindow() return value
|
||||||
|
*
|
||||||
|
* Call the pluggable window destructors that extensions might have registered on
|
||||||
|
* the screen, and finally call ScreenRec's DestroyWindow proc.
|
||||||
|
*
|
||||||
|
* Should only be called by DIX itself.
|
||||||
|
*/
|
||||||
|
int dixScreenRaiseWindowDestroy(WindowPtr pWin);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief call screen's window position notification hooks
|
||||||
|
* @see dixScreenHookWindowPosition
|
||||||
|
* @param pWin the window to notify on
|
||||||
|
*
|
||||||
|
* Call the pluggable window position hooks that extensions might have registered on
|
||||||
|
* the screen, and finally call ScreenRec's PositionWindow proc.
|
||||||
|
*
|
||||||
|
* Should only be called by DIX itself.
|
||||||
|
*/
|
||||||
|
void dixScreenRaiseWindowPosition(WindowPtr pWin, uint32_t x, uint32_t y);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief call screen's close hooks
|
||||||
|
* @see dixScreenHookClose
|
||||||
|
* @param pScreen the screen being closed
|
||||||
|
*
|
||||||
|
* Call the pluggable screen close hooks that extensions might have registered on
|
||||||
|
* the screen, and finally call ScreenRec's CloseScreen proc.
|
||||||
|
*
|
||||||
|
* Should only be called by DIX itself.
|
||||||
|
*/
|
||||||
|
void dixScreenRaiseClose(ScreenPtr pScreen);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief call screen's PixmapDestroy hook
|
||||||
|
* @see dixScreenHookPixmapDestroy
|
||||||
|
* @param pPixmap the pixmap being destroyed
|
||||||
|
*
|
||||||
|
* Call the pluggable pixmap destroy pixmap hooks that extensions might have
|
||||||
|
* registered on the screen.
|
||||||
|
* Note that it's *only* called, when the pixmap is really being destroyed
|
||||||
|
* (instead of just unref'ed)
|
||||||
|
*
|
||||||
|
* Should only be called by DIX itself, by dixDestroyPixmap()
|
||||||
|
* It must be called *before* the ScreenRec->DestroyPixmap() is called, any
|
||||||
|
* only if the reference counter reaches 1.
|
||||||
|
*/
|
||||||
|
void dixScreenRaisePixmapDestroy(PixmapPtr pPixmap);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief lookup window by XID
|
||||||
|
*
|
||||||
|
* This globally looks for Window with given XID (all screens, all clients)
|
||||||
|
* and returns a pointer to it. If not found, returns NULL.
|
||||||
|
*
|
||||||
|
* Unlike ::dixLookupWindow() it doesn't scan only one given client, nor does
|
||||||
|
* it do any XACE calls.
|
||||||
|
*/
|
||||||
|
WindowPtr dixLookupWindowByXID(Window window);
|
||||||
|
|
||||||
#endif /* _XSERVER_DIX_PRIV_H */
|
#endif /* _XSERVER_DIX_PRIV_H */
|
||||||
|
|
|
@ -60,6 +60,7 @@ Equipment Corporation.
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/gc_priv.h"
|
#include "dix/gc_priv.h"
|
||||||
#include "os/auth.h"
|
#include "os/auth.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
@ -1103,7 +1104,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
|
||||||
int err = Success, lgerr; /* err is in X error, not font error, space */
|
int err = Success, lgerr; /* err is in X error, not font error, space */
|
||||||
enum { NEVER_SLEPT, START_SLEEP, SLEEPING } client_state = NEVER_SLEPT;
|
enum { NEVER_SLEPT, START_SLEEP, SLEEPING } client_state = NEVER_SLEPT;
|
||||||
FontPathElementPtr fpe;
|
FontPathElementPtr fpe;
|
||||||
GC *origGC = NULL;
|
GCPtr origGC = NULL;
|
||||||
int itemSize = c->reqType == X_PolyText8 ? 1 : 2;
|
int itemSize = c->reqType == X_PolyText8 ? 1 : 2;
|
||||||
|
|
||||||
if (client->clientGone) {
|
if (client->clientGone) {
|
||||||
|
@ -1213,7 +1214,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
|
||||||
if (lgerr == Suspended) {
|
if (lgerr == Suspended) {
|
||||||
if (!ClientIsAsleep(client)) {
|
if (!ClientIsAsleep(client)) {
|
||||||
int len;
|
int len;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
PTclosurePtr new_closure;
|
PTclosurePtr new_closure;
|
||||||
|
|
||||||
/* We're putting the client to sleep. We need to do a few things
|
/* We're putting the client to sleep. We need to do a few things
|
||||||
|
@ -1354,7 +1355,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
PolyText(ClientPtr client, DrawablePtr pDraw, GC * pGC, unsigned char *pElt,
|
PolyText(ClientPtr client, DrawablePtr pDraw, GCPtr pGC, unsigned char *pElt,
|
||||||
unsigned char *endReq, int xorg, int yorg, int reqType, XID did)
|
unsigned char *endReq, int xorg, int yorg, int reqType, XID did)
|
||||||
{
|
{
|
||||||
PTclosureRec local_closure = {
|
PTclosureRec local_closure = {
|
||||||
|
@ -1409,7 +1410,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
|
||||||
lgerr = LoadGlyphs(client, c->pGC->font, c->nChars, itemSize, c->data);
|
lgerr = LoadGlyphs(client, c->pGC->font, c->nChars, itemSize, c->data);
|
||||||
if (lgerr == Suspended) {
|
if (lgerr == Suspended) {
|
||||||
if (!ClientIsAsleep(client)) {
|
if (!ClientIsAsleep(client)) {
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
unsigned char *data;
|
unsigned char *data;
|
||||||
ITclosurePtr new_closure;
|
ITclosurePtr new_closure;
|
||||||
ITclosurePtr old_closure;
|
ITclosurePtr old_closure;
|
||||||
|
@ -1500,7 +1501,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ImageText(ClientPtr client, DrawablePtr pDraw, GC * pGC, int nChars,
|
ImageText(ClientPtr client, DrawablePtr pDraw, GCPtr pGC, int nChars,
|
||||||
unsigned char *data, int xorg, int yorg, int reqType, XID did)
|
unsigned char *data, int xorg, int yorg, int reqType, XID did)
|
||||||
{
|
{
|
||||||
ITclosureRec local_closure;
|
ITclosureRec local_closure;
|
||||||
|
|
|
@ -202,7 +202,7 @@ int
|
||||||
dixLookupFontable(FontPtr *pFont, XID id, ClientPtr client, Mask access)
|
dixLookupFontable(FontPtr *pFont, XID id, ClientPtr client, Mask access)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
GC *pGC;
|
GCPtr pGC;
|
||||||
|
|
||||||
client->errorValue = id; /* EITHER font or gc */
|
client->errorValue = id; /* EITHER font or gc */
|
||||||
rc = dixLookupResourceByType((void **) pFont, id, X11_RESTYPE_FONT, client,
|
rc = dixLookupResourceByType((void **) pFont, id, X11_RESTYPE_FONT, client,
|
||||||
|
|
|
@ -124,6 +124,8 @@ Equipment Corporation.
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_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 "os/log_priv.h"
|
||||||
#include "xkb/xkbsrv_priv.h"
|
#include "xkb/xkbsrv_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
10
dix/gc.c
10
dix/gc.c
|
@ -73,7 +73,7 @@ static Bool CreateDefaultTile(GCPtr pGC);
|
||||||
static unsigned char DefaultDash[2] = { 4, 4 };
|
static unsigned char DefaultDash[2] = { 4, 4 };
|
||||||
|
|
||||||
void
|
void
|
||||||
ValidateGC(DrawablePtr pDraw, GC * pGC)
|
ValidateGC(DrawablePtr pDraw, GCPtr pGC)
|
||||||
{
|
{
|
||||||
(*pGC->funcs->ValidateGC) (pGC, pGC->stateChanges, pDraw);
|
(*pGC->funcs->ValidateGC) (pGC, pGC->stateChanges, pDraw);
|
||||||
pGC->stateChanges = 0;
|
pGC->stateChanges = 0;
|
||||||
|
@ -121,7 +121,7 @@ ValidateGC(DrawablePtr pDraw, GC * pGC)
|
||||||
_var = (_type)pUnion->ptr; pUnion++; }
|
_var = (_type)pUnion->ptr; pUnion++; }
|
||||||
|
|
||||||
int
|
int
|
||||||
ChangeGC(ClientPtr client, GC * pGC, BITS32 mask, ChangeGCValPtr pUnion)
|
ChangeGC(ClientPtr client, GCPtr pGC, BITS32 mask, ChangeGCValPtr pUnion)
|
||||||
{
|
{
|
||||||
BITS32 index2;
|
BITS32 index2;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
@ -429,7 +429,7 @@ static const struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
ChangeGCXIDs(ClientPtr client, GC * pGC, BITS32 mask, CARD32 *pC32)
|
ChangeGCXIDs(ClientPtr client, GCPtr pGC, BITS32 mask, CARD32 *pC32)
|
||||||
{
|
{
|
||||||
ChangeGCVal vals[GCLastBit + 1];
|
ChangeGCVal vals[GCLastBit + 1];
|
||||||
int i;
|
int i;
|
||||||
|
@ -466,7 +466,7 @@ NewGCObject(ScreenPtr pScreen, int depth)
|
||||||
{
|
{
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
|
|
||||||
pGC = dixAllocateScreenObjectWithPrivates(pScreen, GC, PRIVATE_GC);
|
pGC = dixAllocateScreenObjectWithPrivates(pScreen, GCRec, PRIVATE_GC);
|
||||||
if (!pGC) {
|
if (!pGC) {
|
||||||
return (GCPtr) NULL;
|
return (GCPtr) NULL;
|
||||||
}
|
}
|
||||||
|
@ -614,7 +614,7 @@ CreateDefaultTile(GCPtr pGC)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
CopyGC(GC * pgcSrc, GC * pgcDst, BITS32 mask)
|
CopyGC(GCPtr pgcSrc, GCPtr pgcDst, BITS32 mask)
|
||||||
{
|
{
|
||||||
BITS32 index2;
|
BITS32 index2;
|
||||||
BITS32 maskQ;
|
BITS32 maskQ;
|
||||||
|
|
|
@ -3,51 +3,6 @@
|
||||||
+ Copyright © 1987, 1998 The Open Group
|
+ Copyright © 1987, 1998 The Open Group
|
||||||
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
||||||
*/
|
*/
|
||||||
/************************************************************
|
|
||||||
|
|
||||||
Copyright 1987, 1998 The Open Group
|
|
||||||
|
|
||||||
Permission to use, copy, modify, distribute, and sell this software and its
|
|
||||||
documentation for any purpose is hereby granted without fee, provided that
|
|
||||||
the above copyright notice appear in all copies and that both that
|
|
||||||
copyright notice and this permission notice appear in supporting
|
|
||||||
documentation.
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
||||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of The Open Group shall not be
|
|
||||||
used in advertising or otherwise to promote the sale, use or other dealings
|
|
||||||
in this Software without prior written authorization from The Open Group.
|
|
||||||
|
|
||||||
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
|
||||||
|
|
||||||
All Rights Reserved
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and distribute this software and its
|
|
||||||
documentation for any purpose and without fee is hereby granted,
|
|
||||||
provided that the above copyright notice appear in all copies and that
|
|
||||||
both that copyright notice and this permission notice appear in
|
|
||||||
supporting documentation, and that the name of Digital not be
|
|
||||||
used in advertising or publicity pertaining to distribution of the
|
|
||||||
software without specific, written prior permission.
|
|
||||||
|
|
||||||
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
|
||||||
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
|
||||||
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
|
||||||
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
||||||
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
||||||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************/
|
|
||||||
#ifndef _XSERVER_INPUT_PRIV_H
|
#ifndef _XSERVER_INPUT_PRIV_H
|
||||||
#define _XSERVER_INPUT_PRIV_H
|
#define _XSERVER_INPUT_PRIV_H
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
/* SPDX-License-Identifier: MIT OR X11
|
||||||
|
*
|
||||||
|
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
||||||
|
*
|
||||||
|
* @brief DIX lookup functions
|
||||||
|
*/
|
||||||
|
#include <dix-config.h>
|
||||||
|
|
||||||
|
#include "dix/dix_priv.h"
|
||||||
|
#include "include/windowstr.h"
|
||||||
|
|
||||||
|
struct window_xid_match {
|
||||||
|
WindowPtr pWin;
|
||||||
|
Window id;
|
||||||
|
};
|
||||||
|
|
||||||
|
static int dix_match_window_xid(WindowPtr pWin, void *ptr)
|
||||||
|
{
|
||||||
|
struct window_xid_match *walk = (struct window_xid_match*) ptr;
|
||||||
|
|
||||||
|
if (walk->id == pWin->drawable.id) {
|
||||||
|
walk->pWin = pWin;
|
||||||
|
return WT_STOPWALKING;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return WT_WALKCHILDREN;
|
||||||
|
}
|
||||||
|
|
||||||
|
WindowPtr dixLookupWindowByXID(Window window)
|
||||||
|
{
|
||||||
|
struct window_xid_match walk = {
|
||||||
|
.id = window,
|
||||||
|
};
|
||||||
|
|
||||||
|
for (int i = 0; i < screenInfo.numScreens; i++) {
|
||||||
|
WalkTree(screenInfo.screens[i], dix_match_window_xid, &walk);
|
||||||
|
if (walk.pWin)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return walk.pWin;
|
||||||
|
}
|
|
@ -91,6 +91,7 @@ Equipment Corporation.
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
#include "dix/gc_priv.h"
|
#include "dix/gc_priv.h"
|
||||||
#include "dix/registry_priv.h"
|
#include "dix/registry_priv.h"
|
||||||
|
#include "dix/selection_priv.h"
|
||||||
#include "os/audit.h"
|
#include "os/audit.h"
|
||||||
#include "os/auth.h"
|
#include "os/auth.h"
|
||||||
#include "os/client_priv.h"
|
#include "os/client_priv.h"
|
||||||
|
@ -110,7 +111,6 @@ Equipment Corporation.
|
||||||
#include "colormap.h"
|
#include "colormap.h"
|
||||||
#include "colormapst.h"
|
#include "colormapst.h"
|
||||||
#include "cursorstr.h"
|
#include "cursorstr.h"
|
||||||
#include "selection.h"
|
|
||||||
#include "servermd.h"
|
#include "servermd.h"
|
||||||
#include "dixfont.h"
|
#include "dixfont.h"
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
|
|
|
@ -20,6 +20,7 @@ srcs_dix = [
|
||||||
'glyphcurs.c',
|
'glyphcurs.c',
|
||||||
'grabs.c',
|
'grabs.c',
|
||||||
'inpututils.c',
|
'inpututils.c',
|
||||||
|
'lookup.c',
|
||||||
'pixmap.c',
|
'pixmap.c',
|
||||||
'privates.c',
|
'privates.c',
|
||||||
'property.c',
|
'property.c',
|
||||||
|
@ -27,6 +28,7 @@ srcs_dix = [
|
||||||
'region.c',
|
'region.c',
|
||||||
'registry.c',
|
'registry.c',
|
||||||
'resource.c',
|
'resource.c',
|
||||||
|
'screen_hooks.c',
|
||||||
'selection.c',
|
'selection.c',
|
||||||
'swaprep.c',
|
'swaprep.c',
|
||||||
'swapreq.c',
|
'swapreq.c',
|
||||||
|
|
|
@ -565,7 +565,7 @@ static const int offsets[] = {
|
||||||
-1, /* X11_RESTYPE_NONE */
|
-1, /* X11_RESTYPE_NONE */
|
||||||
offsetof(WindowRec, devPrivates), /* X11_RESTYPE_WINDOW */
|
offsetof(WindowRec, devPrivates), /* X11_RESTYPE_WINDOW */
|
||||||
offsetof(PixmapRec, devPrivates), /* X11_RESTYPE_PIXMAP */
|
offsetof(PixmapRec, devPrivates), /* X11_RESTYPE_PIXMAP */
|
||||||
offsetof(GC, devPrivates), /* X11_RESTYPE_GC */
|
offsetof(GCRec, devPrivates), /* X11_RESTYPE_GC */
|
||||||
-1, /* X11_RESTYPE_FONT */
|
-1, /* X11_RESTYPE_FONT */
|
||||||
offsetof(CursorRec, devPrivates), /* X11_RESTYPE_CURSOR */
|
offsetof(CursorRec, devPrivates), /* X11_RESTYPE_CURSOR */
|
||||||
offsetof(ColormapRec, devPrivates), /* X11_RESTYPE_COLORMAP */
|
offsetof(ColormapRec, devPrivates), /* X11_RESTYPE_COLORMAP */
|
||||||
|
|
|
@ -59,6 +59,11 @@ SOFTWARE.
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
#include "xace.h"
|
#include "xace.h"
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
|
#include "Xext/panoramiX.h"
|
||||||
|
#include "Xext/panoramiXsrv.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
* Property Stuff
|
* Property Stuff
|
||||||
*
|
*
|
||||||
|
@ -107,6 +112,46 @@ dixLookupProperty(PropertyPtr *result, WindowPtr pWin, Atom propertyName,
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
setVRRMode(WindowPtr pWin, WindowVRRMode mode)
|
||||||
|
{
|
||||||
|
SetWindowVRRModeProcPtr proc = pWin->drawable.pScreen->SetWindowVRRMode;
|
||||||
|
if (proc != NULL)
|
||||||
|
proc(pWin, mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
notifyVRRMode(ClientPtr pClient, WindowPtr pWindow, int state, PropertyPtr pProp)
|
||||||
|
{
|
||||||
|
const char *pName = NameForAtom(pProp->propertyName);
|
||||||
|
if (pName == NULL || strcmp(pName, "_VARIABLE_REFRESH") || pProp->format != 32 || pProp->size != 1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
WindowVRRMode mode = (WindowVRRMode)(state == PropertyNewValue ? (*((uint32_t*)pProp->data)) : 0);
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
|
if (!noPanoramiXExtension) {
|
||||||
|
PanoramiXRes *win;
|
||||||
|
int rc, j;
|
||||||
|
|
||||||
|
rc = dixLookupResourceByType((void **) &win, pWindow->drawable.id, XRT_WINDOW,
|
||||||
|
pClient, DixWriteAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
goto no_panoramix;
|
||||||
|
|
||||||
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
|
WindowPtr pWin;
|
||||||
|
rc = dixLookupWindow(&pWin, win->info[j].id, pClient, DixSetPropAccess);
|
||||||
|
if (rc == Success)
|
||||||
|
setVRRMode(pWin, mode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
no_panoramix:
|
||||||
|
#endif
|
||||||
|
setVRRMode(pWindow, mode);
|
||||||
|
}
|
||||||
|
|
||||||
CallbackListPtr PropertyStateCallback;
|
CallbackListPtr PropertyStateCallback;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -187,6 +232,7 @@ ProcRotateProperties(ClientPtr client)
|
||||||
for (i = 0; i < stuff->nAtoms; i++) {
|
for (i = 0; i < stuff->nAtoms; i++) {
|
||||||
j = (i + delta) % stuff->nAtoms;
|
j = (i + delta) % stuff->nAtoms;
|
||||||
deliverPropertyNotifyEvent(pWin, PropertyNewValue, props[i]);
|
deliverPropertyNotifyEvent(pWin, PropertyNewValue, props[i]);
|
||||||
|
notifyVRRMode(client, pWin, PropertyNewValue, props[i]);
|
||||||
|
|
||||||
/* Preserve name and devPrivates */
|
/* Preserve name and devPrivates */
|
||||||
props[j]->type = saved[i].type;
|
props[j]->type = saved[i].type;
|
||||||
|
@ -366,8 +412,10 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
|
||||||
else
|
else
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
if (sendevent)
|
if (sendevent) {
|
||||||
deliverPropertyNotifyEvent(pWin, PropertyNewValue, pProp);
|
deliverPropertyNotifyEvent(pWin, PropertyNewValue, pProp);
|
||||||
|
notifyVRRMode(pClient, pWin, PropertyNewValue, pProp);
|
||||||
|
}
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
@ -397,6 +445,7 @@ DeleteProperty(ClientPtr client, WindowPtr pWin, Atom propName)
|
||||||
}
|
}
|
||||||
|
|
||||||
deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp);
|
deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp);
|
||||||
|
notifyVRRMode(client, pWin, PropertyDelete, pProp);
|
||||||
free(pProp->data);
|
free(pProp->data);
|
||||||
dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY);
|
dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY);
|
||||||
}
|
}
|
||||||
|
@ -533,7 +582,10 @@ ProcGetProperty(ClientPtr client)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (stuff->delete && (reply.bytesAfter == 0))
|
if (stuff->delete && (reply.bytesAfter == 0))
|
||||||
|
{
|
||||||
deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp);
|
deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp);
|
||||||
|
notifyVRRMode(client, pWin, PropertyDelete, pProp);
|
||||||
|
}
|
||||||
|
|
||||||
WriteReplyToClient(client, sizeof(xGenericReply), &reply);
|
WriteReplyToClient(client, sizeof(xGenericReply), &reply);
|
||||||
if (len) {
|
if (len) {
|
||||||
|
|
|
@ -0,0 +1,105 @@
|
||||||
|
/* SPDX-License-Identifier: MIT OR X11
|
||||||
|
*
|
||||||
|
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <dix-config.h>
|
||||||
|
|
||||||
|
#include "dix/dix_priv.h"
|
||||||
|
#include "include/dix.h"
|
||||||
|
#include "include/os.h"
|
||||||
|
#include "include/scrnintstr.h"
|
||||||
|
#include "include/windowstr.h"
|
||||||
|
|
||||||
|
#define ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0]))
|
||||||
|
|
||||||
|
#define ARRAY_FOR_EACH(_ARRAY, _WALK) \
|
||||||
|
for (struct { int idx; typeof(_ARRAY[0])*ptr; } _WALK = { 0, _ARRAY }; _WALK.idx < ARRAY_LENGTH(_ARRAY); _WALK.idx++, _WALK.ptr++)
|
||||||
|
|
||||||
|
#define DECLARE_HOOK_LIST(NAME, FIELD) \
|
||||||
|
void dixScreenHook##NAME(ScreenPtr pScreen, typeof(((ScreenRec){0}).FIELD[0].func) func, void *arg) \
|
||||||
|
{ \
|
||||||
|
for (int i=0; i<ARRAY_LENGTH(pScreen->FIELD); i++) { \
|
||||||
|
if (!(pScreen->FIELD[i].func)) { \
|
||||||
|
pScreen->FIELD[i].func = func; \
|
||||||
|
pScreen->FIELD[i].arg = arg; \
|
||||||
|
return; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
FatalError("%s: out of slots", __FUNCTION__); \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
void dixScreenUnhook##NAME(ScreenPtr pScreen, typeof(((ScreenRec){0}).FIELD[0].func) func, void *arg) \
|
||||||
|
{ \
|
||||||
|
for (int i=0; i<ARRAY_LENGTH(pScreen->FIELD); i++) { \
|
||||||
|
if ((pScreen->FIELD[i].func == func) && (pScreen->FIELD[i].arg == arg)) { \
|
||||||
|
pScreen->FIELD[i].func = NULL; \
|
||||||
|
pScreen->FIELD[i].arg = NULL; \
|
||||||
|
return; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
|
DECLARE_HOOK_LIST(WindowDestroy, _notify_window_destroy)
|
||||||
|
DECLARE_HOOK_LIST(WindowPosition, _notify_window_position)
|
||||||
|
DECLARE_HOOK_LIST(Close, _notify_screen_close)
|
||||||
|
DECLARE_HOOK_LIST(PixmapDestroy, _notify_pixmap_destroy)
|
||||||
|
|
||||||
|
int dixScreenRaiseWindowDestroy(WindowPtr pWin)
|
||||||
|
{
|
||||||
|
if (!pWin)
|
||||||
|
return Success;
|
||||||
|
|
||||||
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
|
|
||||||
|
ARRAY_FOR_EACH(pScreen->_notify_window_destroy, walk) {
|
||||||
|
if (walk.ptr->func)
|
||||||
|
walk.ptr->func(pScreen, pWin, walk.ptr->arg);
|
||||||
|
}
|
||||||
|
return (pScreen->DestroyWindow ? (*pScreen->DestroyWindow) (pWin) : Success);
|
||||||
|
}
|
||||||
|
|
||||||
|
void dixScreenRaiseWindowPosition(WindowPtr pWin, uint32_t x, uint32_t y)
|
||||||
|
{
|
||||||
|
if (!pWin)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
|
|
||||||
|
ARRAY_FOR_EACH(pScreen->_notify_window_position, walk) {
|
||||||
|
if (walk.ptr->func)
|
||||||
|
walk.ptr->func(pScreen, pWin, walk.ptr->arg, x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pScreen->PositionWindow)
|
||||||
|
(*pScreen->PositionWindow) (pWin, x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
void dixScreenRaiseClose(ScreenPtr pScreen)
|
||||||
|
{
|
||||||
|
if (!pScreen)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ARRAY_FOR_EACH(pScreen->_notify_screen_close, walk) {
|
||||||
|
if (walk.ptr->func)
|
||||||
|
walk.ptr->func(pScreen, walk.ptr->arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pScreen->CloseScreen)
|
||||||
|
(*pScreen->CloseScreen) (pScreen);
|
||||||
|
}
|
||||||
|
|
||||||
|
void dixScreenRaisePixmapDestroy(PixmapPtr pPixmap)
|
||||||
|
{
|
||||||
|
if (!pPixmap)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
||||||
|
|
||||||
|
ARRAY_FOR_EACH(pScreen->_notify_pixmap_destroy, walk) {
|
||||||
|
if (walk.ptr->func)
|
||||||
|
walk.ptr->func(pScreen, pPixmap, walk.ptr->arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* we must not call the original ScreenRec->DestroyPixmap() here */
|
||||||
|
}
|
|
@ -47,11 +47,11 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "dix/selection_priv.h"
|
||||||
|
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "dixstruct.h"
|
#include "dixstruct.h"
|
||||||
#include "dispatch.h"
|
#include "dispatch.h"
|
||||||
#include "selection.h"
|
|
||||||
#include "xace.h"
|
#include "xace.h"
|
||||||
|
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
|
|
|
@ -68,12 +68,12 @@ typedef struct _Selection {
|
||||||
* Selection API
|
* Selection API
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern _X_EXPORT int dixLookupSelection(Selection ** result, Atom name,
|
int dixLookupSelection(Selection ** result, Atom name,
|
||||||
ClientPtr client, Mask access_mode);
|
ClientPtr client, Mask access_mode);
|
||||||
|
|
||||||
extern _X_EXPORT Selection *CurrentSelections;
|
extern Selection *CurrentSelections;
|
||||||
|
|
||||||
extern _X_EXPORT CallbackListPtr SelectionCallback;
|
extern CallbackListPtr SelectionCallback;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SelectionSetOwner,
|
SelectionSetOwner,
|
||||||
|
@ -91,10 +91,8 @@ typedef struct {
|
||||||
* Selection server internals
|
* Selection server internals
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern _X_EXPORT void InitSelections(void);
|
void InitSelections(void);
|
||||||
|
void DeleteWindowFromAnySelections(WindowPtr pWin);
|
||||||
extern _X_EXPORT void DeleteWindowFromAnySelections(WindowPtr pWin);
|
void DeleteClientFromAnySelections(ClientPtr client);
|
||||||
|
|
||||||
extern _X_EXPORT void DeleteClientFromAnySelections(ClientPtr client);
|
|
||||||
|
|
||||||
#endif /* SELECTION_H */
|
#endif /* SELECTION_H */
|
|
@ -32,6 +32,7 @@
|
||||||
#include "dix/exevents_priv.h"
|
#include "dix/exevents_priv.h"
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
#include "mi/mi_priv.h"
|
#include "mi/mi_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
|
|
29
dix/window.c
29
dix/window.c
|
@ -104,6 +104,7 @@ Equipment Corporation.
|
||||||
#include "dix/exevents_priv.h"
|
#include "dix/exevents_priv.h"
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
#include "dix/property_priv.h"
|
#include "dix/property_priv.h"
|
||||||
|
#include "dix/selection_priv.h"
|
||||||
#include "mi/mi_priv.h" /* miPaintWindow */
|
#include "mi/mi_priv.h" /* miPaintWindow */
|
||||||
#include "os/auth.h"
|
#include "os/auth.h"
|
||||||
#include "os/client_priv.h"
|
#include "os/client_priv.h"
|
||||||
|
@ -133,7 +134,6 @@ Equipment Corporation.
|
||||||
#ifdef COMPOSITE
|
#ifdef COMPOSITE
|
||||||
#include "compint.h"
|
#include "compint.h"
|
||||||
#endif
|
#endif
|
||||||
#include "selection.h"
|
|
||||||
#include "inpututils.h"
|
#include "inpututils.h"
|
||||||
#include "privates.h"
|
#include "privates.h"
|
||||||
#include "xace.h"
|
#include "xace.h"
|
||||||
|
@ -670,7 +670,8 @@ InitRootWindow(WindowPtr pWin)
|
||||||
|
|
||||||
if (!(*pScreen->CreateWindow) (pWin))
|
if (!(*pScreen->CreateWindow) (pWin))
|
||||||
return; /* XXX */
|
return; /* XXX */
|
||||||
(*pScreen->PositionWindow) (pWin, 0, 0);
|
|
||||||
|
dixScreenRaiseWindowPosition(pWin, 0, 0);
|
||||||
|
|
||||||
pWin->cursorIsNone = FALSE;
|
pWin->cursorIsNone = FALSE;
|
||||||
pWin->optional->cursor = RefCursor(rootCursor);
|
pWin->optional->cursor = RefCursor(rootCursor);
|
||||||
|
@ -820,12 +821,6 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((vmask & (CWBorderPixmap | CWBorderPixel)) == 0) &&
|
|
||||||
(class != InputOnly) && (depth != pParent->drawable.depth)) {
|
|
||||||
*error = BadMatch;
|
|
||||||
return NullWindow;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (((vmask & CWColormap) == 0) &&
|
if (((vmask & CWColormap) == 0) &&
|
||||||
(class != InputOnly) &&
|
(class != InputOnly) &&
|
||||||
((visual != ancwopt->visual) || (ancwopt->colormap == None))) {
|
((visual != ancwopt->visual) || (ancwopt->colormap == None))) {
|
||||||
|
@ -928,7 +923,7 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
|
||||||
return NullWindow;
|
return NullWindow;
|
||||||
}
|
}
|
||||||
/* We SHOULD check for an error value here XXX */
|
/* We SHOULD check for an error value here XXX */
|
||||||
(*pScreen->PositionWindow) (pWin, pWin->drawable.x, pWin->drawable.y);
|
dixScreenRaiseWindowPosition(pWin, pWin->drawable.x, pWin->drawable.y);
|
||||||
|
|
||||||
if (!(vmask & CWEventMask))
|
if (!(vmask & CWEventMask))
|
||||||
RecalculateDeliverableEvents(pWin);
|
RecalculateDeliverableEvents(pWin);
|
||||||
|
@ -998,8 +993,6 @@ DisposeWindowOptional(WindowPtr pWin)
|
||||||
static void
|
static void
|
||||||
FreeWindowResources(WindowPtr pWin)
|
FreeWindowResources(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
DeleteWindowFromAnySaveSet(pWin);
|
DeleteWindowFromAnySaveSet(pWin);
|
||||||
DeleteWindowFromAnySelections(pWin);
|
DeleteWindowFromAnySelections(pWin);
|
||||||
DeleteWindowFromAnyEvents(pWin, TRUE);
|
DeleteWindowFromAnyEvents(pWin, TRUE);
|
||||||
|
@ -1019,8 +1012,9 @@ FreeWindowResources(WindowPtr pWin)
|
||||||
dixDestroyPixmap(pWin->background.pixmap, 0);
|
dixDestroyPixmap(pWin->background.pixmap, 0);
|
||||||
|
|
||||||
DeleteAllWindowProperties(pWin);
|
DeleteAllWindowProperties(pWin);
|
||||||
|
|
||||||
/* We SHOULD check for an error value here XXX */
|
/* We SHOULD check for an error value here XXX */
|
||||||
(*pScreen->DestroyWindow) (pWin);
|
dixScreenRaiseWindowDestroy(pWin);
|
||||||
DisposeWindowOptional(pWin);
|
DisposeWindowOptional(pWin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1849,12 +1843,9 @@ GravityTranslate(int x, int y, int oldx, int oldy,
|
||||||
void
|
void
|
||||||
ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh)
|
ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen;
|
|
||||||
WindowPtr pSib, pChild;
|
WindowPtr pSib, pChild;
|
||||||
Bool resized = (dw || dh);
|
Bool resized = (dw || dh);
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
for (pSib = pWin->firstChild; pSib; pSib = pSib->nextSib) {
|
for (pSib = pWin->firstChild; pSib; pSib = pSib->nextSib) {
|
||||||
if (resized && (pSib->winGravity > NorthWestGravity)) {
|
if (resized && (pSib->winGravity > NorthWestGravity)) {
|
||||||
int cwsx, cwsy;
|
int cwsx, cwsy;
|
||||||
|
@ -1879,7 +1870,8 @@ ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh)
|
||||||
pSib->drawable.y = pWin->drawable.y + pSib->origin.y;
|
pSib->drawable.y = pWin->drawable.y + pSib->origin.y;
|
||||||
SetWinSize(pSib);
|
SetWinSize(pSib);
|
||||||
SetBorderSize(pSib);
|
SetBorderSize(pSib);
|
||||||
(*pScreen->PositionWindow) (pSib, pSib->drawable.x, pSib->drawable.y);
|
|
||||||
|
dixScreenRaiseWindowPosition(pSib, pSib->drawable.x, pSib->drawable.y);
|
||||||
|
|
||||||
if ((pChild = pSib->firstChild)) {
|
if ((pChild = pSib->firstChild)) {
|
||||||
while (1) {
|
while (1) {
|
||||||
|
@ -1889,7 +1881,7 @@ ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh)
|
||||||
pChild->origin.y;
|
pChild->origin.y;
|
||||||
SetWinSize(pChild);
|
SetWinSize(pChild);
|
||||||
SetBorderSize(pChild);
|
SetBorderSize(pChild);
|
||||||
(*pScreen->PositionWindow) (pChild,
|
dixScreenRaiseWindowPosition(pChild,
|
||||||
pChild->drawable.x,
|
pChild->drawable.x,
|
||||||
pChild->drawable.y);
|
pChild->drawable.y);
|
||||||
if (pChild->firstChild) {
|
if (pChild->firstChild) {
|
||||||
|
@ -2585,7 +2577,8 @@ ReparentWindow(WindowPtr pWin, WindowPtr pParent,
|
||||||
|
|
||||||
if (pScreen->ReparentWindow)
|
if (pScreen->ReparentWindow)
|
||||||
(*pScreen->ReparentWindow) (pWin, pPriorParent);
|
(*pScreen->ReparentWindow) (pWin, pPriorParent);
|
||||||
(*pScreen->PositionWindow) (pWin, pWin->drawable.x, pWin->drawable.y);
|
|
||||||
|
dixScreenRaiseWindowPosition(pWin, pWin->drawable.x, pWin->drawable.y);
|
||||||
ResizeChildrenWinSize(pWin, 0, 0, 0, 0);
|
ResizeChildrenWinSize(pWin, 0, 0, 0, 0);
|
||||||
|
|
||||||
CheckWindowOptionalNeed(pWin);
|
CheckWindowOptionalNeed(pWin);
|
||||||
|
|
|
@ -3285,9 +3285,8 @@ need to be done when these happen, such as allocating or deallocating
|
||||||
structures that are only needed for visible windows. RealizeWindow
|
structures that are only needed for visible windows. RealizeWindow
|
||||||
does NOT draw the window border, background or contents;
|
does NOT draw the window border, background or contents;
|
||||||
UnrealizeWindow does NOT erase the window or generate exposure events
|
UnrealizeWindow does NOT erase the window or generate exposure events
|
||||||
for underlying windows; this is taken care of by DIX. DIX does,
|
for underlying windows; this is taken care of by DIX.
|
||||||
however, call PaintWindowBackground() and PaintWindowBorder() to
|
</para>
|
||||||
perform some of these.</para>
|
|
||||||
<para>
|
<para>
|
||||||
<blockquote><programlisting>
|
<blockquote><programlisting>
|
||||||
|
|
||||||
|
@ -3391,7 +3390,7 @@ and all of its child windows.</para>
|
||||||
If generateExposures is false, the client is trying to simply erase part
|
If generateExposures is false, the client is trying to simply erase part
|
||||||
of the window to the background fill style.
|
of the window to the background fill style.
|
||||||
ClearToBackground should write the background color or tile to the
|
ClearToBackground should write the background color or tile to the
|
||||||
rectangle in question (probably using PaintWindowBackground).
|
rectangle in question.
|
||||||
If w or h is zero, it clears all the way to the right or lower edge of the window.</para>
|
If w or h is zero, it clears all the way to the right or lower edge of the window.</para>
|
||||||
<para>
|
<para>
|
||||||
The sample server implementation is in Xserver/mi/miwindow.c.</para>
|
The sample server implementation is in Xserver/mi/miwindow.c.</para>
|
||||||
|
@ -4052,7 +4051,7 @@ returned instead). Furthermore, the invalid bits of the source are
|
||||||
not copied to the destination and (when the destination is a window)
|
not copied to the destination and (when the destination is a window)
|
||||||
are filled with the background tile. The sample routine
|
are filled with the background tile. The sample routine
|
||||||
miHandleExposures generates the appropriate return value and fills the
|
miHandleExposures generates the appropriate return value and fills the
|
||||||
invalid area using pScreen->PaintWindowBackground.</para>
|
invalid area.</para>
|
||||||
<para>
|
<para>
|
||||||
For instance, imagine a window that is partially obscured by other
|
For instance, imagine a window that is partially obscured by other
|
||||||
windows in front of it. As text is scrolled on your window, the pixels
|
windows in front of it. As text is scrolled on your window, the pixels
|
||||||
|
@ -4994,8 +4993,6 @@ mi and fb implementations.</para>
|
||||||
<row><entry><function>ModifyPixmapHeader</function></entry><entry><literal>mi</literal></entry><entry><para>Screen</para></entry></row>
|
<row><entry><function>ModifyPixmapHeader</function></entry><entry><literal>mi</literal></entry><entry><para>Screen</para></entry></row>
|
||||||
<row><entry><function>NextAvailableClient</function></entry><entry><literal>dix</literal></entry><entry><para></para></entry></row>
|
<row><entry><function>NextAvailableClient</function></entry><entry><literal>dix</literal></entry><entry><para></para></entry></row>
|
||||||
<row><entry><function>OsInit</function></entry><entry><literal>os</literal></entry><entry><para></para></entry></row>
|
<row><entry><function>OsInit</function></entry><entry><literal>os</literal></entry><entry><para></para></entry></row>
|
||||||
<row><entry><function>PaintWindowBackground</function></entry><entry><literal>mi</literal></entry><entry><para>Window</para></entry></row>
|
|
||||||
<row><entry><function>PaintWindowBorder</function></entry><entry><literal>mi</literal></entry><entry><para>Window</para></entry></row>
|
|
||||||
<row><entry><function>PointerNonInterestBox</function></entry><entry><literal>hd</literal></entry><entry><para>Screen</para></entry></row>
|
<row><entry><function>PointerNonInterestBox</function></entry><entry><literal>hd</literal></entry><entry><para>Screen</para></entry></row>
|
||||||
<row><entry><function>PointInRegion</function></entry><entry><literal>mi</literal></entry><entry><para>Screen</para></entry></row>
|
<row><entry><function>PointInRegion</function></entry><entry><literal>mi</literal></entry><entry><para>Screen</para></entry></row>
|
||||||
<row><entry><function>PolyArc</function></entry><entry><literal>mi</literal></entry><entry><para>GC op</para></entry></row>
|
<row><entry><function>PolyArc</function></entry><entry><literal>mi</literal></entry><entry><para>GC op</para></entry></row>
|
||||||
|
|
14
dri3/dri3.c
14
dri3/dri3.c
|
@ -19,9 +19,11 @@
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
#include <dix-config.h>
|
||||||
|
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
|
||||||
#include "dri3_priv.h"
|
#include "dri3_priv.h"
|
||||||
#include "extinit_priv.h"
|
|
||||||
#include <drm_fourcc.h>
|
#include <drm_fourcc.h>
|
||||||
|
|
||||||
static int dri3_request;
|
static int dri3_request;
|
||||||
|
@ -29,15 +31,11 @@ DevPrivateKeyRec dri3_screen_private_key;
|
||||||
|
|
||||||
static int dri3_screen_generation;
|
static int dri3_screen_generation;
|
||||||
|
|
||||||
static Bool
|
static void dri3_screen_close(ScreenPtr screen, void *arg)
|
||||||
dri3_close_screen(ScreenPtr screen)
|
|
||||||
{
|
{
|
||||||
dri3_screen_priv_ptr screen_priv = dri3_screen_priv(screen);
|
dri3_screen_priv_ptr screen_priv = dri3_screen_priv(screen);
|
||||||
|
dixScreenUnhookClose(screen, dri3_screen_close, NULL);
|
||||||
unwrap(screen_priv, screen, CloseScreen);
|
|
||||||
|
|
||||||
free(screen_priv);
|
free(screen_priv);
|
||||||
return (*screen->CloseScreen) (screen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
|
@ -53,7 +51,7 @@ dri3_screen_init(ScreenPtr screen, const dri3_screen_info_rec *info)
|
||||||
if (!screen_priv)
|
if (!screen_priv)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
wrap(screen_priv, screen, CloseScreen, dri3_close_screen);
|
dixScreenHookClose(screen, dri3_screen_close, NULL);
|
||||||
|
|
||||||
screen_priv->info = info;
|
screen_priv->info = info;
|
||||||
|
|
||||||
|
|
|
@ -42,9 +42,7 @@ typedef struct dri3_dmabuf_format {
|
||||||
} dri3_dmabuf_format_rec, *dri3_dmabuf_format_ptr;
|
} dri3_dmabuf_format_rec, *dri3_dmabuf_format_ptr;
|
||||||
|
|
||||||
typedef struct dri3_screen_priv {
|
typedef struct dri3_screen_priv {
|
||||||
CloseScreenProcPtr CloseScreen;
|
|
||||||
ConfigNotifyProcPtr ConfigNotify;
|
ConfigNotifyProcPtr ConfigNotify;
|
||||||
DestroyWindowProcPtr DestroyWindow;
|
|
||||||
|
|
||||||
Bool formats_cached;
|
Bool formats_cached;
|
||||||
CARD32 num_formats;
|
CARD32 num_formats;
|
||||||
|
|
16
exa/exa.c
16
exa/exa.c
|
@ -740,6 +740,11 @@ exaCloseScreen(ScreenPtr pScreen)
|
||||||
ExaScreenPriv(pScreen);
|
ExaScreenPriv(pScreen);
|
||||||
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
|
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
|
||||||
|
|
||||||
|
/* doesn't matter which one actually was registered */
|
||||||
|
dixScreenUnhookPixmapDestroy(pScreen, exaPixmapDestroy_classic, 0);
|
||||||
|
dixScreenUnhookPixmapDestroy(pScreen, exaPixmapDestroy_driver, 0);
|
||||||
|
dixScreenUnhookPixmapDestroy(pScreen, exaPixmapDestroy_mixed, 0);
|
||||||
|
|
||||||
if (ps->Glyphs == exaGlyphs)
|
if (ps->Glyphs == exaGlyphs)
|
||||||
exaGlyphsFini(pScreen);
|
exaGlyphsFini(pScreen);
|
||||||
|
|
||||||
|
@ -753,8 +758,6 @@ exaCloseScreen(ScreenPtr pScreen)
|
||||||
unwrap(pExaScr, pScreen, GetSpans);
|
unwrap(pExaScr, pScreen, GetSpans);
|
||||||
if (pExaScr->SavedCreatePixmap)
|
if (pExaScr->SavedCreatePixmap)
|
||||||
unwrap(pExaScr, pScreen, CreatePixmap);
|
unwrap(pExaScr, pScreen, CreatePixmap);
|
||||||
if (pExaScr->SavedDestroyPixmap)
|
|
||||||
unwrap(pExaScr, pScreen, DestroyPixmap);
|
|
||||||
if (pExaScr->SavedModifyPixmapHeader)
|
if (pExaScr->SavedModifyPixmapHeader)
|
||||||
unwrap(pExaScr, pScreen, ModifyPixmapHeader);
|
unwrap(pExaScr, pScreen, ModifyPixmapHeader);
|
||||||
unwrap(pExaScr, pScreen, CopyWindow);
|
unwrap(pExaScr, pScreen, CopyWindow);
|
||||||
|
@ -955,8 +958,9 @@ exaDriverInit(ScreenPtr pScreen, ExaDriverPtr pScreenInfo)
|
||||||
}
|
}
|
||||||
if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS) {
|
if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS) {
|
||||||
if (pExaScr->info->flags & EXA_MIXED_PIXMAPS) {
|
if (pExaScr->info->flags & EXA_MIXED_PIXMAPS) {
|
||||||
|
dixScreenHookPixmapDestroy(pScreen, exaPixmapDestroy_mixed, 0);
|
||||||
|
|
||||||
wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_mixed);
|
wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_mixed);
|
||||||
wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_mixed);
|
|
||||||
wrap(pExaScr, pScreen, ModifyPixmapHeader,
|
wrap(pExaScr, pScreen, ModifyPixmapHeader,
|
||||||
exaModifyPixmapHeader_mixed);
|
exaModifyPixmapHeader_mixed);
|
||||||
wrap(pExaScr, pScreen, SharePixmapBacking, exaSharePixmapBacking_mixed);
|
wrap(pExaScr, pScreen, SharePixmapBacking, exaSharePixmapBacking_mixed);
|
||||||
|
@ -969,8 +973,9 @@ exaDriverInit(ScreenPtr pScreen, ExaDriverPtr pScreenInfo)
|
||||||
pExaScr->prepare_access_reg = exaPrepareAccessReg_mixed;
|
pExaScr->prepare_access_reg = exaPrepareAccessReg_mixed;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
dixScreenHookPixmapDestroy(pScreen, exaPixmapDestroy_driver, 0);
|
||||||
|
|
||||||
wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_driver);
|
wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_driver);
|
||||||
wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_driver);
|
|
||||||
wrap(pExaScr, pScreen, ModifyPixmapHeader,
|
wrap(pExaScr, pScreen, ModifyPixmapHeader,
|
||||||
exaModifyPixmapHeader_driver);
|
exaModifyPixmapHeader_driver);
|
||||||
pExaScr->do_migration = NULL;
|
pExaScr->do_migration = NULL;
|
||||||
|
@ -981,8 +986,9 @@ exaDriverInit(ScreenPtr pScreen, ExaDriverPtr pScreenInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
dixScreenHookPixmapDestroy(pScreen, exaPixmapDestroy_classic, 0);
|
||||||
|
|
||||||
wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_classic);
|
wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_classic);
|
||||||
wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_classic);
|
|
||||||
wrap(pExaScr, pScreen, ModifyPixmapHeader,
|
wrap(pExaScr, pScreen, ModifyPixmapHeader,
|
||||||
exaModifyPixmapHeader_classic);
|
exaModifyPixmapHeader_classic);
|
||||||
pExaScr->do_migration = exaDoMigration_classic;
|
pExaScr->do_migration = exaDoMigration_classic;
|
||||||
|
|
|
@ -206,18 +206,11 @@ exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
void exaPixmapDestroy_classic(ScreenPtr pScreen, PixmapPtr pPixmap, void *arg)
|
||||||
exaDestroyPixmap_classic(PixmapPtr pPixmap)
|
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
|
||||||
|
|
||||||
ExaScreenPriv(pScreen);
|
|
||||||
Bool ret = TRUE;
|
|
||||||
|
|
||||||
if (pPixmap->refcnt == 1) {
|
|
||||||
ExaPixmapPriv(pPixmap);
|
ExaPixmapPriv(pPixmap);
|
||||||
if (!pExaPixmap) // we're called on an error path
|
if (!pExaPixmap) // we're called on an error path
|
||||||
goto out;
|
return;
|
||||||
|
|
||||||
exaDestroyPixmap(pPixmap);
|
exaDestroyPixmap(pPixmap);
|
||||||
|
|
||||||
|
@ -235,15 +228,6 @@ exaDestroyPixmap_classic(PixmapPtr pPixmap)
|
||||||
RegionUninit(&pExaPixmap->validFB);
|
RegionUninit(&pExaPixmap->validFB);
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
|
||||||
// restore original (screen driver's) DestroyPixmap() handler and call it
|
|
||||||
swap(pExaScr, pScreen, DestroyPixmap);
|
|
||||||
dixDestroyPixmap(pPixmap, 0);
|
|
||||||
swap(pExaScr, pScreen, DestroyPixmap);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap)
|
exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap)
|
||||||
{
|
{
|
||||||
|
|
|
@ -185,18 +185,13 @@ exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
void exaPixmapDestroy_driver(ScreenPtr pScreen, PixmapPtr pPixmap, void *arg)
|
||||||
exaDestroyPixmap_driver(PixmapPtr pPixmap)
|
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
|
||||||
|
|
||||||
ExaScreenPriv(pScreen);
|
ExaScreenPriv(pScreen);
|
||||||
Bool ret = TRUE;
|
|
||||||
|
|
||||||
if (pPixmap->refcnt == 1) {
|
|
||||||
ExaPixmapPriv(pPixmap);
|
ExaPixmapPriv(pPixmap);
|
||||||
if (!pExaPixmap) // we're called on an error path
|
if (!pExaPixmap) // we're called on an error path
|
||||||
goto out;
|
return;
|
||||||
|
|
||||||
exaDestroyPixmap(pPixmap);
|
exaDestroyPixmap(pPixmap);
|
||||||
|
|
||||||
|
@ -205,15 +200,6 @@ exaDestroyPixmap_driver(PixmapPtr pPixmap)
|
||||||
pExaPixmap->driverPriv = NULL;
|
pExaPixmap->driverPriv = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
|
||||||
// restore original (screen driver's) DestroyPixmap() handler and call it
|
|
||||||
swap(pExaScr, pScreen, DestroyPixmap);
|
|
||||||
dixDestroyPixmap(pPixmap, 0);
|
|
||||||
swap(pExaScr, pScreen, DestroyPixmap);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap)
|
exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap)
|
||||||
{
|
{
|
||||||
|
|
|
@ -239,18 +239,13 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
void exaPixmapDestroy_mixed(ScreenPtr pScreen, PixmapPtr pPixmap, void *arg)
|
||||||
exaDestroyPixmap_mixed(PixmapPtr pPixmap)
|
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
|
||||||
|
|
||||||
ExaScreenPriv(pScreen);
|
ExaScreenPriv(pScreen);
|
||||||
Bool ret = TRUE;
|
|
||||||
|
|
||||||
if (pPixmap->refcnt == 1) {
|
|
||||||
ExaPixmapPriv(pPixmap);
|
ExaPixmapPriv(pPixmap);
|
||||||
if (!pExaPixmap)
|
if (!pExaPixmap) // we're called on an error path
|
||||||
goto out; // we're called on an error path
|
return;
|
||||||
|
|
||||||
exaDestroyPixmap(pPixmap);
|
exaDestroyPixmap(pPixmap);
|
||||||
|
|
||||||
|
@ -268,15 +263,6 @@ exaDestroyPixmap_mixed(PixmapPtr pPixmap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
|
||||||
// restore original (screen driver's) DestroyPixmap() handler and call it
|
|
||||||
swap(pExaScr, pScreen, DestroyPixmap);
|
|
||||||
dixDestroyPixmap(pPixmap, 0);
|
|
||||||
swap(pExaScr, pScreen, DestroyPixmap);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap)
|
exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap)
|
||||||
{
|
{
|
||||||
|
|
|
@ -156,7 +156,6 @@ typedef struct {
|
||||||
GetImageProcPtr SavedGetImage;
|
GetImageProcPtr SavedGetImage;
|
||||||
GetSpansProcPtr SavedGetSpans;
|
GetSpansProcPtr SavedGetSpans;
|
||||||
CreatePixmapProcPtr SavedCreatePixmap;
|
CreatePixmapProcPtr SavedCreatePixmap;
|
||||||
DestroyPixmapProcPtr SavedDestroyPixmap;
|
|
||||||
CopyWindowProcPtr SavedCopyWindow;
|
CopyWindowProcPtr SavedCopyWindow;
|
||||||
ChangeWindowAttributesProcPtr SavedChangeWindowAttributes;
|
ChangeWindowAttributesProcPtr SavedChangeWindowAttributes;
|
||||||
BitmapToRegionProcPtr SavedBitmapToRegion;
|
BitmapToRegionProcPtr SavedBitmapToRegion;
|
||||||
|
@ -590,8 +589,7 @@ exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height,
|
||||||
int depth, int bitsPerPixel, int devKind,
|
int depth, int bitsPerPixel, int devKind,
|
||||||
void *pPixData);
|
void *pPixData);
|
||||||
|
|
||||||
Bool
|
void exaPixmapDestroy_classic(ScreenPtr pScreen, PixmapPtr pPixmap, void *arg);
|
||||||
exaDestroyPixmap_classic(PixmapPtr pPixmap);
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap);
|
exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap);
|
||||||
|
@ -608,8 +606,7 @@ exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height,
|
||||||
int depth, int bitsPerPixel, int devKind,
|
int depth, int bitsPerPixel, int devKind,
|
||||||
void *pPixData);
|
void *pPixData);
|
||||||
|
|
||||||
Bool
|
void exaPixmapDestroy_driver(ScreenPtr pScreen, PixmapPtr pPixmap, void *arg);
|
||||||
exaDestroyPixmap_driver(PixmapPtr pPixmap);
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap);
|
exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap);
|
||||||
|
@ -625,8 +622,7 @@ Bool
|
||||||
exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
|
exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
|
||||||
int bitsPerPixel, int devKind, void *pPixData);
|
int bitsPerPixel, int devKind, void *pPixData);
|
||||||
|
|
||||||
Bool
|
void exaPixmapDestroy_mixed(ScreenPtr pScreen, PixmapPtr pPixmap, void *arg);
|
||||||
exaDestroyPixmap_mixed(PixmapPtr pPixmap);
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap);
|
exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap);
|
||||||
|
|
6
fb/fb.h
6
fb/fb.h
|
@ -842,6 +842,12 @@ fbPolyFillRect(DrawablePtr pDrawable,
|
||||||
|
|
||||||
#define fbFillPolygon miFillPolygon
|
#define fbFillPolygon miFillPolygon
|
||||||
|
|
||||||
|
#define fbSetShape miSetShape
|
||||||
|
|
||||||
|
#define fbMoveWindow miMoveWindow
|
||||||
|
|
||||||
|
#define fbModifyPixmapHeader miModifyPixmapHeader
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* fbfillsp.c
|
* fbfillsp.c
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -604,6 +604,11 @@ glamor_setup_formats(ScreenPtr screen)
|
||||||
glamor_priv->cbcr_format.texture_only = FALSE;
|
glamor_priv->cbcr_format.texture_only = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void glamor_pixmap_destroy(ScreenPtr pScreen, PixmapPtr pPixmap, void *arg)
|
||||||
|
{
|
||||||
|
glamor_pixmap_destroy_fbo(pPixmap);
|
||||||
|
}
|
||||||
|
|
||||||
/** Set up glamor for an already-configured GL context. */
|
/** Set up glamor for an already-configured GL context. */
|
||||||
Bool
|
Bool
|
||||||
glamor_init(ScreenPtr screen, unsigned int flags)
|
glamor_init(ScreenPtr screen, unsigned int flags)
|
||||||
|
@ -652,8 +657,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
|
||||||
glamor_priv->saved_procs.close_screen = screen->CloseScreen;
|
glamor_priv->saved_procs.close_screen = screen->CloseScreen;
|
||||||
screen->CloseScreen = glamor_close_screen;
|
screen->CloseScreen = glamor_close_screen;
|
||||||
|
|
||||||
glamor_priv->saved_procs.destroy_pixmap = screen->DestroyPixmap;
|
dixScreenHookPixmapDestroy(screen, glamor_pixmap_destroy, NULL);
|
||||||
screen->DestroyPixmap = glamor_destroy_pixmap;
|
|
||||||
|
|
||||||
/* If we are using egl screen, call egl screen init to
|
/* If we are using egl screen, call egl screen init to
|
||||||
* register correct close screen function. */
|
* register correct close screen function. */
|
||||||
|
@ -879,7 +883,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
|
||||||
fail:
|
fail:
|
||||||
/* Restore default CloseScreen and DestroyPixmap handlers */
|
/* Restore default CloseScreen and DestroyPixmap handlers */
|
||||||
screen->CloseScreen = glamor_priv->saved_procs.close_screen;
|
screen->CloseScreen = glamor_priv->saved_procs.close_screen;
|
||||||
screen->DestroyPixmap = glamor_priv->saved_procs.destroy_pixmap;
|
dixScreenUnhookPixmapDestroy(screen, glamor_pixmap_destroy, NULL);
|
||||||
|
|
||||||
free_glamor_private:
|
free_glamor_private:
|
||||||
free(glamor_priv);
|
free(glamor_priv);
|
||||||
|
@ -913,9 +917,10 @@ glamor_close_screen(ScreenPtr screen)
|
||||||
glamor_set_glvnd_vendor(screen, NULL);
|
glamor_set_glvnd_vendor(screen, NULL);
|
||||||
screen->CloseScreen = glamor_priv->saved_procs.close_screen;
|
screen->CloseScreen = glamor_priv->saved_procs.close_screen;
|
||||||
|
|
||||||
|
dixScreenUnhookPixmapDestroy(screen, glamor_pixmap_destroy, NULL);
|
||||||
|
|
||||||
screen->CreateGC = glamor_priv->saved_procs.create_gc;
|
screen->CreateGC = glamor_priv->saved_procs.create_gc;
|
||||||
screen->CreatePixmap = glamor_priv->saved_procs.create_pixmap;
|
screen->CreatePixmap = glamor_priv->saved_procs.create_pixmap;
|
||||||
screen->DestroyPixmap = glamor_priv->saved_procs.destroy_pixmap;
|
|
||||||
screen->GetSpans = glamor_priv->saved_procs.get_spans;
|
screen->GetSpans = glamor_priv->saved_procs.get_spans;
|
||||||
screen->ChangeWindowAttributes =
|
screen->ChangeWindowAttributes =
|
||||||
glamor_priv->saved_procs.change_window_attributes;
|
glamor_priv->saved_procs.change_window_attributes;
|
||||||
|
|
|
@ -62,7 +62,6 @@ struct glamor_egl_screen_private {
|
||||||
Bool force_vendor; /* if GLVND vendor is forced from options */
|
Bool force_vendor; /* if GLVND vendor is forced from options */
|
||||||
|
|
||||||
CloseScreenProcPtr saved_close_screen;
|
CloseScreenProcPtr saved_close_screen;
|
||||||
DestroyPixmapProcPtr saved_destroy_pixmap;
|
|
||||||
xf86FreeScreenProc *saved_free_screen;
|
xf86FreeScreenProc *saved_free_screen;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -756,17 +755,13 @@ glamor_egl_get_driver_name(ScreenPtr screen)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void glamor_egl_pixmap_destroy(ScreenPtr pScreen, PixmapPtr pixmap, void *arg)
|
||||||
static Bool
|
|
||||||
glamor_egl_destroy_pixmap(PixmapPtr pixmap)
|
|
||||||
{
|
{
|
||||||
ScreenPtr screen = pixmap->drawable.pScreen;
|
ScreenPtr screen = pixmap->drawable.pScreen;
|
||||||
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
|
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
|
||||||
struct glamor_egl_screen_private *glamor_egl =
|
struct glamor_egl_screen_private *glamor_egl =
|
||||||
glamor_egl_get_screen_private(scrn);
|
glamor_egl_get_screen_private(scrn);
|
||||||
Bool ret = TRUE;
|
|
||||||
|
|
||||||
if (pixmap->refcnt == 1) {
|
|
||||||
struct glamor_pixmap_private *pixmap_priv =
|
struct glamor_pixmap_private *pixmap_priv =
|
||||||
glamor_get_pixmap_private(pixmap);
|
glamor_get_pixmap_private(pixmap);
|
||||||
|
|
||||||
|
@ -774,15 +769,6 @@ glamor_egl_destroy_pixmap(PixmapPtr pixmap)
|
||||||
eglDestroyImageKHR(glamor_egl->display, pixmap_priv->image);
|
eglDestroyImageKHR(glamor_egl->display, pixmap_priv->image);
|
||||||
}
|
}
|
||||||
|
|
||||||
screen->DestroyPixmap = glamor_egl->saved_destroy_pixmap;
|
|
||||||
if (screen->DestroyPixmap)
|
|
||||||
ret = screen->DestroyPixmap(pixmap);
|
|
||||||
glamor_egl->saved_destroy_pixmap = screen->DestroyPixmap;
|
|
||||||
screen->DestroyPixmap = glamor_egl_destroy_pixmap;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
glamor_egl_exchange_buffers(PixmapPtr front, PixmapPtr back)
|
glamor_egl_exchange_buffers(PixmapPtr front, PixmapPtr back)
|
||||||
{
|
{
|
||||||
|
@ -822,6 +808,7 @@ glamor_egl_close_screen(ScreenPtr screen)
|
||||||
eglDestroyImageKHR(glamor_egl->display, pixmap_priv->image);
|
eglDestroyImageKHR(glamor_egl->display, pixmap_priv->image);
|
||||||
pixmap_priv->image = NULL;
|
pixmap_priv->image = NULL;
|
||||||
|
|
||||||
|
dixScreenUnhookPixmapDestroy(screen, glamor_egl_pixmap_destroy, NULL);
|
||||||
screen->CloseScreen = glamor_egl->saved_close_screen;
|
screen->CloseScreen = glamor_egl->saved_close_screen;
|
||||||
|
|
||||||
return screen->CloseScreen(screen);
|
return screen->CloseScreen(screen);
|
||||||
|
@ -907,8 +894,7 @@ glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx)
|
||||||
glamor_egl->saved_close_screen = screen->CloseScreen;
|
glamor_egl->saved_close_screen = screen->CloseScreen;
|
||||||
screen->CloseScreen = glamor_egl_close_screen;
|
screen->CloseScreen = glamor_egl_close_screen;
|
||||||
|
|
||||||
glamor_egl->saved_destroy_pixmap = screen->DestroyPixmap;
|
dixScreenHookPixmapDestroy(screen, glamor_egl_pixmap_destroy, NULL);
|
||||||
screen->DestroyPixmap = glamor_egl_destroy_pixmap;
|
|
||||||
|
|
||||||
glamor_ctx->ctx = glamor_egl->context;
|
glamor_ctx->ctx = glamor_egl->context;
|
||||||
glamor_ctx->display = glamor_egl->display;
|
glamor_ctx->display = glamor_egl->display;
|
||||||
|
|
|
@ -35,16 +35,18 @@
|
||||||
#include "glamor.h"
|
#include "glamor.h"
|
||||||
|
|
||||||
static XF86ModuleVersionInfo VersRec = {
|
static XF86ModuleVersionInfo VersRec = {
|
||||||
GLAMOR_EGL_MODULE_NAME,
|
.modname = GLAMOR_EGL_MODULE_NAME,
|
||||||
MODULEVENDORSTRING,
|
.vendor = MODULEVENDORSTRING,
|
||||||
MODINFOSTRING1,
|
._modinfo1_ = MODINFOSTRING1,
|
||||||
MODINFOSTRING2,
|
._modinfo2_ = MODINFOSTRING2,
|
||||||
XORG_VERSION_CURRENT,
|
.xf86version = XORG_VERSION_CURRENT,
|
||||||
1, 0, 1, /* version */
|
.majorversion = 1,
|
||||||
ABI_CLASS_ANSIC, /* Only need the ansic layer */
|
.minorversion = 0,
|
||||||
ABI_ANSIC_VERSION,
|
.patchlevel = 1,
|
||||||
MOD_CLASS_NONE,
|
.abiclass = ABI_CLASS_ANSIC,
|
||||||
{0, 0, 0, 0} /* signature, to be patched into the file by a tool */
|
.abiversion = ABI_ANSIC_VERSION,
|
||||||
};
|
};
|
||||||
|
|
||||||
_X_EXPORT XF86ModuleData glamoreglModuleData = { &VersRec, NULL, NULL };
|
_X_EXPORT XF86ModuleData glamoreglModuleData = {
|
||||||
|
.vers = &VersRec
|
||||||
|
};
|
||||||
|
|
|
@ -209,7 +209,6 @@ struct glamor_saved_procs {
|
||||||
CloseScreenProcPtr close_screen;
|
CloseScreenProcPtr close_screen;
|
||||||
CreateGCProcPtr create_gc;
|
CreateGCProcPtr create_gc;
|
||||||
CreatePixmapProcPtr create_pixmap;
|
CreatePixmapProcPtr create_pixmap;
|
||||||
DestroyPixmapProcPtr destroy_pixmap;
|
|
||||||
GetSpansProcPtr get_spans;
|
GetSpansProcPtr get_spans;
|
||||||
GetImageProcPtr get_image;
|
GetImageProcPtr get_image;
|
||||||
CompositeProcPtr composite;
|
CompositeProcPtr composite;
|
||||||
|
|
|
@ -33,8 +33,10 @@
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glxtokens.h>
|
#include <GL/glxtokens.h>
|
||||||
#include <GL/internal/dri_interface.h>
|
#include <GL/internal/dri_interface.h>
|
||||||
|
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
|
||||||
#include <os.h>
|
#include <os.h>
|
||||||
#include "extinit.h"
|
|
||||||
#include "glxserver.h"
|
#include "glxserver.h"
|
||||||
#include "glxext.h"
|
#include "glxext.h"
|
||||||
#include "glxcontext.h"
|
#include "glxcontext.h"
|
||||||
|
|
|
@ -48,13 +48,6 @@
|
||||||
|
|
||||||
#include "extension_string.h"
|
#include "extension_string.h"
|
||||||
|
|
||||||
/* RTLD_LOCAL is not defined on Cygwin */
|
|
||||||
#ifdef __CYGWIN__
|
|
||||||
#ifndef RTLD_LOCAL
|
|
||||||
#define RTLD_LOCAL 0
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct __GLXDRIscreen __GLXDRIscreen;
|
typedef struct __GLXDRIscreen __GLXDRIscreen;
|
||||||
typedef struct __GLXDRIcontext __GLXDRIcontext;
|
typedef struct __GLXDRIcontext __GLXDRIcontext;
|
||||||
typedef struct __GLXDRIdrawable __GLXDRIdrawable;
|
typedef struct __GLXDRIdrawable __GLXDRIdrawable;
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
#include <propertyst.h>
|
#include <propertyst.h>
|
||||||
#include "privates.h"
|
#include "privates.h"
|
||||||
#include <os.h>
|
#include <os.h>
|
||||||
#include "extinit.h"
|
|
||||||
#include "glx_extinit.h"
|
#include "glx_extinit.h"
|
||||||
#include "unpack.h"
|
#include "unpack.h"
|
||||||
#include "glxutil.h"
|
#include "glxutil.h"
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
#include <os.h>
|
#include <os.h>
|
||||||
#include <colormapst.h>
|
#include <colormapst.h>
|
||||||
|
|
||||||
#include "extinit.h"
|
|
||||||
#include "privates.h"
|
#include "privates.h"
|
||||||
#include "glxserver.h"
|
#include "glxserver.h"
|
||||||
#include "glxutil.h"
|
#include "glxutil.h"
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "indirect_reqsize.h"
|
#include "indirect_reqsize.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
||||||
#if defined(__CYGWIN__) || defined(__MINGW32__)
|
#if defined(__MINGW32__)
|
||||||
#undef HAVE_ALIAS
|
#undef HAVE_ALIAS
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_ALIAS
|
#ifdef HAVE_ALIAS
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#define PURE
|
#define PURE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
#if defined(__i386__) && defined(__GNUC__) && !defined(__MINGW32__)
|
||||||
#define FASTCALL __attribute__((fastcall))
|
#define FASTCALL __attribute__((fastcall))
|
||||||
#else
|
#else
|
||||||
#define FASTCALL
|
#define FASTCALL
|
||||||
|
|
|
@ -39,14 +39,14 @@
|
||||||
#define PURE
|
#define PURE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
#if defined(__i386__) && defined(__GNUC__) && !defined(__MINGW32__)
|
||||||
#define FASTCALL __attribute__((fastcall))
|
#define FASTCALL __attribute__((fastcall))
|
||||||
#else
|
#else
|
||||||
#define FASTCALL
|
#define FASTCALL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(GLX_USE_APPLEGL)
|
#if defined(__MINGW32__) || defined(GLX_USE_APPLEGL)
|
||||||
#undef HAVE_ALIAS
|
#undef HAVE_ALIAS
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_ALIAS
|
#ifdef HAVE_ALIAS
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#define PURE
|
#define PURE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
#if defined(__i386__) && defined(__GNUC__) && !defined(__MINGW32__)
|
||||||
#define FASTCALL __attribute__((fastcall))
|
#define FASTCALL __attribute__((fastcall))
|
||||||
#else
|
#else
|
||||||
#define FASTCALL
|
#define FASTCALL
|
||||||
|
|
|
@ -35,12 +35,12 @@
|
||||||
#include <dixstruct.h>
|
#include <dixstruct.h>
|
||||||
#include <extnsionst.h>
|
#include <extnsionst.h>
|
||||||
#include <glx_extinit.h>
|
#include <glx_extinit.h>
|
||||||
#include "extinit_priv.h"
|
|
||||||
|
|
||||||
#include <GL/glxproto.h>
|
#include <GL/glxproto.h>
|
||||||
#include "vndservervendor.h"
|
#include "vndservervendor.h"
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "miext/extinit_priv.h"
|
||||||
|
|
||||||
Bool noGlxExtension = FALSE;
|
Bool noGlxExtension = FALSE;
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "os/cmdline.h"
|
#include "os/cmdline.h"
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "ephyr.h"
|
#include "ephyr.h"
|
||||||
|
@ -288,10 +289,8 @@ ddxProcessArgument(int argc, char **argv, int i)
|
||||||
}
|
}
|
||||||
else if (!strcmp(argv[i], "-verbosity")) {
|
else if (!strcmp(argv[i], "-verbosity")) {
|
||||||
if (i + 1 < argc && argv[i + 1][0] != '-') {
|
if (i + 1 < argc && argv[i + 1][0] != '-') {
|
||||||
int verbosity = atoi(argv[i + 1]);
|
xorgLogVerbosity = atoi(argv[i + 1]);
|
||||||
|
EPHYR_LOG("set verbosiry to %d\n", xorgLogVerbosity);
|
||||||
LogSetParameter(XLOG_VERBOSITY, verbosity);
|
|
||||||
EPHYR_LOG("set verbosiry to %d\n", verbosity);
|
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
#include "dix/screenint_priv.h"
|
#include "dix/screenint_priv.h"
|
||||||
#include "os/cmdline.h"
|
#include "os/cmdline.h"
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "kdrive.h"
|
#include "kdrive.h"
|
||||||
|
@ -53,7 +52,7 @@
|
||||||
|
|
||||||
/* This stub can be safely removed once we can
|
/* This stub can be safely removed once we can
|
||||||
* split input and GPU parts in hotplug.h et al. */
|
* split input and GPU parts in hotplug.h et al. */
|
||||||
#include <systemd-logind.h>
|
#include "../../xfree86/os-support/linux/systemd-logind.h"
|
||||||
|
|
||||||
typedef struct _kdDepths {
|
typedef struct _kdDepths {
|
||||||
CARD8 depth;
|
CARD8 depth;
|
||||||
|
|
|
@ -46,7 +46,6 @@
|
||||||
#include "xkbsrv.h"
|
#include "xkbsrv.h"
|
||||||
#include "XIstubs.h" /* even though we don't use stubs. cute, no? */
|
#include "XIstubs.h" /* even though we don't use stubs. cute, no? */
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
#include "extinit.h"
|
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "eventstr.h"
|
#include "eventstr.h"
|
||||||
#include "xserver-properties.h"
|
#include "xserver-properties.h"
|
||||||
|
|
|
@ -82,9 +82,10 @@ static int KdXVPutImage(DrawablePtr, XvPortPtr, GCPtr,
|
||||||
static int KdXVQueryImageAttributes(XvPortPtr, XvImagePtr,
|
static int KdXVQueryImageAttributes(XvPortPtr, XvImagePtr,
|
||||||
CARD16 *, CARD16 *, int *, int *);
|
CARD16 *, CARD16 *, int *, int *);
|
||||||
|
|
||||||
|
static void KdXVWindowDestroy(ScreenPtr pScreen, WindowPtr pWin, void *arg);
|
||||||
|
|
||||||
/* ScreenRec fields */
|
/* ScreenRec fields */
|
||||||
|
|
||||||
static Bool KdXVDestroyWindow(WindowPtr pWin);
|
|
||||||
static void KdXVWindowExposures(WindowPtr pWin, RegionPtr r1);
|
static void KdXVWindowExposures(WindowPtr pWin, RegionPtr r1);
|
||||||
static void KdXVClipNotify(WindowPtr pWin, int dx, int dy);
|
static void KdXVClipNotify(WindowPtr pWin, int dx, int dy);
|
||||||
static Bool KdXVCloseScreen(ScreenPtr);
|
static Bool KdXVCloseScreen(ScreenPtr);
|
||||||
|
@ -139,14 +140,14 @@ KdXVScreenInit(ScreenPtr pScreen, KdVideoAdaptorPtr adaptors, int num)
|
||||||
if (!ScreenPriv)
|
if (!ScreenPriv)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
ScreenPriv->DestroyWindow = pScreen->DestroyWindow;
|
dixScreenHookWindowDestroy(pScreen, KdXVWindowDestroy, NULL);
|
||||||
|
|
||||||
ScreenPriv->WindowExposures = pScreen->WindowExposures;
|
ScreenPriv->WindowExposures = pScreen->WindowExposures;
|
||||||
ScreenPriv->ClipNotify = pScreen->ClipNotify;
|
ScreenPriv->ClipNotify = pScreen->ClipNotify;
|
||||||
ScreenPriv->CloseScreen = pScreen->CloseScreen;
|
ScreenPriv->CloseScreen = pScreen->CloseScreen;
|
||||||
|
|
||||||
/* fprintf(stderr,"XV: Wrapping screen funcs\n"); */
|
/* fprintf(stderr,"XV: Wrapping screen funcs\n"); */
|
||||||
|
|
||||||
pScreen->DestroyWindow = KdXVDestroyWindow;
|
|
||||||
pScreen->WindowExposures = KdXVWindowExposures;
|
pScreen->WindowExposures = KdXVWindowExposures;
|
||||||
pScreen->ClipNotify = KdXVClipNotify;
|
pScreen->ClipNotify = KdXVClipNotify;
|
||||||
pScreen->CloseScreen = KdXVCloseScreen;
|
pScreen->CloseScreen = KdXVCloseScreen;
|
||||||
|
@ -755,13 +756,10 @@ KdXVRemovePortFromWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv)
|
||||||
|
|
||||||
/**** ScreenRec fields ****/
|
/**** ScreenRec fields ****/
|
||||||
|
|
||||||
static Bool
|
static void
|
||||||
KdXVDestroyWindow(WindowPtr pWin)
|
KdXVWindowDestroy(ScreenPtr pScreen, WindowPtr pWin, void *arg)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen);
|
|
||||||
KdXVWindowPtr tmp, WinPriv = GET_KDXV_WINDOW(pWin);
|
KdXVWindowPtr tmp, WinPriv = GET_KDXV_WINDOW(pWin);
|
||||||
int ret;
|
|
||||||
|
|
||||||
while (WinPriv) {
|
while (WinPriv) {
|
||||||
XvPortRecPrivatePtr pPriv = WinPriv->PortRec;
|
XvPortRecPrivatePtr pPriv = WinPriv->PortRec;
|
||||||
|
@ -779,12 +777,6 @@ KdXVDestroyWindow(WindowPtr pWin)
|
||||||
}
|
}
|
||||||
|
|
||||||
dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, NULL);
|
dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, NULL);
|
||||||
|
|
||||||
pScreen->DestroyWindow = ScreenPriv->DestroyWindow;
|
|
||||||
ret = (*pScreen->DestroyWindow) (pWin);
|
|
||||||
pScreen->DestroyWindow = KdXVDestroyWindow;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -919,7 +911,6 @@ KdXVCloseScreen(ScreenPtr pScreen)
|
||||||
if (!ScreenPriv)
|
if (!ScreenPriv)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
pScreen->DestroyWindow = ScreenPriv->DestroyWindow;
|
|
||||||
pScreen->WindowExposures = ScreenPriv->WindowExposures;
|
pScreen->WindowExposures = ScreenPriv->WindowExposures;
|
||||||
pScreen->ClipNotify = ScreenPriv->ClipNotify;
|
pScreen->ClipNotify = ScreenPriv->ClipNotify;
|
||||||
pScreen->CloseScreen = ScreenPriv->CloseScreen;
|
pScreen->CloseScreen = ScreenPriv->CloseScreen;
|
||||||
|
|
|
@ -151,7 +151,6 @@ Bool
|
||||||
/*** These are DDX layer privates ***/
|
/*** These are DDX layer privates ***/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DestroyWindowProcPtr DestroyWindow;
|
|
||||||
ClipNotifyProcPtr ClipNotify;
|
ClipNotifyProcPtr ClipNotify;
|
||||||
WindowExposuresProcPtr WindowExposures;
|
WindowExposuresProcPtr WindowExposures;
|
||||||
CloseScreenProcPtr CloseScreen;
|
CloseScreenProcPtr CloseScreen;
|
||||||
|
|
|
@ -41,7 +41,6 @@ from The Open Group.
|
||||||
#include "xkbsrv.h"
|
#include "xkbsrv.h"
|
||||||
#include "xserver-properties.h"
|
#include "xserver-properties.h"
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
#include "extinit.h"
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ProcessInputEvents(void)
|
ProcessInputEvents(void)
|
||||||
|
|
|
@ -41,6 +41,8 @@
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <X11/Xfuncproto.h>
|
||||||
|
|
||||||
#include "xf86str.h"
|
#include "xf86str.h"
|
||||||
#include "xf86Opt.h"
|
#include "xf86Opt.h"
|
||||||
#include <X11/Xfuncproto.h>
|
#include <X11/Xfuncproto.h>
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
|
@ -116,11 +117,6 @@
|
||||||
static ModuleDefault ModuleDefaults[] = {
|
static ModuleDefault ModuleDefaults[] = {
|
||||||
#ifdef GLXEXT
|
#ifdef GLXEXT
|
||||||
{.name = "glx",.toLoad = TRUE,.load_opt = NULL},
|
{.name = "glx",.toLoad = TRUE,.load_opt = NULL},
|
||||||
#endif
|
|
||||||
#ifdef __CYGWIN__
|
|
||||||
/* load DIX modules used by drivers first */
|
|
||||||
{.name = "fb",.toLoad = TRUE,.load_opt = NULL},
|
|
||||||
{.name = "shadow",.toLoad = TRUE,.load_opt = NULL},
|
|
||||||
#endif
|
#endif
|
||||||
{.name = NULL,.toLoad = FALSE,.load_opt = NULL}
|
{.name = NULL,.toLoad = FALSE,.load_opt = NULL}
|
||||||
};
|
};
|
||||||
|
@ -827,13 +823,11 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
{
|
{
|
||||||
if ((s = xf86GetOptValString(FlagOptions, FLAG_LOG))) {
|
if ((s = xf86GetOptValString(FlagOptions, FLAG_LOG))) {
|
||||||
if (!xf86NameCmp(s, "flush")) {
|
if (!xf86NameCmp(s, "flush")) {
|
||||||
LogMessageVerb(X_CONFIG, 1, "Flushing logfile enabled\n");
|
LogMessageVerb(X_CONFIG, 1, "flush log flag is noop\n");
|
||||||
LogSetParameter(XLOG_FLUSH, TRUE);
|
|
||||||
}
|
}
|
||||||
else if (!xf86NameCmp(s, "sync")) {
|
else if (!xf86NameCmp(s, "sync")) {
|
||||||
LogMessageVerb(X_CONFIG, 1, "Syncing logfile enabled\n");
|
LogMessageVerb(X_CONFIG, 1, "Syncing logfile enabled\n");
|
||||||
LogSetParameter(XLOG_FLUSH, TRUE);
|
xorgLogSync = TRUE;
|
||||||
LogSetParameter(XLOG_SYNC, TRUE);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LogMessageVerb(X_WARNING, 1, "Unknown Log option\n");
|
LogMessageVerb(X_WARNING, 1, "Unknown Log option\n");
|
||||||
|
|
|
@ -848,7 +848,7 @@ DoShowOptions(void)
|
||||||
int i = 0;
|
int i = 0;
|
||||||
const char **vlist = NULL;
|
const char **vlist = NULL;
|
||||||
char *pSymbol = 0;
|
char *pSymbol = 0;
|
||||||
XF86ModuleData *initData = 0;
|
XF86ModuleData *initData = NULL;
|
||||||
|
|
||||||
if (!(vlist = GenerateDriverList())) {
|
if (!(vlist = GenerateDriverList())) {
|
||||||
ErrorF("Missing output drivers\n");
|
ErrorF("Missing output drivers\n");
|
||||||
|
|
|
@ -64,6 +64,7 @@
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
#include "mi/mi_priv.h"
|
#include "mi/mi_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
|
@ -88,7 +89,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "xf86platformBus.h"
|
#include "xf86platformBus.h"
|
||||||
#include "systemd-logind.h"
|
|
||||||
|
#include "../os-support/linux/systemd-logind.h"
|
||||||
|
|
||||||
extern void (*xf86OSPMClose) (void);
|
extern void (*xf86OSPMClose) (void);
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "extension.h"
|
#include "extension.h"
|
||||||
#include "extinit.h"
|
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
|
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue