You are not logged in.

#1 2021-04-29 20:59:31

amr962
Member
Registered: 2021-02-11
Posts: 52

[SOLVED] Is it possible to prevent the mouse from leaving monitor?

I'm on a laptop and using an external monitor with i3.

I have this in /etc/X11/xorg.conf.d/10-monitor.conf:

Section "Monitor"
    Identifier  "HDMI1"
    Option      "RightOf" "eDP1"
    Modeline    "1280x1024_60" 108 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
    Option      "PreferredMode" "1280x1024_60"
EndSection

And I have some workspaces bound to HDMI1 in i3, the problem is the mouse leaves the monitor way too often like when I try to use the scroll bar or maybe I briefly see it when it's on the edge of the screen which is annoying. I want to still be able to move windows back and forth between the external monitor and laptop display (by changing the window's workspace) is this possible?

Last edited by amr962 (2021-04-29 21:46:19)

Offline

#2 2021-04-29 21:09:57

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: [SOLVED] Is it possible to prevent the mouse from leaving monitor?

https://aur.archlinux.org/packages/xpointerbarrier-git/

You can use xdotool to warp the pointer from one output geometry to the other.

Offline

#3 2021-04-29 21:45:51

amr962
Member
Registered: 2021-02-11
Posts: 52

Re: [SOLVED] Is it possible to prevent the mouse from leaving monitor?

Thanks, this is what I was looking for.

I can still make the pointer leave the laptop display in the top right and bottom right corners for some reason, but it doesn't happen very often.

Offline

#4 2021-04-30 10:21:17

amr962
Member
Registered: 2021-02-11
Posts: 52

Re: [SOLVED] Is it possible to prevent the mouse from leaving monitor?

I didn't notice this before, but it seems that by default you can't move the pointer between monitors unless over a certain speed? if I move the pointer slowly it stops there until I move it quicker, am I going crazy?

Offline

#5 2021-04-30 10:26:54

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: [SOLVED] Is it possible to prevent the mouse from leaving monitor?

idk, but assume if you moving the pointer fast enough to skip events over the barrier it'll not be blocked.

Offline

Board footer

Powered by FluxBB