Remove concept of resolution dependent cursors

Summary:
It's not a concept that makes sense with proper scaling.

Cursor should be the big if you chose a big size, small if you choose a small size,
regardless of what output it happens to be on.

Test Plan:
Set size to 0
Ran kwin
Cursor size was fine

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13607
This commit is contained in:
David Edmundson 2018-06-23 18:15:19 +01:00
parent 2cc42ecc12
commit 6bdfea6d2f

View file

@ -52,19 +52,8 @@ void WaylandCursorTheme::loadTheme()
Cursor *c = Cursor::self();
int size = c->themeSize();
if (size == 0) {
// resolution depended
// as we don't support per screen cursor sizes yet, we use the first screen
KWayland::Server::Display *display = waylandServer()->display();
auto output = display->outputs().first();
// calculate dots per inch, multiplied with magic constants
if (output->physicalSize().height()) {
size = qreal(output->pixelSize().height()) / (qreal(output->physicalSize().height()) * 0.0393701) * 16.0 / 72.0;
} else {
// use sensible default
size = 24;
}
connect(output, &KWayland::Server::OutputInterface::pixelSizeChanged, this, &WaylandCursorTheme::loadTheme, Qt::UniqueConnection);
connect(output, &KWayland::Server::OutputInterface::physicalSizeChanged, this, &WaylandCursorTheme::loadTheme, Qt::UniqueConnection);
//set a default size
size = 24;
}
auto theme = wl_cursor_theme_load(c->themeName().toUtf8().constData(),