GuLinux / ScreenRotator

Automatic screen rotation daemon for X11
GNU General Public License v3.0
57 stars 18 forks source link

Active pen spectre x360 doesn't rotate #2

Closed Clockris closed 6 years ago

Clockris commented 6 years ago

Hi,

the program work fine when I use my finger on my hp spectre x360, but for some wired reason if I use the active pen it works as the screen never rotate.

For example, if I rotate the computer of 180 degree if I write from left to right the active pen write form right to left.

Is it a known bug? How can I solve it?

GuLinux commented 6 years ago

Hi, at a guess, the pen is a different input device, so it must be translated as well. Could you please run xinput --list, identify your input device, and then run xinput --list-props device? Cheers

Clockris commented 6 years ago

Hi, thanks for your answer.

With xinput --list I obtain:

⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ ELAN2514:00 04F3:2593 id=11 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=17 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Power Button id=8 [slave keyboard (3)] ↳ HP Wide Vision FHD Camera: HP W id=9 [slave keyboard (3)] ↳ HP Wide Vision FHD Camera: HP I id=10 [slave keyboard (3)] ↳ Intel Virtual Button driver id=13 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=14 [slave keyboard (3)] ↳ HP WMI hotkeys id=15 [slave keyboard (3)] ↳ HP Wireless hotkeys id=16 [slave keyboard (3)] ↳ Video Bus id=7 [slave keyboard (3)] ↳ ELAN2514:00 04F3:2593 Pen id=12 [slave keyboard (3)]

while the output of xinput --list-props 12 is:

Device 'ELAN2514:00 04F3:2593 Pen': Device Enabled (140): 1 Coordinate Transformation Matrix (142): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 Device Node (265): "/dev/input/event12" Device Product ID (266): 1267, 9619

GuLinux commented 6 years ago

Cool, so it has the Coordinate Transformation Matrix property.

Until now my approach was to filter all the input devices of type touchscreen, but I think this can be easily solved by just filtering all the input devices with Coordinate Transformation Matrix property, and apply the rotation matrix to all of them.

I should be able to put a fix soon

Clockris commented 6 years ago

Thanks! Let me know and I will be your first tester!

tyzoid commented 6 years ago

Same with the Active Pen on the Dell Inspiron 5579.

GuLinux commented 6 years ago

Hi, sorry about the delay. Could you test the resolution, and reopen the issue if necessary?

tyzoid commented 6 years ago

@GuLinux Just tested the latest version, fixed the issue with my Inspiron. Thanks!