I tried to paint in portrait mode but it is all messed up :(
Description
Description
Status | Assigned | Task | ||
---|---|---|---|---|
Open | alvinhochun | T6807 Add Win8+ "Pointer Input Message" support | ||
Resolved | alvinhochun | T7109 Tilt does not follow the screen rotation (Windows 10, Surface Pro 2017) |
Comment Actions
I don't see this mentioned in any documentations... should I rotate the tilt angles according to the tablet device orientation?
Comment Actions
The SP2017 does not support rotation, so I have no way to know if it is the same. I'll just leave it unchanged. (If anyone cares, the following is the additional change to also rotate the rotation value...)
diff --git a/libs/ui/input/wintab/kis_tablet_support_win8.cpp b/libs/ui/input/wintab/kis_tablet_support_win8.cpp index 8649c3bc27..8107bcd618 100644 --- a/libs/ui/input/wintab/kis_tablet_support_win8.cpp +++ b/libs/ui/input/wintab/kis_tablet_support_win8.cpp @@ -586,7 +586,23 @@ QTabletEvent makePositionalTabletEvent(const QWidget *targetWidget, const QEvent int rotation = 0; if (penMask.rotationValid()) { - rotation = 360 - penInfo.rotation; // Flip direction and convert to signed int + rotation = penInfo.rotation; + switch (deviceItem.deviceOrientation) { + case DISPLAYCONFIG_ROTATION_ROTATE90: + rotation += 270; + break; + case DISPLAYCONFIG_ROTATION_ROTATE180: + rotation += 180; + break; + case DISPLAYCONFIG_ROTATION_ROTATE270: + rotation += 90; + break; + case DISPLAYCONFIG_ROTATION_IDENTITY: + default: + break; + } + rotation = rotation % 360; + rotation = 360 - rotation; // Flip direction and convert to signed int if (rotation > 180) { rotation -= 360; }