https://bugs.kde.org/show_bug.cgi?id=500124

Stefano Caruso Corrado <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carusocorradostefano@gmail.
                   |                            |com

--- Comment #1 from Stefano Caruso Corrado <[email protected]> ---
Hi! I checked myself the problem and I think I found in the file
kwin/src/backends/libinput/connection.cpp the cause, I can also say that this
is the same bug that affects the #479541 bug (it is the orientation greyed for
the standalone tablets).

The cause of this bug:
I found these two competing codes:
applyDeviceConfig() (line 273) correctly reads the user's saved Orientation
value from kcminputrc via Device::loadConfiguration().

And applyScreenToDevice() (line 274, called right after) unconditionally
overwrites it:

device->setOutput(deviceOutput);
// TODO: this is currently non-functional even on DRM. Needs orientation()
override there.
device->setOrientation(Qt::PrimaryOrientation);

I think that this also explains why the reset happens after a couple seconds,
applyScreenToDevice() is also called from updateScreens() (line 619), which
runs on any screen reconfig, silently overwriting the user setting again.



Confirm end-to-end block for standalone tablets:

Before starting I want to let you know that the libinput maintainer confirmed
that the standalone orientation bug should be fixed in kwin. I filed an issue
with the libinput maintainer, who confirmed this. 
Here is the full exchange:
https://gitlab.freedesktop.org/libinput/libinput/-/work_items/1288

I tested this by manually adding Orientation = 1 to the tablet section in
~/.config/kcminputrc, trying to bypass the greyed out option on the options,
and then rebooting. After the reboot the rotation had no effect, and libinput
list-devices showed no change. I think that this confirms that even without the
KCM UI gate (bug #479541), applyScreenToDevice() would immediately reset the
value anyway, so standalone tablet orientation is completely blocked
end-to-end.

>From what I can understand, skipping this reset for standalone tablets might be
a starting point, but Device currently has no way to distinguish a standalone
tablet from a pen display, the function isTabletTool() returns true for both.
I'm not sure how to handle that distinction correctly, so I'll leave it to
someone with more familiarity with the codebase.

This is my first contribution to KWin, so I may have missed something (more
than possible), happy to test a patch or provide more debug info if useful.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to