Commit graph

20208 commits

Author SHA1 Message Date
Vlad Zahorodnii
da6fbec424 Notify IdleInterface about user activity explicitly
In some cases, kwin may not forward input events to SeatInterface, which
can false trigger idle detection in IdleInterface.
2021-10-28 05:55:59 +00:00
Xaver Hugl
1626d7a51a platforms/drm: only use glDrawBuffer with desktop GL
That function is not available with GLES, and calling it is only necessary
for NVidia.
2021-10-27 11:49:00 +02:00
Kristen McWilliam
a7b833f319 Add class comment for Toplevel
A simple class comment to give the reader an idea what this is for.
2021-10-27 06:05:54 +00:00
Vlad Zahorodnii
9adb5eed02 Use a generic mechanism to watch input device properties
This reduces code duplication and provides a generic way to monitor all
relevant input device properties.
2021-10-27 05:59:49 +00:00
l10n daemon script
f15e6806f3 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-10-27 01:22:49 +00:00
Andrey Butirsky
be35ef6a9a [keyboard kcm] fix lost Locks state on keymap reconfigure
Fixes Num/Caps Locks (do we need Scroll also?)

BUG: 443739
2021-10-26 15:48:43 +00:00
Xaver Hugl
206689874f effects/overview: center drag hotspot 2021-10-26 14:33:35 +02:00
Vlad Zahorodnii
22eb154fa0 platforms/wayland: Allow resizing outputs 2021-10-26 13:31:36 +03:00
David Redondo
60c3b3ddfa Add support for hold gestures 2021-10-26 08:16:52 +00:00
Aleix Pol
1330376220 screencast: Support the creation of virtual displays to cast
In case the user has just the one display but they don't want to show it
in their main workspace when sharing video, allow creating a virtual
display.
This also will allow using remote devices as support displays.
2021-10-25 19:43:41 +02:00
Andrey Butirsky
4395caa256 [wayland] fix ignored keyboard RepeatRate
X11 can take float RepeatRate, Wayland - int only so the setting is to be
rounded.
Should be indistinguishable on usual rates.

BUG: 443721
2021-10-25 14:04:33 +00:00
Vlad Zahorodnii
fda7e150df kwineffects: Fix destruction of s_fbo with shared GLTexture objects
The WindowThumbnail item uses the GLTexture class. In order to destroy
the thumbnail texture, the item will schedule a destroy job.

This means that the GLTexture can be alive during or after graphics
reset.

On the other hand, as an implementation detail, GLTexture::clear() may
allocate a framebuffer object, which is going to be destroyed together
with the last texture.

Given that window thumbnail textures can be still alive after a graphics
reset and the fact that GLTexturePrivate::s_fbo gets destroyed when the
last texture is destroyed, kwin can end up trying to clear a decoration
texture with now defunct s_fbo.

Since the old old s_fbo is inert, the glBindFramebuffer() function will
fail and the glClear() operation will affect the default framebuffer,
thus leading to black flickering visual artifacts.

In order to fix that issue, this change makes GLTexture destroy s_fbo
unconditionally in GLTexturePrivate::cleanup() which is called whenever
OpenGL stuff is about to tear down, e.g. due to graphics reset, etc.

BUG: 443951
2021-10-25 13:00:55 +03:00
Vlad Zahorodnii
bd3d275293 wayland: Port away from deprecated legacy virtual desktop api in plasma window management 2021-10-25 06:35:35 +00:00
Nate Graham
4605fdcaa5 effects/overview: Give the "Delete desktop" button a tooltip
Icons-only buttons always need tooltips, even when they use a completely
recognizable icon.
2021-10-24 12:20:09 -06:00
Nate Graham
6d7d8ea699 effects/overview: only show "Delete desktop" button with >1 desktop
It doesn't make sense to let the user try to delete their only desktop.
2021-10-24 12:20:09 -06:00
Xaver Hugl
ca58ee875f WaylandOutput: schedule update on mode change
Without this there can be a mismatch between what clients expect and what
KWin actually uses, causing for example stutter in video players.

BUG: 444303
FIXED-IN: 5.23.2
2021-10-24 14:01:52 +02:00
l10n daemon script
839293f987 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-10-24 01:16:44 +00:00
Vlad Zahorodnii
99b38096ca platforms/drm: Fix a typo in DrmCrtc::setLegacyCursor()
bufferDirty should be reset so the legacy cursor is set after switching
between VTs or turning outputs back on.
2021-10-23 16:56:20 +00:00
l10n daemon script
0c6bf857be SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-10-23 01:16:55 +00:00
Xaver Hugl
49afd18018 platforms/drm: fix direct scanout check 2021-10-22 15:49:30 +02:00
David Edmundson
566bfbff5b Fix focus loss on decoration destruction
InputDeviceHandler keeps track of which client has focus, and whether
the decoration or main window has focus.

Should the decoration get destroyed whilst the decoration has focus we
don't update correctly. This can happen when
"BorderlessMaximizedWindows" is set, or if you use key presses whilst
above the decoration.

cleanupDecoration (which is an odd name) is called whenever a decoration
gains or loses focus. Here we can connect for the decoration destruction
and force a focus change.

BUG: 411884
2021-10-22 09:47:28 +00:00
Andrey Butirsky
e4e920d895 [testBorderlessMaximizedWindow] add touch to the test
BUG: 411884
2021-10-22 09:47:28 +00:00
Andrey Butirsky
83ece2e2a8 unit test for focusing loss problem on maximize
BUG: 411884
2021-10-22 09:47:28 +00:00
Vlad Zahorodnii
252ba9e005 autotests: Use less Screens::size(int)
The same info can be retrieved from AbstractOutput::geometry().size().
2021-10-22 09:15:48 +00:00
Vlad Zahorodnii
15520888d9 kwineffects: Drop numScreens property
The screen count can be retrieved by checking the number of items in the
EffectHandler.screens property.

The replacement for the numberScreensChanged signal are the screenAdded
and the screenRemoved signals.

The main motivation behind this change is to clean up the screens api
and reduce the number of usages of the Screens class.
2021-10-22 09:14:52 +00:00
Xaver Hugl
0c7d97853e input: fix crash on touch quicktile
If the filter filters out touchDown it also has to always filter out the
matching touchUp
2021-10-22 09:08:27 +00:00
Vlad Zahorodnii
1a10718f6c Remove unused stuff in Screens 2021-10-22 08:29:57 +00:00
l10n daemon script
a04a134a7a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-10-22 01:20:47 +00:00
Vlad Zahorodnii
c7c63ba269 effects/overview: Allow blurring desktop background
This puts more emphasis on windows and less on desktop background.
2021-10-21 08:49:40 +00:00
Vlad Zahorodnii
baf05ec4a5 Rename PlatformSurfaceTexture to SurfaceTexture
This is, primarily, to make naming consistent with SurfaceItem,
SurfacePixmap and just "Surface" in the future.
2021-10-21 10:21:56 +03:00
Vlad Zahorodnii
ce2fc670c4 effects/overview: Add desktop bar
This provides a way to create, destroy, and rename virtual desktops in
the overview effect as well as switch between desktops.

The mechanics of switching between virtual desktops can be revisited
later though.
2021-10-21 06:27:03 +00:00
Vlad Zahorodnii
d73610d6d6 scripting: Introduce VirtualDesktopModel
This can be useful for QML scripts that deal with virtual desktops.

The virtual desktop model keeps a copy of virtual desktop objects to
avoid hitting asserts in QAbstractItemModel (it has some asserts to
ensure that indices passed to beginInsertRows() or beginRemoveRows()
make sense).
2021-10-21 06:27:03 +00:00
l10n daemon script
2e56b718ea SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-10-21 01:16:09 +00:00
Méven Car
6d518e8ffe DRM Backend: Add some log trace for DrmConnector
CCBUG: 442980
2021-10-20 15:33:37 +00:00
Vlad Zahorodnii
6851996eb2 effects: Make effects responsible for handling skipsCloseAnimation flag
This allows to make painting code more generic.
2021-10-20 13:48:38 +00:00
Vlad Zahorodnii
701902fbec effects: Port effects from int screens ids to EffectScreen
EffectScreen objects are better as they are more stable and we avoid int
screen ids in kwin core.
2021-10-20 12:09:09 +00:00
Aleix Pol
c1a4414c42 drm: Do not call the egl backend pointer when it's null
It can be null, that's why we are also checking it down in the same
function.
2021-10-20 11:46:53 +00:00
Xaver Hugl
baebaa9eb4 platforms/drm: fix init with explicit modifiers
When we're adding the output to the EglGbmBackend pipelines aren't necessarily
setup yet and are thus missing the modifier list. As creating the gbm surface
immediately is useless anyways, delay that until we need it, where the modifier
list is available.
2021-10-20 10:54:24 +00:00
Xaver Hugl
ebaf2e61fc platforms/drm: allow overriding eglstream choice
Add a new environment variable KWIN_DRM_FORCE_EGL_STREAMS that, when set
to an integer value other than 0, makes KWin prefer EglStreams over gbm.
2021-10-20 10:54:24 +00:00
Xaver Hugl
d257850bd1 platforms/drm: set draw buffer for gbm 2021-10-20 10:54:24 +00:00
Xaver Hugl
dc56b03df4 platforms/drm: use gbm with NVidia driver 495+ 2021-10-20 10:54:24 +00:00
Xaver Hugl
866830d5ed platforms/drm: refactor output enablement 2021-10-20 11:39:05 +02:00
Alexander Lohnau
9dc6fd35db
GIT_SILENT Revert accidental change 2021-10-20 07:03:26 +02:00
l10n daemon script
2a3ec321a1 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-10-20 01:18:02 +00:00
Alexander Lohnau
dffbfcc9f7
Fully port away from KPluginLoader 2021-10-19 21:39:51 +02:00
Alexander Lohnau
e431b453b6
Port away from KPluginLoader::findPlugins 2021-10-19 21:19:23 +02:00
Nate Graham
6c2834cc8a decorations: small refactor for decorationpalette.cpp
Handle header color schemes first since the code is smaller for that
block, which makes things more readable.
2021-10-19 07:20:02 -06:00
Nate Graham
00ade26624 decorations: when color scheme has no Header colors, don't ask for them
First we check to see if the color scheme has header colors, and if it
doesn't, we turn around and ask for them anyway, relying on implicit
behavior in kcolorscheme that falls back to Window colors when Header
colors are requested but are not present. Instead, let's just ask for
Window colors to avoid the run-around and stop relying on implicit
behavior.
2021-10-19 07:16:58 -06:00
Vlad Zahorodnii
483ef644df Fix build 2021-10-19 12:56:58 +03:00
Vlad Zahorodnii
7d3bce21a1 plugins/idletime: Fix processing of user activity
Currently, idle timers are not restarted on user input which triggers
the lockscreen even though the user is active at computer.

This change fixes that by making sure that idle timers are restarted
whenever SeatInterface's timestamp changes, i.e. user moves the pointer
or presses a key, etc.
2021-10-19 09:55:22 +00:00