Commit graph

18731 commits

Author SHA1 Message Date
Ismael Asensio
bf7e7b2130 kwinrules: Improvements on Detect Properties button
Slight UX and code improvents:

- Disable the detection button when property sheet is open.

- Add a minimum limit (smallDuration) to the delay before detecting
a window. Otherwise we freeze the window before even showing the
button release feedback, which can feel unexpected

- Prefer Q_INVOKABLE over public slot to expose method to QML
2020-11-13 20:18:04 +01:00
Vlad Zahorodnii
f26eeb9706 Use consistent naming for begin/end frame hooks
Currently, the OpenGLBackend and the QPainterBackend have hooks to
indicate the start and the end of compositing cycle, but in both cases,
the hooks have different names. This change fixes that inconsistency.
2020-11-12 09:14:57 +02:00
Vlad Zahorodnii
76303888ab Unify begin/end frame hooks in OpenGLBackend 2020-11-12 09:14:54 +02:00
Vlad Zahorodnii
81abc341d7 Remove assert in Compositor::aboutToSwapBuffers()
The purpose of Compositor::aboutToSwapBuffers() is notify the compositor
about a pending buffer. It's totally safe to call it multiple times if you
have multiple outputs. Ideally, it should also take an AbstractOutput or
screen id, but with the introduction of render loops per each output, we
won't need Compositor::aboutToSwapBuffers(). So, for the time being, this
change drops the annoying assert to make necessary per screen rendering
related refactorings easier to perform.
2020-11-11 22:03:45 +02:00
Vlad Zahorodnii
755dd81e49 Refactor how per screen rendering is handled
In order to allow per screen rendering, we need the Compositor to be
able to drive rendering on each screen. Currently, it's not possible
because Scene::paint() paints all screen.

With this change, the Compositor will be able to ask the Scene to paint
only a screen with the specific id.
2020-11-11 22:03:45 +02:00
Konrad Materka
d2f3372749 Fix Connections warnings
Qt 5.15 introduced new syntax for defining Connections. Fix warnings like this one:
QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
2020-11-11 19:22:40 +00:00
Vlad Zahorodnii
7cab8cf8bb Make Scene::qpainterRenderBuffer() take a screen id 2020-11-11 07:22:10 +00:00
Vlad Zahorodnii
94b731c196 Prepare QPainter render backend for per screen rendering 2020-11-11 07:22:10 +00:00
Vlad Zahorodnii
edfb0a3fd9 Drop support for X11 overlay windows in QPainter render backend
It's unused.
2020-11-11 07:22:10 +00:00
Vlad Zahorodnii
e4861c28a7 scenes/qpainter: Drop support for Xinerama-style rendering
All platforms that provide support for the QPainter render backend use
per screen rendering. Since there is no any way to test Xinerama-style
rendering, it's better to drop the dead code.
2020-11-11 07:22:10 +00:00
Marco Martin
f64bea0f68 move decorations kcm to appearance
the application style category doesn't exist anymore
2020-11-10 14:03:36 +00:00
Aleix Pol
8ba6006a1b startupfeedback: Prefer using smart pointers to raw
Better security and less boilerplate.
2020-11-10 12:12:27 +00:00
Aleix Pol
4d549d76be startupfeedback: Don't use a lambda unnecessarily 2020-11-10 12:12:27 +00:00
Aleix Pol
35fe4fa7c1 startupfeedback: Properly check if a vector is empty 2020-11-10 12:12:27 +00:00
Niccolò Venerandi
6af6a942e9 Raise blur strenght 2020-11-10 10:14:06 +00:00
Vlad Zahorodnii
e398a7cd1a Drop Toplevel::windowId()
A window id generated by WaylandServer may reference an X11 window
with the same id, which can result in undefined behavior.

The main reason why we needed windowId() was because of the task
switcher. However, since tabbox uses internal ids now, the window id
property can be dropped.
2020-11-10 09:58:07 +00:00
Jonathan Marten
6d7e8fc8a5 Fix for Clang: clockskewnotifierengine_linux.cpp needs <cerrno>
GCC doesn't seem to mind, but Clang complains that 'errno' is not
defined.
2020-11-09 09:51:45 +00:00
Nicolas Fella
37ba0404c8 [kcms/effectsmodel] Add config module role to effectsmodel and use it to open config
For builtin effects the information comes from the EffectData struct.
For plugin effects the X-KDE-ConfigModule key is read from the plugin metadata.
For plugins that do not yet make use of it we fall back to the old way.
For scripted effects this is empty since the config is loaded in a different way.
2020-11-08 13:36:32 +00:00
Nicolas Fella
49ed0361fd Add config module information to builtin effects
Add a new field to EffectData that stores an effect's config module.

We currently determine an effect's configModule using KPluginTrader and the X-KDE-ParentComponents metadata.
IMO it's much more straight forward to let the effect specify its config module directly instead.
2020-11-08 13:36:32 +00:00
Nicolas Fella
648f495830 Add missing includes
It worked until now because they were included transitively
2020-11-08 13:36:32 +00:00
l10n daemon script
2be28ac65a 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"
2020-11-08 06:22:50 +01:00
Fabian Vogt
f790cca3fb Make kwin-5.21-desktop-grid-click-behavior.py use Python 3
python refers to python2, which is not desired.
kwin-5.18-move-animspeed.py already uses python3.
2020-11-07 12:00:45 +00:00
l10n daemon script
d830f41cc3 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"
2020-11-07 06:30:51 +01:00
Aleix Pol
a92ce693ec Restore empty filename check
Otherwise we could end up matching with a weird ".../.desktop" entry.

BUG: 427979
2020-11-07 03:17:35 +00:00
Aleix Pol
c59da1f4a5 Remove unnecessary include 2020-11-07 02:57:02 +01:00
Aleix Pol
d0939dee8b Prefer function pointer to slot string 2020-11-07 02:56:44 +01:00
Aleix Pol
cb7a3ec832 Remove unnecessary comparisons 2020-11-07 02:56:09 +01:00
l10n daemon script
77469151c5 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"
2020-11-06 06:24:08 +01:00
Vlad Zahorodnii
823e5b02ea Adjust tablet input stuff to kwayland-server changes 2020-11-05 07:09:57 +00:00
l10n daemon script
2dee622d82 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"
2020-11-05 06:36:15 +01:00
Nate Graham
b3e9c81953 [focuschain/task switcher] Add hidden option to govern repositioning minimized windows
Since some people apparently liked the old behavior of moving minimized
windows to the end of the focus chain, let's let them have it if they
set a hidden config option:

`MoveMinimizedWindowsToEndOfTabBoxFocusChain=true` in the `[TabBox]` group
of the kwinrc file.

We can add a UI for it later if needed.

BUG: 427840
FIXED-IN: 5.21
2020-11-04 16:16:29 +00:00
Nate Graham
75fded6f11 Revert "[focuschain/task switcher] Remove special handling for minimized windows"
This reverts commit cc862fa674.

It turns out that some people like this behavior and we've received
various user complaints about it.
2020-11-04 16:16:29 +00:00
Vlad Zahorodnii
54919a1633 Fix a typo 2020-11-04 17:38:28 +02:00
Vlad Zahorodnii
eab3062b32 scene: Fix generation of decoration quads for Deleted 2020-11-04 14:19:47 +00:00
Vlad Zahorodnii
c11da495f6 scene: Simplify decoration quad generation code 2020-11-04 14:19:47 +00:00
Vlad Zahorodnii
d91da41cef wayland: Fix binding of xwayland surfaces to windows
Surface ids are not unique across clients. If the underlying surface of
an XdgToplevelClient is replaced with an Xwayland's surface, you may see
weird results such as a desktop window having the contents of an X11
window or even worse a crash.

BUG: 428680
2020-11-04 15:35:37 +02:00
Vlad Zahorodnii
5926261505 Adjust kwin to pointer constraints changes in kws 2020-11-03 22:11:28 +02:00
Vlad Zahorodnii
a62a821389 wayland: Port kwin to new DragAndDropIcon type
The DragAndDropIcon type encapsulates the icon surface and its position.
2020-11-03 19:54:05 +00:00
Vlad Zahorodnii
94389de88d Adjust WaylandServer to pointer-gestures-v1 changes in kws 2020-11-03 19:48:41 +00:00
Vlad Zahorodnii
2123e9b541 Adjust input stack to relative-pointer-v1 changes in kws 2020-11-03 19:48:41 +00:00
Aleix Pol
69eb8789ba drm: Make sure the screens are turned on when we come from suspend
Listen to logind for resume notification and turn the outputs on when it
happens, much like we do when pressing a key.

This way laptops come back on when the lid opens.

BUG: 428424
2020-11-03 17:59:02 +00:00
Vlad Zahorodnii
1694b24fa6 Move some connects from Scene::addToplevel() to Window constructor 2020-11-03 14:56:36 +00:00
Vlad Zahorodnii
47ea0c98b1 scene: Stop monitoring changes for unmapped surfaces
Once the main surface has been unmapped, we are no longer interested in
any changes that indicate that the window quads cache should be discarded

This also fixes a bug where the scene holds a subsurface monitor object
even after the associated window has been destroyed.
2020-11-03 14:56:36 +00:00
David Edmundson
3d43f8ad93 Drop QGraphicsView classes in PaintData
QGraphicsRotation and Scale are QObject wrappers. It's not useful in
data structures where we're creating mulitple of these every frame. It's
large enough to appear in hotspot as taking over 1% of a regular frame.

We don't even use the QGraphicsRotation mapping inside scene for a
reason, so it's not giving us much.

It's technically an API break in libkwineffects. Pragamatically no-one
would use these. We also lose QGraphicsScale's origin, but we never
exposed this in PaintData's public header.
2020-11-03 13:19:47 +00:00
Gang Wu
28b6db4993 correct the surface id 2020-11-03 13:10:35 +00:00
David Redondo
1caf9f61d6 Disable bouncy cursor effect during ksplash
Since commit commits.kde.org/plasma-workspace/378309e666f52fc436c75648a9e6ad7d5dcbacdf
ksmserver sets a desktopname when restoring applications. This causes the effect
to draw above the splash windows while no cursor is visible.
2020-11-03 12:59:38 +00:00
Cyril Rossi
c61ba64a9c KCM KWin ScreenEdge and TouchScreenEdge use KCModuleData 2020-11-03 13:36:46 +01:00
Fang Tan
03a27a0081 The client may have closed itself here,will cause kwin to crash 2020-11-03 19:25:29 +08:00
Bhushan Shah
5e6c81eea0 effects/screenshot: fix the screenshot on GLES
We want to multiply the width/height by scale weather or not we are
using GLES or not, otherwise this will only provide part of screen when
used with e.g fullscreen screenshot.
2020-11-03 09:26:49 +00:00
Lewis Lakerink
00ce98b7a2 [scene] Fix segfault in KWin::WindowPixmap::shape (BUG: 426567) 2020-11-03 07:42:27 +00:00