Test Plan:
Hovered over decoration
Looked super crystal clear
Same physical size as when I hover over window contents (which had a buffer scale of 1)
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: graesslin, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13608
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
Summary:
Instead of seeing the cursor <--> on the left edge you now see an icon
that looks like |<- .
This brings kwin decorations in line with GTK CSD icons.
In theory this is also useful to tell which window will resize in the
case of side-by-side windows (regardless of whether borders are on or
not). In practice with the adwaita icon theme I tested with it's not
very intuitive to realise which is which till you learn the icon.
Change is more involved than it should be as Qt::CursorShape doesn't
have these entries, and I don't want to shadow that enum internally or
have
to change kwin effect code.
Specifics depend on cursor icon theme if they are not present it will
fallback to the <--> icon. (Breeze does not have them currently)
Test Plan:
Resized some windows (on X and on Wayland)
Correct icon appeared on Adwaita
Existing icon appeared on Breeze
Reviewers: #plasma
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13396
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
Centralise resolution-dependent computation into the leaf cursor class.
Listen to scale changes and update the cursor when it happens
Reviewed by David Edmundson
Summary:
If the cursor theme failed to create KWin crashed due to an endless
recursion. There are two reasons for this fault:
1) When the physical size does not exist we perform a division by 0
which results in an invalid size going into wl_cursor_theme_load
2) We emit the signal that the cursor theme changed even if it didn't
change thus creating an endless recursion
This change addresses both problems: it checks that the size is not 0
and changes the handling for theme update to only destroy the previous
theme if the new theme could be created and only emits the signal if
things change.
BUG: 390314
FIXED-IN: 5.12.3
Test Plan: Added a new test case which crashed with old code
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10549
Summary:
The interactive window selection is implemented in InputRedirection
through a dedicated InputEventFilter. The InputEventFilter so far takes
care of pointer input and keyboard input. In addition it ensures that
keyboard and pointer focus is reset on start and on end.
With this change KillWindow now also works on Wayland, but only for X11
windows, as the Wayland variant is not yet implemented.
Test Plan: Tested in nested setup, auto-tests still needed
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D3365
The WaylandCursorTheme emits a signal whenever it reloads the theme.
This is used by CursorImage to clear the cache and reload decoration
and fallback cursor.
The theme doesn't load if we pass an incorrect size. This change
implements a resolution dependency size resolution inspired by the
one in Cursor::loadThemeSettings. Ideally this would be a size
different for each screen. As we don't have support for this yet, we
go for first screen.