Commit graph

24269 commits

Author SHA1 Message Date
l10n daemon script
73c58d6fb9 GIT_SILENT Sync po/docbooks with svn 2023-03-08 02:47:33 +00:00
Xaver Hugl
f2417a8523 backends/drm: support CTM for simple color transformations
In order to work around hardware and drivers that aren't capable of applying
a LUT, calculate a per-channel factor for brightness and color temperature
modification. While this ignores color calibration, this makes night color
work until a proper shader based color pipeline is implemented.

BUG: 455720
2023-03-07 17:03:40 +01:00
Vlad Zahorodnii
f4a35ed619 libkwineffects: Remove window tabbing leftovers 2023-03-07 14:46:45 +00:00
Vlad Zahorodnii
c0ff9526f9 Remove leftover from old times in PopupInputFilter
The windowShown connection is leftover from the times when kwin used to
not destroy the window object if the associated wl_surface has been
unmapped.
2023-03-07 14:15:18 +00:00
Vlad Zahorodnii
9ed1f28d0f scripting: Drop registerShortcut() function in QML API
Use ShortcutHandler type instead.
2023-03-07 13:57:38 +00:00
Vlad Zahorodnii
c121253d10 scripting: Introduce ShortcutHandler
The ShortcutHandler type provides scripts QML idiomatic way to register
global shortcuts.

There's one caveat about this API though. Since KGlobalAccel does not
allow to change the shortcut by repeating KGlobalAccel::setShortcut(),
the ShortcutHandler requires the default shortcut to be set before it's
constructed.
2023-03-07 13:57:38 +00:00
Vlad Zahorodnii
c191902026 wayland: Setup compositing when window is mapped ready for painting
This prevents creating a WindowItem until we know that the window is
actually going to be visible on the screen.
2023-03-07 13:44:03 +00:00
Vlad Zahorodnii
5cd99b27fd Apply 1 suggestion(s) to 1 file(s) 2023-03-07 13:23:52 +00:00
Xaver Hugl
ca78157a2d Apply 2 suggestion(s) to 1 file(s) 2023-03-07 13:23:52 +00:00
Vlad Zahorodnii
42e05def40 effects/screenshot: Port to QPromise
QFutureInterface is technically internal Qt API and the screenshot uses
it solely because we knew that there won't be any future Qt 5 releases
and it won't be removed in 5.15 patch releases.

In Qt 6, we have proper public API. Unlike QFutureInterface, QPromise is
not copyable, therefore this change also ports some parts of the screenshot
effect from QVector, which uses copy-on-write, to std::vector.
2023-03-07 13:23:52 +00:00
Vlad Zahorodnii
51a8e486b4 Remove X11 specific properties
Scripts should not rely on X11 or Wayland specific properties, but
rather use common abstractions. So remove X11 window specific properties.
2023-03-07 13:06:06 +00:00
Vlad Zahorodnii
34f46be823 Remove window arg in Window::activitiesChanged signal
This change removes the window argument to make window signals more
consistent. If you need the window, either use QObject::sender() or
capture it using a lambda.
2023-03-07 12:38:43 +00:00
Vlad Zahorodnii
0c0605abb9 Merge Window::minimize and Window::unminimize
Code of Window::minimize() and Window::unminimize() is mostly the same
with the exception of some state checks, so merge the two to tidy the
code.
2023-03-07 12:20:07 +00:00
Aleix Pol
4bc8cd6c54 input: Make sure input backends are initialised when the workspace is set up
The outputs already present upon workspace setup wouldn't signal. This
was easily triggered running a standalone kwin session on a tty, it
would manifest with the touchscreen not working complaining that it
didn't have an output assigned yet.

BUG: 466721
2023-03-07 12:53:05 +01:00
Vlad Zahorodnii
9a4ca5ec2b Drop MoveMinimizedWindowsToEndOfTabBoxFocusChain
Use OrderMinimizedMode option in [TabBox] instead.
2023-03-07 10:02:32 +00:00
Vlad Zahorodnii
9720a6ee84 Remove window argument in Window's maximize signals
Either use QObject::sender() or capture the window using a lambda.
2023-03-07 10:31:25 +02:00
l10n daemon script
cd458d2f1e GIT_SILENT Sync po/docbooks with svn 2023-03-07 02:50:18 +00:00
Vlad Zahorodnii
abaf55b2c4 Remove window arg in Window::{buffer,client,frame}GeometryChanged signals
Remove the window argument to improve the consistency of the signals.
2023-03-06 17:30:27 +00:00
Ismael Asensio
7b187da12a Tabbox: Fix grouping windows by application
When grouping windows by app, the TabBox code uses the on-progress
client list as it is getting constructed to decided whether to add
a new window or not.

So instead of a local variable to construct the client list, let's
use a member one and expose it on the `clientList()` getter.

Amends commit: e89c09a62e
2023-03-06 14:36:43 +00:00
Vlad Zahorodnii
466799819f effects/screenshot: Remove unused KF6::Notifications dependency 2023-03-06 16:30:42 +02:00
Vlad Zahorodnii
869c29c33d effects/screenshot: Drop legacy dbus interface 2023-03-06 13:09:23 +00:00
Vlad Zahorodnii
ae72f61a4a scene: Use correct scale when computing world transform
If render target scale is set in WindowPaintData, use it. Otherwise
window screenshots with logical geometry can look wrong.
2023-03-06 10:36:45 +00:00
Vlad Zahorodnii
fd9504f649 wayland: Fix interactive resize of debug console
The internal window doesn't gravitate the geometry during interactive
resize so it can produce unexpected results when dragging the top-left
window corner.
2023-03-06 10:10:33 +00:00
Vlad Zahorodnii
fdbfd2fd5a effects/screenshot: Introduce CaptureWorkspace
Most screenshot tools provide some way to capture the entire workspace.
Currently, the way to achieve that is to compute the workspace geometry
yourself and use CaptureArea. It's inconvenient and it's also racy.

This change introduces CaptureWorkspace to provide screenshot tools
slightly nicer API to capture the entire workspace.
2023-03-06 09:05:23 +00:00
Vlad Zahorodnii
db55a6f909 wayland: Initialize Window::depth to 32
Window::depth and Window::hasAlpha make no sense on Wayland. The main
reason why we can't rid of them completely yet are X11Window and
Unmanaged.

This change makes WaylandWindow initialize depth to 32 by default to
make wayland window subclasses less boilerplaty.
2023-03-06 07:21:04 +00:00
Vlad Zahorodnii
3b12058135 Move X11 specific logic from DecorationRenderer to X11DecorationRenderer 2023-03-06 07:21:04 +00:00
l10n daemon script
f9b9ca8d1f GIT_SILENT Sync po/docbooks with svn 2023-03-06 02:37:13 +00:00
Xaver Hugl
66b3387a5a kscreenintegration: read global output data
This is per output instead of per output setup
2023-03-05 15:08:08 +01:00
Xaver Hugl
cc535a1ecd workspace: move kscreen integration into separate files
Putting all the code into workspace.cpp makes the file harder to manage,
and kscreen integration is really its own topic.
2023-03-05 15:08:08 +01:00
l10n daemon script
ea66fad153 GIT_SILENT Sync po/docbooks with svn 2023-03-05 03:45:18 +00:00
l10n daemon script
a6b665006e 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"
2023-03-05 03:32:52 +00:00
Aleix Pol
85b614e75c screencasting: on memfd, skip the QImage step
We were using QImage as an intermediary step. GL -> QImage -> spa
buffer. While it abstracted things out neatly and eventually helped with
debugging, it was unnecessary and woudl present some handicaps, such as
the lack of a QImage::Format_BGRA.
So we just it out to download right into the buffer.

BUG: 466655
(cherry picked from commit 121454580711c409b612d06865ab9d221dcbac6b)
2023-03-04 23:47:29 +00:00
Alexander Lohnau
56f2b9819d Remove unneeded KNewStuff linking
We only need this as a QML runtime dependency
2023-03-04 08:15:32 +01:00
l10n daemon script
3b848bbf7e GIT_SILENT Sync po/docbooks with svn 2023-03-04 02:35:04 +00:00
Ismael Asensio
e89c09a62e TabBox: Avoid unnecesary resets of the client model
When the tabbox switcher is shown and any window is added or
removed, its client model is fully reset, even if this window
is not included in the model.

This can be a bit expensive and also produce small visual quirks
on certain switchers, so let's check if the window list changes
before resetting the model.

BUG: 466660
FIXED-IN: 5.27.3
2023-03-03 18:51:12 +01:00
Vlad Zahorodnii
83398dce7b effects/screenshot: Ensure screenshot fd is nonblocking
If the screenshot fd is blocking, the thread writing the screenshot to
the pipe can potentially get stuck in case something happens to the
client.
2023-03-03 17:13:10 +00:00
Xaver Hugl
43a9add5fe windowitem: properly handle sub-subsurfaces
The damage of the whole subsurface tree needs to be considered, not just the
topmost subsurfaces of a window.

BUG: 466747
2023-03-03 15:58:24 +01:00
David Edmundson
46cad20ea8 wayland: Cancel selections if set without focus
Otherwise we confused clients in the following situation:
Client A sets selection, but due to timing has lost focus
User copies something in client B
Client later tries to paste in client A.
Client A still thinks it owns the selection so does nothing.

CCBUG: 459389
2023-03-03 11:25:42 +00:00
Vlad Zahorodnii
a9dc50e22d x11: Fix disabling high dpi scaling
Qt::AA_DisableHighDpiScaling has no any effect now.
2023-03-03 10:39:03 +00:00
Vlad Zahorodnii
219b6c6b50 Reevaluate stacking order when an override-redirect window is added
The stacking order needs to be re-evaluated so Window.stackingOrder is
updated.
2023-03-03 10:25:51 +00:00
Vlad Zahorodnii
b099ad8ade Drop deprecated Qt::AA_UseHighDpiPixmaps
Qt::AA_UseHighDpiPixmaps has no any effect now.

We used to rely on the fact that Qt::AA_UseHighDpiPixmaps is disabled by
default in Qt 5 in kwin_x11. It's not clear what to do about it now.
2023-03-03 08:36:14 +00:00
Vlad Zahorodnii
f16814811b kcms/rules: Fix import and export dialog 2023-03-03 07:41:01 +00:00
l10n daemon script
a6457fda40 GIT_SILENT Sync po/docbooks with svn 2023-03-03 02:49:03 +00:00
Vlad Zahorodnii
851a025fe0 Add missing translation domain
It fixes lots of warnings in tests.
2023-03-02 07:42:29 +00:00
l10n daemon script
e5e55195e5 GIT_SILENT Sync po/docbooks with svn 2023-03-02 03:30:11 +00:00
l10n daemon script
7d24fbda86 GIT_SILENT Sync po/docbooks with svn 2023-03-01 23:54:33 +00:00
l10n daemon script
24802d9d9a 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"
2023-03-01 23:48:05 +00:00
Vlad Zahorodnii
49977d38f2 build: Remove redundant find_package() for Wayland::Client
find_package(Wayland) already takes of the client lib, it's needed by
the wayland backend, so BUILD_TESTING specific find_package() can be
merged with it.
2023-03-01 21:18:24 +02:00
Vlad Zahorodnii
5184a630bb build: Search for wayland client libs only when building tests 2023-03-01 20:34:17 +02:00
Vlad Zahorodnii
31b21618b3 scripts/desktopchangeosd: Minor cleanup
Workspace.desktops is a property so the binding will be updated
automatically when the desktops change. There's also no a signal with
name "numberDesktopsChanged"
2023-03-01 18:00:11 +00:00