Comments (4)
Took me forever to respond because I couldn't figure out how to fix it. It has to do with how X11 does mouse input.
After writing the Wayland port where the mouse input is floating point, I rebased the x11 port to the cleaner code, and it seems to be fixed!
from slop.
I've tested this with latest -git
version. There is no longer the crosshair thingy so I've tested with crosshair
shader.
My laptop screen is 1600x900.
-
I start at left slamming mouse against left edge (so I'm sure it's at position 0) then drag selection to right edge and slam it against it (so it's at position 1599), resulting region reads width of 1600
-
I start at right edge and proceed analogically to 1), resulting region reads width of 1598
-
top to bottom case behaves similarly as 1)
-
bottom to top behaves specially, region border is visible on the bottom but moves out of screen once I slam cursor to the top edge, giving height 900 but then moving it just one pixel down I get 898 because the bottom border move back up a bit
from slop.
Unfortunately that's just how xorg handles mouse input.
If you used crosshair to select a character in your terminal, you can see no matter what angle you attempt to select from it will always select it perfectly.
Due to how xorg constrains the screen slop seemingly doesn't work right when you hit the borders.
wayland-slop doesn't have this issue despite running the exact same code.
Now the question is if I should make a literal edge-case detection to solve the issue you just described.
from slop.
I see, well this was just something I've come across and it is edge case, though I thought easily fixed. Otherwise it doesn't affect me really and if it requires some unreasonable effort to fix it, it's probably not worth it. I suggest we keep this issue open then so it's kinda documented.
from slop.
Related Issues (20)
- Persisten slop for recording HOT 3
- Keyboard navigation HOT 2
- Programmatically select region HOT 2
- strange behavior with --nodrag and moving started selection HOT 1
- transparency in shader HOT 8
- Using the "magnifying glass" (based on shaderexamples) to select a pixel HOT 4
- Optionally disable border drawing and highlighting of windows.
- Slop crashes randomly when selecting
- Expose rectangle start position to shaders HOT 6
- Feature Request: Add parameter to show coordinates and horizontal/vertical lines while selecting a point or region
- Feature Request: Option to output the size of the window
- Feature request: Exclude bars and window manager windows HOT 1
- Screen edge compensation causes misalignment in shader
- Feature request: Use a different window class name (WM_CLASS) for selection
- No compositor found HOT 1
- Feature request: Option to keep rectangle and refine selection
- Feature request: select window from command argument
- Feature request: get display geometry HOT 3
- Feature request: "Ruler" style croshair HOT 5
- Option to not build or install the dynamic library
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slop.