Commit graph

20012 commits

Author SHA1 Message Date
Alexander Lohnau
08d3ceb024 Port to new KDecoration2::DecorationThemeProvider class
By supporting all the required attributes in the DecorationThemeMetaData class
the custom struct can be dropped.

Task: https://phabricator.kde.org/T14744
2021-09-17 12:45:47 +00:00
Alexander Lohnau
58c71de952 GenericScriptedConfigFactory::create: Do not use plugin keyword to identify which KCM should be loaded
We can just put the parameter in the variant list. Because the method is virtual, the keyword
parameter must exist in the method definition.

Task: https://phabricator.kde.org/T14744
2021-09-17 12:45:47 +00:00
Alexander Lohnau
cd4ef30b21 Emit deprecation warnings for loading KCM using a plugin keyword
Otherwise consumers will not know about the change and this way it is clear that the logic should be removed in the future
2021-09-17 12:45:47 +00:00
Alexander Lohnau
6f110bca1d Deprecate loading of KDecoration2::DecorationButton plugins using the "button" keyword
Task: https://phabricator.kde.org/T14744
2021-09-17 12:45:47 +00:00
Fabian Vogt
e26ea6bf23 Fix build on 32bit platforms
error: invalid cast from type ‘uintptr_t’ {aka ‘unsigned int’} to type ‘EGLNativeWindowType’ {aka ‘long unsigned int’}
2021-09-17 10:59:29 +00:00
Xaver Hugl
a7a515a0af platforms/drm: re-use buffers for testing
b38bb416 introduced flicker when restarting compositing because the
DrmGpu::findWorkingCombination method usually creates new buffers for
the commit, without rendering into them. Instead of that, re-use
existing buffers where possible
2021-09-17 11:56:20 +02:00
Xaver Hugl
d308262d4a platforms/drm: simplify active handling a bit 2021-09-17 11:34:51 +02:00
Xaver Hugl
15da95149d platforms/drm: add a method for setting legacy properties 2021-09-16 18:03:14 +02:00
Xaver Hugl
e88f2501bf platforms/drm: simplify DrmPipeline::checkTestBuffer 2021-09-16 18:03:14 +02:00
Xaver Hugl
3fc74f103a platforms/drm: drop some unused methods 2021-09-16 18:03:14 +02:00
Xaver Hugl
99cd923e4a platforms/drm: simplify format stuff a bit 2021-09-16 18:03:14 +02:00
Xaver Hugl
b3e245b177 platforms/drm: make SRC properties readable
They're 16.16 fixed point. Should make debugging easier
2021-09-16 18:02:36 +02:00
Jonathan Riddell
35ff7eb0ed Update version number for 5.23.80
GIT_SILENT
2021-09-16 10:33:42 +01:00
Jonathan Riddell
ebc7851671 Update version number for 5.22.90
GIT_SILENT
2021-09-16 09:21:13 +01:00
l10n daemon script
b461111130 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-09-16 01:18:13 +00:00
Severin von Wnuck
05af11b4ed qpa: Fix EGL config selection
The configs returned by eglChooseConfig are sorted from highest to lowest buffer sizes.
Filter the configs to find a suitable candidate that matches the requested attributes of the surface.
This fixes the corrupted Aurorae window decorations on Wayland with the proprietary Nvidia driver.
2021-09-16 00:37:19 +02:00
Andreas Sturmlechner
38e24ecd64
Fix build with 32-bit
Follow-up to 839710201c

Tested-by: David Flogeras <dflogeras2@gmail.com>
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2021-09-15 19:06:23 +02:00
Vlad Zahorodnii
f4b504c476 wayland: Fix google chrome fullscreen mode
Conceptually, a configure event inherits its parent's state and adds
some of its own. This allows the compositor to skip intermediate
configure events in ack_configure handler and jump to the last one.

Currently, the only field that XdgSurfaceConfigure objects need to
inherit is flags. The geometry info and window states are filled in by
role commit implementations to their latest values.

XdgSurfaceConfigure::flags indicates if the configure event moves the
window. This flag is important to resolve conflicts between geometry
updates initiated by the user and the ones that are made in response to
acknowledged configure events, e.g. after maximizing the window, etc.
(effectively, if the user moves a window, kwin will cancel scheduled
moves in configure events)

If configure flags are not inherited, we can end up with the following
case:

* configure event A (flags: {position})
* configure event B (flags: {})

If the client acknowledges configure event B, kwin will skip configure
event A, and thus it won't move the window to the right place. This is
the root cause of fullscreen mode misbehaving with apps such as google
chrome.
2021-09-15 16:17:17 +00:00
Vlad Zahorodnii
d58246961e scene: Fix previous pixmap ref'ing
discardPixmap() increases the reference counter, but there's no matching
place where the ref count is decreased, which results in the previous
pixmap not being released even if it's not needed anymore.
2021-09-15 16:16:42 +00:00
l10n daemon script
46a69357a7 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-09-15 01:22:44 +00:00
Méven Car
2eb5da1d6f Port autotests/integration/outputmanagement_test to kde_output_management_v2 2021-09-14 14:42:31 +00:00
Andrey Butirsky
987c68f5a5 fix: [Wayland] Context menu opens behind apps launcher and popups
BUG: 437139
2021-09-14 13:28:09 +00:00
Xaver Hugl
b8d69a326c platforms/drm: improve VT switching behavior
Instead of setting pipelines one by one, use DrmGpu::updateOutputs to
set all the outputs on a GPU with a single atomic commit. This makes
the switch both faster, more reliable and in case the other drm master
changes the output configuration, prevents blanking.
2021-09-13 16:58:49 +02:00
Aleix Pol
2bd02f660b wayland platform: Remember to call setTransformInternal() from updateTransform() 2021-09-13 10:11:09 +00:00
Vlad Zahorodnii
839710201c x11: Fix build with EGL_NO_PLATFORM_SPECIFIC_TYPES
eglCreateWindowSurface() wants a Window (unsigned long), but with
EGL_NO_PLATFORM_SPECIFIC_TYPES, EGLNativeWindowType is defined as an
opaque pointer, i.e. void*.

BUG: 440372
2021-09-13 06:37:19 +00:00
Xaver Hugl
e10f2ce06e platforms/drm: correct property blob handling
If a property blob got created by another drm master we can't rely on
re-using it, so create a new blob of our own with the data copied over
when the kernel destroys it.
Also free property blob objects when we don't need them anymore.

BUG: 440294
2021-09-13 01:28:47 +02:00
l10n daemon script
abe6b41534 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-09-11 01:16:54 +00:00
Aleix Pol
050c6ae76b Improve behaviour upon rotation with keyboard on
We make sure our client stays maximised as the screen geometry changes.

Fixes https://invent.kde.org/plasma/plasma-phone-components/-/issues/91
2021-09-10 23:37:55 +00:00
Aleix Pol
883dbfda17 drm: Properly check for the need for transformation
At the moment we were checking for size difference between the buffers
which works for rotation but not for flipped or up-side down screens.

This changes how we check it by comparing the effective transform vs the
supported one in drm to see if they differ.

Fixes https://invent.kde.org/plasma/plasma-phone-components/-/issues/112
2021-09-10 20:11:57 +02:00
Aleix Pol
5f306ae93d Improve debug, no need to show a number when we can show the value 2021-09-10 18:00:53 +02:00
Ismael Asensio
f6796ac860 [effects/overview] Only show close button for closeable windows 2021-09-10 17:25:19 +02:00
Ismael Asensio
07551a4487 Workspace: Better check of registered client shortcuts
Do not discard a shortcut immediately when it is already registered
in KGlobalAccel, because there could be possible dangling shortcuts
if they weren't properly cleaned-up (ex. after a crash).

Instead we delay the check for conflicts with other client shortcuts
to the second loop, which we know is up to date.

BUG: 442215
FIXED-IN: 5.22.80
2021-09-10 13:00:36 +02:00
Vlad Zahorodnii
46e2d51044 scripting: Make thumbnaills use linear filter
QSGImageNode ignores QSGTexture's filter, one has to specify it using
QSGImageNode::setFiltering().

In hindsight, we need to figure out how to integrate the lanczos filter
with window thumbnails and use it instead.

BUG: 441709
2021-09-10 09:16:24 +03:00
l10n daemon script
84426e8082 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-09-10 01:18:40 +00:00
Xaver Hugl
1b504818a3 platforms/drm: improve warning messages in DrmPipeline 2021-09-09 19:52:01 +00:00
Xaver Hugl
a0a98d0b31 platforms/drm: only delete outputs if not pre-existing
When there aren't enough CRTCs to drive all the outputs this could
delete existing outputs.
2021-09-09 19:52:01 +00:00
Xaver Hugl
b89f04943c platforms/drm: only test combinations if there are any
Otherwise we could hit an assert in DrmPipeline
2021-09-09 19:52:01 +00:00
Xaver Hugl
ffc4c12548 platforms/drm: commit pipelines directly instead of testing
The current behavior seems to cause some issues, and this is faster and
more efficient.
2021-09-09 19:52:01 +00:00
Vlad Zahorodnii
748004d81e x11: Avoid discarding the window pixmap for no reason
If the buffer size changes after creating or destroying the decoration,
the surface item will discard the pixmap.

If the buffer size remains the same, we can continue using old pixmap.
2021-09-09 16:55:39 +00:00
Aleix Pol
2ef53e7350 drm: Make hardware rotation opt-in
The current implementation sometimes will leave the screens unusable,
therefore KWIN_DRM_SW_ROTATIONS_ONLY=1 is default.
Use KWIN_DRM_SW_ROTATIONS_ONLY=0 to test hardware DRM operations.
2021-09-09 16:54:35 +00:00
Nate Graham
d11b4c8084 kcmkwin/kwindesktop: disable double-click mouse area while in edit mode
Otherwise the mouse area eats clicks and prevents text selection using
the mouse from working.

BUG: 441963
FIXED-IN: 5.23
2021-09-09 10:51:53 -06:00
Aleix Pol
d5be2232e8 Fix build 2021-09-09 17:10:48 +02:00
Alex Richardson
af3602b48c Fix out-of-bounds copy in xcb_send_event() calls
xcb_send_event always copies 32 bytes, so we have to pad all xcb_*_event_t
to 32 bytes to avoid leaking uninitialized stack memory. I found this
problem while running kwin_x11 on a CHERI-RISC-V system (which has bounded
pointers). The xcb_send_event() implementation has a memcpy() that was
copying 32 bytes but the event passed was a bounded to 28 bytes, so this
resulted in a run-time exception in X11Client::sendClientMessage().
The same problem exists in Selection::sendSelectionNotify(), but this time
we could end up copying up to 8 bytes since xcb_selection_notify_event_t
is only 24 bytes.

This disclosure of uninitialized data could in theory have a security
impact if it leaks a pointer value (e.g. a return address) as part of an
exploit chain that needs to bypass ASLR. However, the selection notify
events go directly to the XServer and you most likely already have a
serious problem if an attacker has full control over the XServer. It is
possible that the configure notify events go directly to an untrusted
client, but even if they do this leak is not directly exploitable.

See also https://gitlab.freedesktop.org/xorg/lib/libxcb/-/issues/18
2021-09-09 15:03:44 +01:00
David Edmundson
a4cdcb6c87 Fix xwayland copying unit test
The current code set m_pasteProcess to null, before running the cleanup
function which tells the process to quit.

Which is why it always hung the CI. This patch addresses it in a way
that cleans up helpers even if we abort the test early.
2021-09-09 11:13:02 +00:00
David Edmundson
65f168e144 Use a direct connection for X to wayland drags
We already use a direct DataSource object for transfer.

Use of the new public SeatInterface::startDrag allows us to start our drag directly.
2021-09-09 11:13:02 +00:00
David Edmundson
400dd31db6 Drop the internal connection for wayland to X drags
An AbstractDragTarget is introduced. This contains either the DataDevice we are
dragging to or an Xwl bridge.

We set this on Seat along with the active surface.

In future this also allows getting rid of the move filter.
2021-09-09 11:13:02 +00:00
David Edmundson
7f976199b7 Adapt to kwayland-server icon changes
The icon is a property of the active drag which is managed by Seat, the
DataDevice should not cache this.
2021-09-09 11:13:02 +00:00
Vlad Zahorodnii
0aaa57e18e Assign default name if new virtual desktop has no explicit name
If a virtual desktop has empty name, kwin is going to end up in an
infinite cycle where VirtualDesktopManager::save() updates the
_NET_DESKTOP_NAMES property and then in the next event loop cycle,
RootInfoFilter::filter() is going to call VirtualDesktopManager::save()
because the _NET_DESKTOP_NAMES property has been changed.

This regression has showed up just now because some parts of kwin used
to increase virtual desktop count to create new desktops. Recently, that
code was ported to VirtualDesktopManager::createVirtualDesktop().

The main difference between createVirtualDesktop() and setCount() is
that the latter will set the desktop name to "Desktop N", the former
will use user-specified name.

If the user-specified name is empty, the createVirtualDesktop() method
should assign "Desktop N" name to the virtual desktop according to the
docs. However, it's not the case and this change addresses that.
2021-09-09 10:50:16 +03:00
l10n daemon script
16f5ce9361 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-09-08 01:27:17 +00:00
Xaver Hugl
b38bb41698 Test DrmPipelines for outputs
Not all combinations of connectors, crtcs and planes will work
on all hardware, so we need to test the pipelines before using
them.

BUG: 433107
CCBUG: 435265
2021-09-08 02:44:29 +02:00