Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.2
-
None
Description
In the constructor QKmsCursor::QKmsCursor() there is a call to gbm_bo_create with a hardcoded width/height of 64x64.
We have a unit with a hardware cursor of 128x128. On this unit showing a Qt cursor leads to artifacts similar to: https://www.libreoffice.org/bugzilla/attachment.cgi?id=100690
I don't know much about drm etc. but I have just followed the following change from an xorg driver:
http://cgit.freedesktop.org/xorg/driver/xf86-video-modesetting/commit/?id=677935b2d20f54f21c645b5eb386b6c9485fee5f
and came up with a patch to Qt (see attachment) which seems to solve the problem for us. For example with this patch at the above-mentioned unit the cursor size is automatically recognized as 128x128 and I see no artifacts, just the cursor (e.g. an arrow).
In this patch I do the following:
- if environment variables
QT_CURSOR_WIDTH
QT_CURSOR_HEIGHT
are set, then these values are used for cursor size (so if something goes
wrong with drmGetCap you can always set size manually);
- if they are not set, then I call the drmGetCap() call to get settings and
use these;
(it's probably not needed: but as an extra protection: if I get from drmGetCap a value smaller than 32 then I use 32 instead
- if QT_CURSOR_WIDTH/HEIGHT is not set, and drmGetCap() fails then default
value of 64 (as hardcoded in current qt sources) is used
Attachments
For Gerrit Dashboard: QTBUG-41477 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
95876,3 | kms: Support non-64x64 cursors | 5.4 | qt/qtbase | Status: MERGED | +2 | 0 |