Commit 6bdfea6d authored by David Edmundson's avatar David Edmundson

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
parent 2cc42ecc
......@@ -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(),
......
Markdown is supported
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