Revert "cursorsource: fix scaling with Xwayland"
This reverts commit 81571203f1
.
This commit is contained in:
parent
0edf264947
commit
f286c311d5
1 changed files with 1 additions and 6 deletions
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
#include "cursorsource.h"
|
#include "cursorsource.h"
|
||||||
#include "cursor.h"
|
#include "cursor.h"
|
||||||
#include "wayland/clientconnection.h"
|
|
||||||
#include "wayland/shmclientbuffer.h"
|
#include "wayland/shmclientbuffer.h"
|
||||||
#include "wayland/surface_interface.h"
|
#include "wayland/surface_interface.h"
|
||||||
|
|
||||||
|
@ -144,10 +143,6 @@ void SurfaceCursorSource::update(KWaylandServer::SurfaceInterface *surface, cons
|
||||||
m_hotspot = QPointF();
|
m_hotspot = QPointF();
|
||||||
m_surface = nullptr;
|
m_surface = nullptr;
|
||||||
} else {
|
} else {
|
||||||
// TODO Plasma 6: once Xwayland cursor scaling can be done correctly, remove this
|
|
||||||
// scaling is intentionally applied "wrong" here to make the cursor stay a consistent size even with un-scaled Xwayland:
|
|
||||||
// - the device pixel ratio of the image is not multiplied by scaleOverride
|
|
||||||
// - the surface size is scaled up with scaleOverride, to un-do the scaling done elsewhere
|
|
||||||
auto buffer = qobject_cast<KWaylandServer::ShmClientBuffer *>(surface->buffer());
|
auto buffer = qobject_cast<KWaylandServer::ShmClientBuffer *>(surface->buffer());
|
||||||
if (buffer) {
|
if (buffer) {
|
||||||
m_image = buffer->data().copy();
|
m_image = buffer->data().copy();
|
||||||
|
@ -155,7 +150,7 @@ void SurfaceCursorSource::update(KWaylandServer::SurfaceInterface *surface, cons
|
||||||
} else {
|
} else {
|
||||||
m_image = QImage();
|
m_image = QImage();
|
||||||
}
|
}
|
||||||
m_size = surface->size() * surface->client()->scaleOverride();
|
m_size = surface->size();
|
||||||
m_hotspot = hotspot;
|
m_hotspot = hotspot;
|
||||||
m_surface = surface;
|
m_surface = surface;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue