我有一个内部和外部显示器,我想将光标移到上面。当我在连接外部设备的情况下启动计算机时,我的显示管理器以错误的 DPI 启动,我必须执行这 4 个命令来修复 dpi。
xrandr --output DP-2 --mode 1920x1200 --dpi 94
xrandr --output LVDS-1-0 --mode 1920x1080 --dpi 147
xrandr --output DP-2 --right-of LVDS-1-0 --dpi 94
xrandr --output DP-2 --primary
然而,在这种情况下,我可以在两个显示器上移动光标。
相反,如果我在没有连接外部显示器的情况下启动,则不存在 dpi 问题,但是当我运行上述脚本来检测外部显示器时,鼠标会映射到外部显示器的区域,并且我无法将其移动到内部显示。
是否有一些明确的选项来指定光标可以访问的区域?
我还有一个图形输入板,我将其映射为仅使用带有以下脚本的外部显示器。
xsetwacom --set "Wacom Intuos5 touch L Pen stylus" MapToOutput "1920x1200+1920+0"
xsetwacom --set "Wacom Intuos5 touch L Pen eraser" MapToOutput "1920x1200+1920+0"
xsetwacom --set "Wacom Intuos5 touch L Pen cursor" MapToOutput "1920x1200+1920+0"
xsetwacom --set "Wacom Intuos5 touch L Pad pad" MapToOutput "1920x1200+1920+0"
xsetwacom --set "Wacom Intuos5 touch L Finger touch" MapToOutput "1920x1200+1920+0"
我xinput --list
的是
xinput --list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech Performance MX id=10 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=13 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint id=15 [slave pointer (2)]
⎜ ↳ Wacom Intuos5 touch L Pen stylus id=16 [slave pointer (2)]
⎜ ↳ Wacom Intuos5 touch L Pen eraser id=17 [slave pointer (2)]
⎜ ↳ Wacom Intuos5 touch L Pen cursor id=18 [slave pointer (2)]
⎜ ↳ Wacom Intuos5 touch L Finger touch id=19 [slave pointer (2)]
⎜ ↳ Wacom Intuos5 touch L Pad pad id=20 [slave pointer (2)]
⎜ ↳ Microsoft Natural® Ergonomic Keyboard 4000 id=21 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ Integrated Camera id=11 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=14 [slave keyboard (3)]
↳ Microsoft Natural® Ergonomic Keyboard 4000 id=22 [slave keyboard (3)]
我的xrandr
输出有:
DP-2 connected primary 1920x1200+1920+0 (normal left inverted right x axis y axis) 520mm x 320mm
1920x1200 59.95*+
1920x1080 60.00
1680x1050 59.95
1600x1200 60.00
1280x1024 60.02
1280x960 60.00
1024x768 60.00
800x600 60.32
640x480 59.94
[...]
LVDS-1-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
1920x1080 60.00*+ 50.00
1400x1050 59.98
1280x1024 60.02
1280x960 60.00
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
800x600 60.00 60.32 56.25
700x525 59.98
640x512 60.02
640x480 60.00 59.94
512x384 60.00
400x300 60.32 56.34
320x240 60.05
[...]
当我按照此进行窗口点击时问题在DP-2
显示器上我看到的结果如下:
x:3158 y:1084 screen:0 window:16788951
x:3508 y:1076 screen:0 window:16788951
x:1920 y:740 screen:0 window:801
x:3193 y:986 screen:0 window:16788951
x:3345 y:1066 screen:0 window:16788951
x:3382 y:990 screen:0 window:16788951
x:3363 y:1055 screen:0 window:16788951
x:2806 y:983 screen:0 window:41943171
x:1941 y:48 screen:0 window:41943171
x:3466 y:1060 screen:0 window:16788951
x:3469 y:1117 screen:0 window:16788951
我正在使用herbstluftwm
窗口管理器,并告诉它我的显示器配置
herbstclient set_monitors "1920x1080+0+0" "1920x1200+1920+0"
配置显示为:
$ hc detect_monitors -l
1920x1200+1920+0
1920x1080+0+0
nvidia
我在 thinkpad W520 笔记本电脑上使用带有驱动程序的 nVidia 显卡。