TechDraw: Buggy Wayland custom cursors workaround (#16740)
* Gui: Minor polishing of cursor regression fix
* TD: Buggy Wayland custom cursors workaround
Until Qt v6.6 displaying custom cursors on Wayland is broken,
so add a workaround. See also QTBUG-95434.
Fix is the same as 094c1b10 ("Gui: Buggy Wayland custom cursors workaround")
plus subsequent fixes.
This commit is contained in:
@@ -656,11 +656,10 @@ static QCursor createCursor(QBitmap &bitmap, QBitmap &mask, int hotX, int hotY,
|
||||
Q_UNUSED(dpr)
|
||||
#endif
|
||||
#ifdef HAS_QTBUG_95434
|
||||
QPixmap pixmap;
|
||||
if (qGuiApp->platformName() == QLatin1String("wayland")) {
|
||||
QImage img = bitmap.toImage();
|
||||
img.convertTo(QImage::Format_ARGB32);
|
||||
pixmap = QPixmap::fromImage(img);
|
||||
QPixmap pixmap = QPixmap::fromImage(img);
|
||||
pixmap.setMask(mask);
|
||||
return QCursor(pixmap, hotX, hotY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user