From 6bdfea6d2f5a0891142231f21f8bd954423ae318 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Sat, 23 Jun 2018 18:15:19 +0100 Subject: [PATCH] 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 --- wayland_cursor_theme.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/wayland_cursor_theme.cpp b/wayland_cursor_theme.cpp index 680b2d4446..7a77533bbe 100644 --- a/wayland_cursor_theme.cpp +++ b/wayland_cursor_theme.cpp @@ -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(),