Commit b300229c authored by David Edmundson's avatar David Edmundson
Browse files

Don't scale resolution dependent cursor size twice

Summary:
If the env var is 0 we calculate the cursor size based on the
physical resolution.

The size is multiplied by the output scale.

Either would make sense, together does not and reuslts in kwin
having massive cursors.

This patch is for 5.13.

For master I intend to kill this concept of "resolution dependent size"
on the KCM. We then should do wayland scaling on cursors properly no matter
what size the user selects which will work better for when we have
multiple screens.

I have a WIP patch pending for the latter, but it's too big for here.
It still involves deleting this code.

Reviewers: #plasma, romangg

Reviewed By: #plasma, romangg

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13267
parent bed31e05
......@@ -63,9 +63,10 @@ void WaylandCursorTheme::loadTheme()
// use sensible default
size = 24;
}
size *= output->scale();
connect(output, &KWayland::Server::OutputInterface::scaleChanged, this, &WaylandCursorTheme::loadTheme, Qt::UniqueConnection);
connect(output, &KWayland::Server::OutputInterface::pixelSizeChanged, this, &WaylandCursorTheme::loadTheme, Qt::UniqueConnection);
connect(output, &KWayland::Server::OutputInterface::physicalSizeChanged, this, &WaylandCursorTheme::loadTheme, Qt::UniqueConnection);
}
auto theme = wl_cursor_theme_load(c->themeName().toUtf8().constData(),
size, m_shm->shm());
if (theme) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment