Commit graph

20269 commits

Author SHA1 Message Date
Xaver Hugl
e1942cfa41 qpainter: remove outdated comment 2021-11-08 14:19:05 +00:00
Xaver Hugl
c01c15f241 AbstractClient: split up hideClient into hide and show
This makes the purpose of the method call more clear
2021-11-08 14:19:05 +00:00
Xaver Hugl
f522540e33 AbstractClient: remove placeIn
The method was only there to set the geometry restore. Instead, call on
Placement directly
2021-11-08 14:19:05 +00:00
Aleix Pol
b44f33c7ed DecorationItem: Prevent crash
We are calling a QPointer without checking it first.
2021-11-08 13:35:03 +00:00
Vlad Zahorodnii
0eb56fff6e kwineffects: Remove ShaderManager::selfTest()
It has been disabled with Mesa for almost half a decade due to false
positives and even if it weren't disabled, it contributes to the startup
time.

The commit message that added the self test doesn't explain why it was
added, but if it was added to detect unstable drivers, it's not worth it.
2021-11-08 10:29:51 +00:00
Vlad Zahorodnii
aead97c39f Move scenes to the src directory
Similar to the backends, it's far more intuitive to have scenes in the
toplevel source directory rather than the plugins directory.
2021-11-08 10:22:07 +00:00
Kristen McWilliam
efa08b1f30 helpers/wayland_wrapper: Move crash increment to not count restarts
The current behaviour has the crash counter immediately incremented
to 1 after a restart, this change has it set to 0 as expected.
2021-11-08 08:45:39 +00:00
Andrey Butirsky
43aec9ca18 fixup! [wayland] fix ignored keyboard RepeatRate
Ceiling so that it repeats on minimal 0.x rates accessible via UI

BUG: 443721
2021-11-08 10:37:51 +02:00
Vlad Zahorodnii
2fd93e329a scenes/opengl: Stop pushing map shader in SceneOpenGL constructor
KWin can work just fine even without an initially pushed MapTexture
shader. This simplifies the initialization of the SceneOpenGL.
2021-11-08 08:32:45 +00:00
Vlad Zahorodnii
350144cde6 scenes/opengl: Remove viewport check
It's unreliable and it sometimes produces false positives (due to buggy
drivers).
2021-11-08 08:32:45 +00:00
Vlad Zahorodnii
1cf1703dec scenes/opengl: Remove Mesa 10 check
Mesa 10 is a really old driver.
2021-11-08 08:32:45 +00:00
Kristen McWilliam
2a531847c7 dbusinterface: Add doc comment for replace() method
Replace can be in reference to anything, this should definitely
help to provide better context.
2021-11-08 08:31:01 +00:00
Xaver Hugl
75863454a0 RenderLoop: restrict repaint scheduling with fullscreen windows
With an opaque fullscreen window we can be sure that items under it don't
actually require us to repaint. This should yield some small efficiency
improvements and resolves stutter with adaptive sync.

BUG: 443872
FIXED-IN: 5.23.3
2021-11-07 00:41:38 +01:00
l10n daemon script
84a5c7b314 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-11-04 01:18:07 +00:00
Vlad Zahorodnii
22b7ac02b4 scripts/minimizeall: Try to preserve last active window
Windows in workspace.clientList() are sorted in the map order. This
means that the minimize all script will try to activate the last mapped
window when unminimizing windows, which is a bit annoying.

This change ensures that the minimize all script doesn't activate wrong
window by minimizing and unminimizing windows in the stacking order.
It's not a bullet-proof solution though, but it should produce good
enough results.
2021-11-03 16:48:27 +00:00
Vlad Zahorodnii
89067ff9db scenes/opengl: Remove backend failed check
If the backend has failed to initialize, the constructor won't run.
2021-11-03 16:47:55 +00:00
Vlad Zahorodnii
0f6f4ee624 scenes/opengl: Merge SceneOpenGL and SceneOpenGL2
There's no OpenGL 1 renderer anymore so we can have only one scene
class now.
2021-11-03 16:47:55 +00:00
Fushan Wen
2d93b625e2 effects/overview: Always show the delete button when tablet mode is on
It's very difficult for touch screen users to discover the delete
button,  so make the delete button always visible when tablet mode
is on.
2021-11-03 16:30:24 +00:00
Fushan Wen
f4ca7a43c1 effects/overview: Give the editor of desktop name a background
Show background to indicate the name of a virtual desktop is being edited.
2021-11-03 16:08:34 +00:00
Fushan Wen
61f7b2e499 effects/overview: Save desktop name when the text field loses focus
Replace onAccepted with onEditingFinished.
2021-11-03 16:07:47 +00:00
Aleix Pol
f0f2f0f469 screencast: Support reporting damage regions 2021-11-03 13:23:42 +00:00
Aleix Pol
76d53a0ce7 screencast: No need to describe the cursor while it's outside the viewport 2021-11-03 13:23:42 +00:00
Aleix Pol
d054b12123 screencast: Skip frames with no damage
Instead of issuing a full redraw. We'll be calling outputChanged when
uploading to drm, there's no need to stream that as well.
2021-11-03 13:23:42 +00:00
Andy Gebauer
f7bd6ef6c1 Update layers.cpp to compile with clang + libcxx 2021-11-03 06:29:57 +00:00
Vlad Zahorodnii
3eb5fa18fb backends/x11: Remove unused KWaylandServer includes 2021-11-02 11:40:30 +02:00
Vlad Zahorodnii
2870e4295b backends/wayland: Remove unused KWaylandServer includes 2021-11-02 11:39:37 +02:00
Vlad Zahorodnii
d89501a079 Move platform backends to backends directory
This improves file organization in kwin by putting backends in a single
directory.

It also makes easier to discover kwin's low level components for new
contributors because the plugins directory may come as the last place to
look for. When one hears "plugin", the first thing that comes to mind is
regular plugins, not low level backends.
2021-11-02 09:02:41 +00:00
Kristen McWilliam
ab09fdf0b2 dbusinterface: add doc comment for queryWindowInfo()
Adds a simple doc comment to explain what the method does.
2021-11-01 12:24:32 -04:00
Vlad Zahorodnii
94de28bfbe Move input backends in their own directory 2021-11-01 16:27:16 +02:00
Vlad Zahorodnii
9fc2f04c75 platforms/virtual: Port to InputDevice 2021-11-01 16:27:16 +02:00
Vlad Zahorodnii
69bca8cf71 platforms/wayland: Port to InputDevice
This ports the nested wayland platform plugin to the InputDevice
abstractions.

Some global handling logic has been simplified to make porting more
straightforward.
2021-11-01 16:27:16 +02:00
Vlad Zahorodnii
6c0b5be99d platforms/x11: Port to InputDevice and InputBackend 2021-11-01 16:27:16 +02:00
Vlad Zahorodnii
7f72e5627e wayland: Port fake input integration to InputDevice
This ensures that the cursor will be properly shown/hidden when a fake
pointer is added on a system with no physical pointer connected.
2021-11-01 16:27:16 +02:00
Vlad Zahorodnii
ef72bae42f Introduce base InputDevice class
The main motivation behind this change is to prepare input abstractions
for virtual input devices so the wl_seat can properly advertise caps or
the cursor getting properly mapped/unmapped when a fake pointer is
added/removed on a system without a hardware mouse connected.

With this, there are three abstractions - InputDevice, InputBackend, and
InputRedirection.

An InputDevice represents an input device such as a mouse, a keyboard, a
tablet, etc. The InputBackend class notifies the InputRedirection about
(dis-)connected devices. The InputRedirection manages the input devices.

Such design allows to unify the event flow for real and virtual input
devices.

There can be several input backends active. For example, the libinput
backend and an input backend that provides virtual input devices, e.g.
libeis or org_kde_kwin_fake_input.
2021-11-01 16:27:16 +02:00
Xaver Hugl
4206046f12 Re-enable proper gamma ramps with AMS
Instead of downgrading everyone else to legacy gamma, only exclude
the huge and buggy gamma ramp of Intel TIgerLake hardware.
2021-11-01 14:38:27 +01:00
Vlad Zahorodnii
eb62728f1f effects/slidingpopups: Reload slide data after restarting compositing
Otherwise some plasma popups may stop sliding after restarting
compositing.

CCBUG: 443711
2021-11-01 10:58:35 +02:00
Vlad Zahorodnii
4a62716bbb autotests: Fix TestXdgShellClientRules 2021-10-31 22:22:29 +02:00
Vlad Zahorodnii
73949dba91 autotests: Fix MoveResizeWindowTest 2021-10-31 22:22:17 +02:00
Vlad Zahorodnii
26e185a6e3 autotests: Fix QuickTilingTest 2021-10-31 22:22:01 +02:00
Vlad Zahorodnii
f70c745ac0 Fix placement of windows on disconnected outputs
If an output is disconnected, the Workspace will update the
Toplevel.output property for all windows that are on that output, then
it will call AbstractClient::checkWorkspacePosition() to fix window
position.

That may result in some windows partially sticking outside visible area
because AbstractClient::checkWorkspacePosition() has no idea what output
the window was.

This change addresses that problem by delaying updating the
Toplevel.output property so AbstractClient::checkWorkspacePosition()
could pick better window placement.
2021-10-31 18:20:12 +00:00
l10n daemon script
954151ca97 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-31 01:14:25 +00:00
Vlad Zahorodnii
cd018b6ba3 effects/screenshot: Add org.kde.KWin.ScreenShot2.CaptureActiveScreen
The new method can be used to implement the "Current Screen" capture
mode in Spectacle.
2021-10-30 20:50:33 +00:00
Vlad Zahorodnii
d1b2a0e4d4 effects: Fix blur and background contrast metadata
The role of enabledByDefaultMethod was misinterpreted. It exists only
for kcms so they can display undetermined state. EnabledByDefault should
still be set to a valid value.
2021-10-30 23:41:13 +03:00
Vlad Zahorodnii
218db74000 Remove a GeometryUpdatesBlocker in AbstractClient::checkWorkspacePosition()
It was added to work around an async geometry issue on Wayland, which is
no longer actual.
2021-10-30 14:02:32 +00:00
Vlad Zahorodnii
4928f4db5b Try to preserve window position relative to their outputs during hotplug
Currently, if an output is hotplugged, all windows will be scrambled,
which is highly annoying.

With this change, windows will stick to their outputs if an output has
been connected or disconnected.

BUG: 296673
BUG: 378896
BUG: 412703
BUG: 443698
2021-10-30 14:02:32 +00:00
Vlad Zahorodnii
ee41e9b6e7 Fix Workspace::inUpdateClientArea() with auto-hide panels
If there's an auto-hide panel, m_oldRestrictedAreas will be empty, which
will break AbstractClient::checkWorkspacePosition().
2021-10-30 14:02:32 +00:00
Vlad Zahorodnii
6faf4ec3a2 Make mapping between outputs and cached screen geometries in Workspace robust
Integer screen ids are not robust. On the other hand, AbstractOutput
does not change if an output has been connected or disconnected.
2021-10-30 14:02:32 +00:00
Vlad Zahorodnii
bb687ff6f1 Stop abusing AbstractClient::geometryRestore()
Currently, AbstractClient::geometryRestore() is abused to put windows
back on their original screen. It makes window placement more complex
and it breaks restoring initially maximized windows.
2021-10-30 14:02:32 +00:00
l10n daemon script
d4b030b920 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-30 01:19:35 +00:00
ivan tkachenko
4a07bab27d
Don't put a trailing dot in set_package_properties
It looks weird given the kind of visualization where this text is
displayed.

Bad:

 * XKB (required version >= 0.5.0), XKB API common to servers and clients., <http://xkbcommon.org>

Good:

 * XKB (required version >= 0.5.0), XKB API common to servers and clients, <http://xkbcommon.org>
2021-10-30 01:51:40 +03:00