Bug 473382 - Mouse selection for rectangle is snapped to 5px-raster
Summary: Mouse selection for rectangle is snapped to 5px-raster
Status: RESOLVED NOT A BUG
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 23.04.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-14 18:29 UTC by H.H.
Modified: 2023-08-16 17:31 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.H. 2023-08-14 18:29:46 UTC
I often use spectacle to choose a rectangle-area of the screen. But since some time, spectacle forces the mouse to snap to a (random?) 5px-raster, so I cannot make a pixel-perfect selection. I know there is a workaround with the arrow keys, but snapping the mouse to a raster makes no sense to me.
Comment 1 Noah Davis 2023-08-14 21:03:55 UTC
Sounds like a scaling bug. What is your system info? Also make sure to post monitor arrangement, resolutions, scale factors and whether you used x11 or wayland.
Comment 2 H.H. 2023-08-14 21:26:48 UTC
I use X11, no scaling (100%), no high dpi, only a single screen.

default screen number:    0
number of screens:    1

screen #0:
  dimensions:    1280x1024 pixels (338x270 millimeters)
  resolution:    96x96 dots per inch
Comment 3 H.H. 2023-08-14 21:30:02 UTC
Only one special thing: I have a startup-script with:
xinput set-prop "USB To keyboard Mouse Converter Mouse" "Coordinate Transformation Matrix" 2.5, 0.0, 0.0, 0.0, 2.5, 0.0, 0.0, 0.0, 1.0
but this never had problems with spectacle in the past, using it a long time already.
Comment 4 H.H. 2023-08-14 21:34:20 UTC
edit: this xinput thing makes a difference, not only for spectacle. by setting the matrix to 1, I get 2px snapping (not only in spectacle)
Comment 5 Noah Davis 2023-08-14 21:35:53 UTC
Can you also post your basic system info? Go to Info Center and click Copy to Clipboard, then paste it in a comment here.
Comment 6 Noah Davis 2023-08-14 21:45:42 UTC
(In reply to H.H. from comment #3)
> Only one special thing: I have a startup-script with:
> xinput set-prop "USB To keyboard Mouse Converter Mouse" "Coordinate
> Transformation Matrix" 2.5, 0.0, 0.0, 0.0, 2.5, 0.0, 0.0, 0.0, 1.0
> but this never had problems with spectacle in the past, using it a long time
> already.

What is this for? Are you using a touchpad, an actual mouse or a keyboard that is controlling the mouse cursor? What is your pointer sensitivity (mouse) or acceleration (touchpad)? -1 is the far left, 0 is the middle, 1 is the far right and each tick is an 0.2 increment. Do you use an adaptive or flat acceleration profile?
Comment 7 Nate Graham 2023-08-15 00:53:10 UTC
.
Comment 8 H.H. 2023-08-15 17:24:36 UTC
This is my system info:

Betriebssystem: openSUSE Tumbleweed 20230716
KDE-Plasma-Version: 5.27.6
KDE-Frameworks-Version: 5.108.0
Qt-Version: 5.15.10
Kernel-Version: 6.4.3-1-default (64-bit)
Grafik-Plattform: X11
Prozessoren: 16 × AMD Ryzen 9 4900HS with Radeon Graphics
Speicher: 15,0 GiB Arbeitsspeicher
Grafikprozessor: NVIDIA GeForce GTX 1660 Ti with Max-Q Design/PCIe/SSE2
Hersteller: ASUSTeK COMPUTER INC.
Produktname: ROG Zephyrus G14 GA401IU_GA401IU
Systemversion: 1.0

I need the special settings for my mouse because the normal settings (max acceleration) do not suffice. I am using a ps2-to-usb-converter for my ps2-mouse:

xinput list-props 17 
Device 'USB To keyboard Mouse Converter Mouse':
        Device Enabled (183):   1
        Coordinate Transformation Matrix (185): 2.500000, 0.000000, 0.000000, 0.000000, 2.500000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Natural Scrolling Enabled (314):       0
        libinput Natural Scrolling Enabled Default (315):       0
        libinput Scroll Methods Available (319):        0, 0, 1
        libinput Scroll Method Enabled (320):   0, 0, 0
        libinput Scroll Method Enabled Default (321):   0, 0, 0
        libinput Button Scrolling Button (322): 2
        libinput Button Scrolling Button Default (323): 2
        libinput Button Scrolling Button Lock Enabled (324):    0
        libinput Button Scrolling Button Lock Enabled Default (325):    0
        libinput Middle Emulation Enabled (326):        0
        libinput Middle Emulation Enabled Default (327):        0
        libinput Rotation Angle (297):  0.000000
        libinput Rotation Angle Default (298):  0.000000
        libinput Accel Speed (328):     1.000000
        libinput Accel Speed Default (329):     0.000000
        libinput Accel Profiles Available (330):        1, 1, 1
        libinput Accel Profile Enabled (331):   0, 1, 0
        libinput Accel Profile Enabled Default (332):   1, 0, 0
        libinput Accel Custom Fallback Points (333):    <no items>
        libinput Accel Custom Fallback Step (334):      0.000000
        libinput Accel Custom Motion Points (335):      <no items>
        libinput Accel Custom Motion Step (336):        0.000000
        libinput Accel Custom Scroll Points (337):      <no items>
        libinput Accel Custom Scroll Step (338):        0.000000
        libinput Left Handed Enabled (339):     0
        libinput Left Handed Enabled Default (340):     0
        libinput Send Events Modes Available (299):     1, 0
        libinput Send Events Mode Enabled (300):        0, 0
        libinput Send Events Mode Enabled Default (301):        0, 0
        Device Node (302):      "/dev/input/event11"
        Device Product ID (303):        1204, 1809
        libinput Drag Lock Buttons (316):       <no items>
        libinput Horizontal Scroll Enabled (317):       1
        libinput Scrolling Pixel Distance (341):        15
        libinput Scrolling Pixel Distance Default (342):        15
        libinput High Resolution Wheel Scroll Enabled (318):    1

More and more I think this is not specific to spectacle.
Comment 9 Noah Davis 2023-08-15 18:30:04 UTC
I still don't know enough to confirm this, but I'll leave this open for now.

> More and more I think this is not specific to spectacle.

If you get to a point where you've determined that the issue likely isn't from Spectacle, feel free to close the issue with the status RESOLVED NOT A BUG.
Comment 10 Noah Davis 2023-08-16 13:53:05 UTC
Forgot to change status back to NEEDSINFO
Comment 11 H.H. 2023-08-16 17:31:28 UTC
I'll close this bug. When I set my mouse-pointer-speed to middle (in system settings), and setting the xinput matrix to 1, I can move the mouse in 1px steps (not only in spectacle). I still wonder, if these problems are new, or I simply did not recognize them before (although I often need pixel-exact selections). I assume the problem is somewhere within xinput.