xoop: a tool to make the X cursor loop around the screen - Programming On Unix

Users browsing this thread: 5 Guest(s)
mcol
Nixers
Quote:Why did you bother setting up a window, and even support EWMH on it ? Was it needed ?

I used a window so I could use enter-notify events. What else could I have done (beside the barriers)?

TIL about pointer barriers - very cool! And makes way more sense for this purpose. I'll look into using these instead.

Quote:You should consider testing the cursor position against the monitor size/position rather than your window's edge. That would be more adaptive to the various multi-monitor setups you can find in the wild.

Do you mean in the calculation of where to teleport the pointer to? Yeah there are a few things I use for this calculation, and I'm not restricted by one window (i.e. I could easily put on per output; much easier than trying to calculate the geometry of one window around all monitors! This would obviously require calculating based on monitor positions). My concern with the irregular multimonitor setups is that it isn't always obvious whether the pointer should teleport, or where to. In a T-shaped 2 monitor setup, what happens when the mouse hits the bottom edge of the top monitor where there isn't another monitor to go to? The top? What if it was an H-shaped 3 monitor setup. Going left-to-right inside one of the H legs you might expect it to appear in the other leg - inconsistent with the T. Although there might be some way to nicely account for all configurations, things begin to get complicated.


Messages In This Thread
RE: xoop: a tool to make the X cursor loop around the screen - by mcol - 07-09-2020, 01:57 PM