使用/调试 Xorg 服务器模块的最佳方法

发布于 2024-09-16 15:16:10 字数 425 浏览 7 评论 0原文

我想使用 Xorg 服务器模块,并且想知道如何在运行时重新加载该模块。

另外,也许有人可以给我一些关于这样做的好提示(因为我以前从未使用过 Xorg 服务器代码)。


特别是。我正在运行 Xorg 7.5 的 Ubuntu 版本(如果这很重要的话——是吗?)。


我具体想做的是在XInput中实现鼠标滚轮加速。

我考虑为此添加一个可以在某处设置的新选项(我认为 xorg.conf 不再是进行 XInput 配置的地方;它现在在哪里以及引入新设置的最佳方式是什么,即MouseWheelAccel 或类似的东西?)。

然后当然要实现实际的加速。由于鼠标滚轮事件就像按钮按下事件一样,我想到只是增加触发此类事件的速率。如何实现这其实是一个小问题。 (我实际上认为这是微不足道的。让我们看看 Xorg 代码是否允许它如此简单......)

I want to work on an Xorg server module and I am wondering how I can reload the module at runtime.

Also, maybe someone can give me some good tips about doing this (because I never have worked with Xorg server code before).


Esp. I am running the Ubuntu version of Xorg 7.5 (if that matters much -- does it?).


What I want to do specifically is to implement mouse wheel acceleration in XInput.

I thought about adding a new option for this which can be set somewhere (I think xorg.conf is not anymore the place where you do the XInput configuration; where is it now and what would be the best way to introduce a new setting, i.e. MouseWheelAccel or sth like this?).

And then of course to implement the actual acceleration. As mouse wheel events are just like button press events, I thought of just increasing the rate of firing such events. How to implement this is actually really the minor problem. (I am actually thinking about it as being trivial. Let's see if the Xorg code allows it to be so simple...)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

余罪 2024-09-23 15:16:10

到目前为止,我已经这样做了:

报告:

通过 Git 查看 Xorg,准备编译并获取 XServer 代码。基本上是这样的:

...
git clone git://anongit.freedesktop.org/git/xorg/util/macros
...
sudo apt-get install xserver-xorg-dev
sudo apt-get install x11proto-gl-dev x11proto-xf86dri-dev x11proto-fixes-dev x11proto-damage-dev x11proto-xcmisc-dev x11proto-bigreqs-dev x11proto-composite-dev x11proto-scrnsaver-dev x11proto-resource-dev x11proto-xinerama-dev x11proto-xf86dga-dev x11proto-record-dev x11proto-xf86vidmode-dev
sudo apt-get install libxfont-dev libudev-dev
git clone git://anongit.freedesktop.org/git/mesa/mesa
git clone git://anongit.freedesktop.org/xorg/xserver
cd xserver
git checkout -b server-1.7-branch origin/server-1.7-branch -t
# apply a bunch of Debian patches (apt-get source xserver-xorg-core && ls xorg-server-1.7.6/debian/patches)
# esp., apply the config-libudev-backend and config-xorg-conf-d 
./autogen.sh --prefix=/opt/xorg --enable-xorg --disable-dmx --disable-xvfb --disable-xnes \
--disable-xwin --disable-xprint --with-mesa-source=../mesa \
--enable-dga --enable-glx --enable-aiglx --enable-glx-tls \
--enable-dri --enable-dri2 \
--enable-config-udev --enable-registry --enable-composite --enable-record \
--enable-xv --enable-xvmc --enable-dga --enable-screensaver \
--enable-xdmcp --enable-xdm-auth-1 --enable-xfree86-utils \
--with-xkb-bin-directory=/usr/bin --with-xkb-path=/usr/share/X11/xkb --with-xkb-output=/var/lib/xkb \
--with-dri-driver-path=/usr/lib/dri \
--with-default-font-path="/usr/share/fonts/X11/misc,/usr/share/fonts/X11/cyrillic,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType,built-ins"
sudo chmod o+w /var/lib/xkb # just to be able to proceed as user
... # work on it
sudo /opt/xorg/bin/Xorg :1 vt8 # for testing
sudo cp /opt/xorg/bin/* /usr/bin # temporarily install it as main Xserver

So far, I have done this:

Reports:

Check out Xorg via Git, prepare for compiling, and get the XServer code. Basically this:

...
git clone git://anongit.freedesktop.org/git/xorg/util/macros
...
sudo apt-get install xserver-xorg-dev
sudo apt-get install x11proto-gl-dev x11proto-xf86dri-dev x11proto-fixes-dev x11proto-damage-dev x11proto-xcmisc-dev x11proto-bigreqs-dev x11proto-composite-dev x11proto-scrnsaver-dev x11proto-resource-dev x11proto-xinerama-dev x11proto-xf86dga-dev x11proto-record-dev x11proto-xf86vidmode-dev
sudo apt-get install libxfont-dev libudev-dev
git clone git://anongit.freedesktop.org/git/mesa/mesa
git clone git://anongit.freedesktop.org/xorg/xserver
cd xserver
git checkout -b server-1.7-branch origin/server-1.7-branch -t
# apply a bunch of Debian patches (apt-get source xserver-xorg-core && ls xorg-server-1.7.6/debian/patches)
# esp., apply the config-libudev-backend and config-xorg-conf-d 
./autogen.sh --prefix=/opt/xorg --enable-xorg --disable-dmx --disable-xvfb --disable-xnes \
--disable-xwin --disable-xprint --with-mesa-source=../mesa \
--enable-dga --enable-glx --enable-aiglx --enable-glx-tls \
--enable-dri --enable-dri2 \
--enable-config-udev --enable-registry --enable-composite --enable-record \
--enable-xv --enable-xvmc --enable-dga --enable-screensaver \
--enable-xdmcp --enable-xdm-auth-1 --enable-xfree86-utils \
--with-xkb-bin-directory=/usr/bin --with-xkb-path=/usr/share/X11/xkb --with-xkb-output=/var/lib/xkb \
--with-dri-driver-path=/usr/lib/dri \
--with-default-font-path="/usr/share/fonts/X11/misc,/usr/share/fonts/X11/cyrillic,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType,built-ins"
sudo chmod o+w /var/lib/xkb # just to be able to proceed as user
... # work on it
sudo /opt/xorg/bin/Xorg :1 vt8 # for testing
sudo cp /opt/xorg/bin/* /usr/bin # temporarily install it as main Xserver
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文