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.
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.
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.
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
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
The internal window doesn't gravitate the geometry during interactive
resize so it can produce unexpected results when dragging the top-left
window corner.
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.
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.
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)
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
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
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.
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.
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"
The dummy window hack was needed to ensure hidpi rendering on Wayland.
We introduced QQuickRenderTarget::setDevicePixelRatio() in Qt 6.3, so
the hack can be removed now.
kwin installs metadata files for builtin effects so the kcm can find
them. With the recent KPluginMetaData changes, the Id field has been
removed, so the kcm will use "metadata" (the basename of metadata.json)
as the plugin id.
In order to fix plugin id resolution, let's install metadata with the
file name same as the plugin id.