Commit graph

23470 commits

Author SHA1 Message Date
l10n daemon script
332ea380e6 GIT_SILENT Sync po/docbooks with svn 2022-10-31 03:00:35 +00:00
l10n daemon script
365dfaa4c0 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"
2022-10-31 01:53:33 +00:00
Aleix Pol
8417492781 Include org.freedesktop.locale1 support
Makes it possible to follow the dbus service for locale configuration,
making it possible to have third parties integrate with Plasma.

This is done opt-in for now, it can be adopted generally in the future,
if necessary.
2022-10-30 23:03:55 +01:00
Yunus Erdem Ergül
96cfc411f0 scripting: Expose cursor position to the API
Added cursorPos property and cursorPosChanged signal to WorkspaceWrapper
2022-10-30 10:34:05 +00:00
l10n daemon script
88991f9355 GIT_SILENT Sync po/docbooks with svn 2022-10-30 02:09:10 +00:00
Aleix Pol
47c3c2d143 libinput: Support switching the targetted output with a shortcut
I was told it's how artists are used to using these tablets so it makes
sense to support the workflow.
2022-10-29 22:30:03 +00:00
Aleix Pol
77c5198dc8 libinput: Allow setting an empty output name
For tablets, it signifies "follow the active output".
2022-10-29 22:30:03 +00:00
Aleix Pol
a11681918a OSD: Fix OSD::show from the non-main thread
If it's issued from a different thread, pass it to the main one so it's
eventually displayed.
Otherwise, it would just crash kwin.
2022-10-29 22:30:03 +00:00
l10n daemon script
af983dba42 GIT_SILENT Sync po/docbooks with svn 2022-10-29 02:09:49 +00:00
l10n daemon script
ef60c8e53c 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"
2022-10-29 01:52:40 +00:00
Xaver Hugl
b3d0698126 backends/drm: rewrite most of EglGbmLayerSurface
This rewrite ensures that
- formats are tested for multi-gpu transfer
- dmabuf with either 10bpc or 8bpc buffers are preferred to cpu copy
- formats where drmModeAddFB2 fails are skipped
2022-10-28 16:09:10 +02:00
Xaver Hugl
cd6a219961 backends/drm: make the buffer target constant
There's no reason for it to be dynamic
2022-10-28 16:09:10 +02:00
Xaver Hugl
228575f0ae backends/drm: store creation flags in GbmBuffer 2022-10-28 16:09:10 +02:00
Kai Uwe Broulik
0902d91a42 nightcolormanager: Emit timing change only when they have actually changed
Avoids pointless DBus traffic.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-10-28 11:43:46 +00:00
Vlad Zahorodnii
d89feb33b2 Remove some Q_UNUSED
It's weird to wrap a return value in Q_UNUSED macro.
2022-10-28 09:40:08 +00:00
Vlad Zahorodnii
57eb60122b Make Atoms code more readable
It improves readability by making calling getReply() explicit.
2022-10-28 09:40:08 +00:00
Vlad Zahorodnii
b30e81cb22 x11: Keep compositing mode untouched if kwin crashes
kwin can crash for reasons that have nothing to do with compositing. If
that's the case, after two crashes compositing will be permanently
disabled and you would need to go to system settings to reenable it, the
timestamp based check in the x11 backend won't be effective.

CCBUG: 452344
2022-10-28 09:38:38 +00:00
Vlad Zahorodnii
fd978838cc qpa: Geometry handling fixes
We don't need to emit {x,y,width,height}Changed signals ourselves. We
also need to send an expose event otherwise the window can be rendered
incorrectly if it's resized. The logic follows QtWayland implementation.
2022-10-28 08:47:48 +00:00
Vlad Zahorodnii
9774eacbbe Remove ServiceTypes info
Binary plugins don't need it. KPackage packages have "KPackageStructure"
property instead.
2022-10-28 06:58:44 +00:00
l10n daemon script
f19e3d5425 GIT_SILENT Sync po/docbooks with svn 2022-10-28 02:19:24 +00:00
Vlad Zahorodnii
61644305f0 wayland: Drop unused field in XdgOutputManagerV1Interface 2022-10-27 11:57:52 +00:00
Vlad Zahorodnii
0c34957625 wayland: Hide XdgOutputV1Interface class
With the pull approach, the XdgOutputV1Interface class doesn't have to
be exposed in the public api and can be made private to simplify the
implementation of the xdg-output-v1 protocol.
2022-10-27 11:57:52 +00:00
Vlad Zahorodnii
b40d76d35c wayland: Prevent matching dnd actions after drop
Currently, kwin will continue matching dnd actions after a drop. This is
mainly needed in order to make "ask" action work.

However, it appears like there are clients in the wild that update offer
actions after receiving wl_data_source.dnd_drop_performed and wl_data_device.drop
events.

One could argue that's a client bug, and perhaps it is, but the spec is
vague about that. In meanwhile, let's make sure that dnd action matching
is active after drop only when the selected data source action is "ask."
2022-10-27 11:03:06 +00:00
Łukasz Patron
a9acef8573 x11: Don't force QT_QPA_PLATFORM=xcb
This is basically a cherry pick of 77ec43d5e (Don't force
QT_QPA_PLATFORM=wayland), except for X11.
2022-10-27 08:03:59 +00:00
Łukasz Patron
c2b4f03f96 x11: Don't force QT_NO_GLIB=1
This breaks certain apps, e.g. KDE System Settings when launched from
overview effect.

BUG: 460980
2022-10-27 08:03:59 +00:00
Vlad Zahorodnii
a9833dc9dd scripting: Prefer metadata.json over metadata.desktop in GenericScriptedConfig
KPluginMetaData in KF 6 doesn't load desktop files anymore. It means
that plasma packages need to come with json metadata files.

This change adjusts the generic scripted config loader so it can load
configuration even for packages with no metadata.desktop files.
2022-10-27 07:35:36 +00:00
l10n daemon script
0e393b8fe0 GIT_SILENT Sync po/docbooks with svn 2022-10-27 02:10:42 +00:00
l10n daemon script
109bdf8f42 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"
2022-10-27 01:50:21 +00:00
Xaver Hugl
2997fb24bb x11window: revert more from 3a28c02f
BUG: 461032
2022-10-26 23:17:36 +00:00
Xaver Hugl
1dcbc3c6f8 backends/drm: fix format sorting
As the drm format number of 10 bit colors is lower, the fallback sorting
preferred those formats, even if KWIN_DRM_PREFER_COLOR_DEPTH=24 was set.
To fix that, prefer 8 bit colors over something random.
2022-10-26 18:46:13 +00:00
Vlad Zahorodnii
8fa1883cd9 effects/invert: Make it fully responsible for inverting the screen
The X11 standalone backend has an obscure fallback to hw screen
inversion if compositing is disabled. While it's great, it conflicts
with existing features such as night color.

In order to make code cleaner and clean up dependencies, this change
moves screen inversion shortcut to the invert effect. While it can
potentially affect users that don't use compositing, I think the number
of such affected people is very small.

In hindsight, preferring hw over sw transform is nice, but I think we
need to analyze it first and then come up with a proper solution that
integrates with color management and works great both on x11 and wayland.
2022-10-26 18:18:36 +03:00
Vlad Zahorodnii
b18c6a4c52 backends/virtual: Drop VirtualBackend::captureOutput()
It's unused. Bring it back when there are usecases.
2022-10-26 14:08:38 +00:00
Vlad Zahorodnii
6b253074f3 autotests: Drop testSceneQPainter
The entire approach behind that test is wrong. Even slight changes in
one pixel can make the test fail. There's no human-friendly way to
determine what the difference between reference and actual frames are.
The reference frame is generated in code rather than from an image on
the disk, which makes the tests even more error-prone.

The test is flaky too and constantly blocks merging patch submissions.

We need a different way to test rendering results, not what
testSceneQPainter currently does. Normally, I would say that we need
to add such an infrastructure before dropping the test, but it makes the
merging process so inconvenient and the test doesn't really bring any
value, it tests really basic cases which are noticeable right away after
launching kwin.
2022-10-26 14:08:38 +00:00
Arjen Hiemstra
11dc73c6ce effectshandler: Reset iterators when active effects changes
Clearing and resizing m_activeEffects invalidates iterators, so we need
to ensure we reset any iterators that were stored.
2022-10-26 11:50:57 +00:00
Arjen Hiemstra
4c8fd4b8ca OffscreenEffect: Use drawWindow instead of renderWindow when rendering contents
renderWindow bypasses all other effects and simply calls the code that
is responsible for the final render of the window. This means that any
effects that are active on the window are skipped, including things that
may change how the window is rendered like the invert effect. To fix
that, ensure we render the window with all effects applied.

BUG: 459417
2022-10-26 11:50:57 +00:00
Xaver Hugl
580396e377 x11window: partially revert 3a28c02f
In some cases it can cause rather than fix problems with maximization
2022-10-26 12:37:36 +02:00
Xaver Hugl
f6d14f1b44 effects/kscreen: don't stop effect when fade out animation is done
The screen needs to stay black until it gets enabled again, otherwise
slight timing differences can cause the screen to turn on full brightness
again immediately before turning off.

BUG: 460902
2022-10-26 11:52:03 +02:00
Vlad Zahorodnii
a4cb0e7fd8 Forward declare QAction in src/input.h 2022-10-26 07:04:47 +00:00
Vlad Zahorodnii
daa351a398 Remove KGlobalAccel bits from Platform
With the addition of KGlobalAccel::globalShortcutActiveChanged(),
there's a way to monitor all triggered actions without adding any
boilerplate code.

This change removes the KGlobalAccel bits from the Platform class. This
reduces the amount of boilerplate code; currently we need to be careful
about ensuring that Platform::setupActionForKGlobalAccel() is called.
Another reason behind this change is to simplify the api of Platform and
remove things that don't have anything to do with outputs.
2022-10-26 07:04:47 +00:00
l10n daemon script
abf24cec4a GIT_SILENT Sync po/docbooks with svn 2022-10-26 02:13:41 +00:00
l10n daemon script
fcc0b10fee 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"
2022-10-26 01:51:34 +00:00
Nicolas Fella
56c2afc749 Bump PlasmaWindowManagement version to 16
Needed for resource name
2022-10-25 15:52:19 +02:00
Vlad Zahorodnii
3de852cd4f wayland: Drop DataDeviceInterface::updateProxy()
It's unused.
2022-10-25 11:13:14 +00:00
Arjen Hiemstra
b637785f49 Replace some manual floored QPointF->QPoint conversion with flooredPoint calls 2022-10-25 08:44:05 +00:00
Arjen Hiemstra
88bc25b376 DecorationInputFilter: Use QPointF instead of QPoint for events
`QMouseEvent::globalPos()` returns QPoint rather than QPointF, which
internally rounds the screen position. This can result in mouse
positions that are outside the screen, leading to problems. Since
screenPos() seems to be the same, use that so we get a QPointF instead.
Additionally, apply similar changes to the other events.
2022-10-25 08:44:05 +00:00
Arjen Hiemstra
6ef2cdc332 Window: Floor rather than round when doing hitTest for the decoration
Otherwise we may end up with coordinates that are outside the decoration
and inadvertantly failing the hittest.

BUG: 460686
2022-10-25 08:44:05 +00:00
Arjen Hiemstra
2f900d84ab Add a helper function to convert QPointF to QPoint using floor instead of round
In a bunch of cases, we want to floor when converting to QPoint rather
than rounding. As it gets tedious to repeat the same code over and over,
add a helper function.
2022-10-25 08:44:05 +00:00
John Brooks
a1191bea18 wayland: Fix missing relative motion events
Use isNull on QSizeF to check for a zero delta instead of comparing it
with a default-constructed QSizeF, which in practice initializes to
(-1.0,-1.0). This caused relative motion events to be omitted if the
delta happened to be equal to (-1.0,-1.0), causing mouse jumping in some
applications.

BUG: 444510

Signed-off-by: John Brooks <john@fastquake.com>
2022-10-25 08:18:45 +00:00
Weng Xuetian
84f54e9ffa Implement a enableRequested signal for text-input-v3
The signal will be emitted if text-input-v3 applies a new enable state
if it's already enabled.

In Gtk's implementation, sending text_input_v3.enable for the second
time has the similar semantics of text-input-v2.showInputPanel. Try to
connect them together and add corresponding test.

See also: a95cfb1c45/gtk/gtkimcontextwayland.c (L555)
2022-10-25 04:34:26 +00:00
jrv ezg
7f7fa69135 kcmkwin/kwindecoration: use Kirigami.ActionToolBar for the footer actions
This way, the footer actions collapse into a menu when there's not enough space
to show them all, instead of being cut off.

BUG: 460793
FIXED-IN: 5.26.2
2022-10-25 02:37:45 +00:00