Bug 423909 - KMail perceives cursor location to be vertically offset from where Wacom Bamboo graphic tablet's cursor is visible
Summary: KMail perceives cursor location to be vertically offset from where Wacom Bamb...
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: UI (show other bugs)
Version: 5.14.2
Platform: openSUSE Linux
: NOR grave
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-05 17:01 UTC by Markus
Modified: 2023-04-29 09:34 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of KMail offset behavior showing highlighted message NOT under Wacom Bamboo graphic tablet cursor (102.59 KB, image/png)
2020-07-05 17:05 UTC, Markus
Details
Kate with selected text showing offset between cursor and selected area (389.37 KB, image/png)
2023-03-24 09:41 UTC, kde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus 2020-07-05 17:01:54 UTC
SUMMARY
KMail perceives cursor location to be vertically offset by one inch from where Wacom Bamboo graphic tablet's cursor is visible.


STEPS TO REPRODUCE
1. Start Kmail
2. Move the graphic tablet's cursor into the KMail window

Reproducible 100% of the time.


OBSERVED RESULT
KMail perceives cursor location to be vertically offset by one inch from where Wacom Bamboo graphic tablet's cursor is visible.


EXPECTED RESULT
The area where KMail perceives the cursor to be should be exactly the same as where the graphic tablet's cursor is visible.


SOFTWARE/OS VERSIONS
KMail2 Version 5.14.2 (20.04.2)
Linux Kernel Version: 5.3.18-lp152.19-default
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.71.0
Qt Version: 5.12.7
xf86-input-wacom Version: 0.34.2-lp152.4.6
libwacom2 Version: 1.1-lp152.2.5
libwacom-data Version: 1.1-lp152.2.5
Distro: openSUSE Leap 15.2 for X86_64


WACOM GRAPIC TABLET DETAILS
Wacom Bamboo Pen Model MTE-450A set to Absolute Mode (problem also happens in Relative mode)
Wacom Bamboo USB Vendor ID: 0x56a
Wacom Bamboo USB Product ID: 0x65
Wacom Bamboo USB Revision: 0.00


ADDITIONAL INFORMATION
I did a fresh install of openSUSE Leap 15.2 on 2020-Jul-04 (the latest and most current openSUSE version as of this report) and discovered there is a problem using a Wacom Bamboo tablet with KMail Version 5.14.2 (20.04.2).

Whenever the graphic tablet's cursor is in the KMail window, the area where KMail perceives I am pointing is vertically offset by one inch below where the graphic tablet's cursor is visible on my 23 inch screen.

For example, when I see my tablet's cursor hovering over the topmost message in the Message List, KMail highlights the message 3 rows below, showing KMail perceives I am pointing at the forth row from the top in the Message List, instead of perceiving I am pointing at the topmost message as it should. The same behavior presents in the Folders column. This makes KMail unusable with the graphic tablet, as I can not select any email message higher than the forth row. The icons in the toolbar are completely inaccessible by the graphic tablet's pointer and can not be activated.  The menu bar is completely inaccessible by the graphic tablet's pointer and can not be activated. The same offset behavior happens when using the scroll bar button (thumb bar).

The graphic tablet's pointer offset behavior is not presenting in any other application I used. This behavior was not present in any version of KMail from openSUSE Leap 15.0 or older.

When I connect a mouse to my system, the area where KMail perceives the mouse is pointing is the same as where the mouse cursor is visible, as it should be, and all functionality is accessible.
Comment 1 Markus 2020-07-05 17:05:21 UTC
Created attachment 129921 [details]
Screenshot of KMail offset behavior showing highlighted message NOT under Wacom Bamboo graphic tablet cursor
Comment 2 Nate Graham 2020-07-07 19:24:56 UTC
Are you using X11 or Wayland?
Comment 3 Markus 2020-07-08 05:53:40 UTC
(In reply to Nate Graham from comment #2)
> Are you using X11 or Wayland?
X11

Thank you for your prompt reply!  :)
Comment 4 Markus 2020-07-08 05:56:48 UTC
(In reply to Nate Graham from comment #2)
> Are you using X11 or Wayland?

X11 and the NVIDIA accelerated driver
Comment 5 Markus 2020-07-10 08:52:12 UTC
Started KMail from KRunner and the problem persists.

Started Kontact from KRunner and the problem persists.

Then

Tested starting KMail from the command line in Konsole with:
QT_XCB_TABLET_LEGACY_COORDINATES=1 kontact
Problem appears resolved.

Tested starting Kontact from the command line in Konsole with:
QT_XCB_TABLET_LEGACY_COORDINATES=1 kontact
Problem appears resolved.

So, I used Application Launcher > Edit Applications to edit the launch commands for KMail and Kontact so that they are preceded with "QT_XCB_TABLET_LEGACY_COORDINATES=1" as shown above.

So, now when KMail or Kontact are started from a panel icon, or an icon in the Application Launcher, the problem persists.

And

When KMail or Kontact are launched from KRunner, the problem appears resolved.

I REALLY don't want to use KRunner every time to start KMail or Kontact.  I want to be able to start KMail and Kontact from a panel icon as I have for 15+ years.
Comment 6 Markus 2020-07-10 09:21:21 UTC
After having used Application Launcher > Edit Applications to edit the launch commands for KMail and Kontact so that they are preceded with "QT_XCB_TABLET_LEGACY_COORDINATES=1" as shown above, I launched Kontact from KRunner, logged out, logged back in and let the session manager start Kontact.  The problem persists.
Comment 7 kde 2023-03-24 09:40:09 UTC
I was just going to file a new bug when I found this one. I have a similar problem, but can extend it:

- For me it only happens when the display scaling factor is not 100%, e.g. with 125%. Is it the same for you?
- But then it happens in all KDE applications, not only KMail. I can see it in Konsole, Kate, Dolphin and many more, so it seems to be a platform problem, not an application problem.
- It still happens with openSUSE Tumbleweed using KDE Plasma 5.27.3 and Frameworks 5.104.0.
- The offset depends on the position of the application on the screen and is small when it is in the upper left corner and gets larger when it is in the lower right corner.

Can you confirm this in your setup?

Added an attachment showing this on Kate. The cursor should be at the end of the selection area, but it is somewhere in the middle.
Comment 8 kde 2023-03-24 09:41:15 UTC
Created attachment 157544 [details]
Kate with selected text showing offset between cursor and selected area
Comment 9 dmatteo002 2023-04-29 09:34:10 UTC
(In reply to kde from comment #7)
> - For me it only happens when the display scaling factor is not 100%, e.g.
> with 125%. Is it the same for you?
> - But then it happens in all KDE applications, not only KMail. I can see it
> in Konsole, Kate, Dolphin and many more, so it seems to be a platform
> problem, not an application problem.
> - It still happens with openSUSE Tumbleweed using KDE Plasma 5.27.3 and
> Frameworks 5.104.0.
> - The offset depends on the position of the application on the screen and is
> small when it is in the upper left corner and gets larger when it is in the
> lower right corner.
> 
> Can you confirm this in your setup?
Can reproduce all of what you described in Arch with KDE Plasma 5.27.4. So it seem a problem with a KDE application (that doesn't happen in firefox, xournal++ for examples) with scaling in X11. Possibly multiplying for the scaling factor an already scaled cursor position.