Portál AbcLinuxu, 16. prosince 2025 17:58
.. pre xwarppointer? O čo ide:
ja smerom k autorovi utilitky
thank you for releasing xwarppointer. at least i am able to workaround
a problem with VirtualScreen spread over two monitors with uneven
vertical resolutions that Xorg seems to ignore. yes, i'm talking about
dead space - the area where you can put windows/mouse cursor but
nobody can see them. most of wm these days are intelligent enough not
to create windows in this area but that does not count for mouse
cursor. so i ended up very frequently in a situation where i was
driving my mouse like crazy in order to locate it. with xwarppointer
it's a bit easier now. i made a simple one-liner which causes mouse to
stop before entering the dead space (in my configuration it's in the
upper left area of a virtual screen):
difference_in_vertical_resolutions=132; x_resolution=1024; while sleep
0.4; do xwarppointer get | ( read x y; if [ $x -lt ${x_resolution} -a
$y -lt ${difference_in_vertical_resolutions} ]; then xwarppointer
abspos $x ${difference_in_vertical_resolutions}; fi); done
this works but i'd like to ask you if you see a room for improvement.
like.. lowering 0.4 sleep gives better feeling but increases cpu
consumption quite a lot. i'd be happy to look around in the code and
maybe write a patch (suppose a C-compiled code would run faster than
bash loop) but i'm not a coder. if you feel like doing it and have a
paypal-receive account, i'd be glad to send you some reward.
odpoveď
sounds like a easy change.. but sadly, i havent run X11/Linux in the last 8 years at all. This is totally unmaintained code! i know of the issue you speak of tho.. i had it back in 1997 too! i always thought it was a neat feature, and when i moved to the windows platform, and they block dead space there, i was always upset by that. funny. if you do get it patched/tested elsewhere, let me know and ill post patch... the code should be pretty trivial to do.. and itll take near zero cpu if you do it in a long running piece of native code.
Cieľom je teda patch, ktorý by pridal napríklad prepínač -dead_space widthxheight+pos_x+pos_y, ktorý by spôsobil to, že xwarppointer by sa neukončil, ale spustila by sa slučka, ktorá by myši zabraňovala vstúpiť myšítku do tohto priestoru.
Napíšte, akú čiastku by ste si za napísanie patchu predstavovali, PayPalu (príp. inak) sa nebránim. jose
update 15. septembra 2009: vďaka TurboLame je problém vyriešený: dead_space (aur balík). Díky!
Tiskni
Sdílej:
select() may update the timeout argument to indicate how much time was left
super, slape to a spotreba cpu je nebadatelna. tak kolik?
tak dik moc. mohol by si prip. pridat licenciu a niekam to "zavesit"? rad by som urobil balicek v auru a linkovat sa mi to z abclinuxu zrovna nechce. jose
super, ta novsia verzia ma ale problem. moja konfiguracia displejov je nasledovna:
x------------|
| |
|------|| |
| || |
| || |
|------||------------|
ten mensi je laptop, vacsi ext. monitor. mys odskakuje ako ma, ale pokial kurzor umiestnim do laveho horneho rohu ext. monitora (na obrazku vyznacene znakom x) podari sa jej vstupit do dead space. prva verzia tymto neduhom netrpi.
diky, funguje. btw arch balik na svete (vid update)
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.