Commit graph

18336 commits

Author SHA1 Message Date
Vlad Zahorodnii
cae9828471 Don't perform MouseActivateRaiseAndPassClick for topmost windows
Do nothing if the active window is already most recently raised one.
2020-07-15 12:17:46 +03:00
Adrien Faveraux
6f640ece79 Adapt Contrast to new KWaylandServer 2020-07-14 18:25:38 +00:00
Adrien Faveraux
ae12cf9784 adapt Decoration Server to KwaylandServer Change 2020-07-14 18:23:03 +00:00
Andrey Butirsky
3cdfdeb982 deprecate --libinput option
seems do not needed any more
2020-07-14 16:20:45 +00:00
David Edmundson
3a74be2df6 [autotests] Don't change screens during cleanup
Screens are set during init, to do so at cleanup doesn't bring a lot.

It leads to a potential awkward raciness with xwayland failing the test,
whilst doing something that isn't part of what we're testing here or
likely to happen in real life.
2020-07-14 11:12:18 +00:00
Adrien Faveraux
bb138d7668 Adapt EglStream to KwaylandServer 2020-07-14 10:09:43 +00:00
Bhushan Shah
28d5a4e73b [virtualkeyboard] Fix the qtvirtualkeyboard with Qt 5.15
On 5.15, the VirtualKeyboard did not have a correct z-order which caused
the virtualkeyboard to hide as soon as key was pressed, upon
investigation it seems that upstream Qt changed behavior in following
changes.

https://codereview.qt-project.org/c/qt/qtvirtualkeyboard/+/292472
https://codereview.qt-project.org/c/qt/qtvirtualkeyboard/+/292674

Now when desktop-integration is used (i.e non-application embedded mode)
one need to set property desktopPanel to true so that it have correct
z-ordering and does not miss input events.

This is used in Component.onCompleted to avoid breaking it for the Qt
5.14.x qtvirtualkeyboard. When we switch to 5.15 property assignment can
be moved to InputPanel declaration.
2020-07-14 14:40:11 +05:30
Vlad Zahorodnii
5463a5427d [wayland] Drop pointless xwayland connection check
Xwayland can operate in two modes - rootless and rootful. When Xwayland
operates in the rootful mode, a container window is created where all
native X11 clients are placed. The container window is an xdg-toplevel
surface. Most compositors are not interested in rootful mode.

When Xwayland operates in the rootless mode, every X11 window is going
to be represented with a Wayland surface that has no role assigned to it.
In order to associate a wayland surface with an X11 window, Xwayland
will send a client message of type WL_SURFACE_ID.

Since we want Xwayland operate only in rootless mode, the check that
verifies that a newly created xdg-toplevel surface belongs to Xwayland
is pointless. We are never going to hit that case.
2020-07-13 15:37:34 +00:00
Adrien Faveraux
8d861b475d adapt Decoration Server palettes to KWaylandServer Changes 2020-07-13 15:36:22 +00:00
Aleix Pol
e28e4cb189 Move inputConfig away from KWin::Application
We were calling it from tests that were not running a KWin::Application
and not even including the symbols from main.cpp and main.h. The only
reason they linked was that it was static_casting up the QCoreApplication.
2020-07-13 12:54:34 +02:00
Bernie Innocenti
0c67eb983c [decorations] Fix rendering for depth 30 (10bpc)
When the display is set to 30-bit depth (10-bit per color component),
decorations of some clients appear garbled when compositing is disabled.
This is because the pixel format of the QImage in which the decorations
were rendered differed from the the X pixmap into which the pixels were
being copied by means of xcb_put_image().

For lack of a more robust way, this change guesses A2RGB30 for depth=30,
and keeps using ARGB32 as before for any other depth. I don't expect
anything other to 32bpp to be supported by KWin anyway.

Tested on amdgpu with KWIN_OPENGL_INTERFACE=egl.

BUG: 406302
FIXED-IN: 5.19.4
2020-07-10 13:08:53 +00:00
Konstantinos Smanis
72cd67cbf6 [scripts/videowall] Reenable the config dialog
Install the .desktop file of the videowall script in the services
directory, otherwise the configuration dialog is inaccessible.
2020-07-09 09:47:08 +00:00
Aleix Pol
89fca06bdb Make sure tablet coordinates take decorations into account
Fixes a small awkward offset on some applicaitons.

BUG: 423833


(cherry picked from commit 311094ad8be4c76df2a4655fe71e7085fa9c4e14)
2020-07-08 15:20:35 +00:00
Andreas Haratzis
6c9026628c Fix DrmOutput sometimes being freed with a pending pageflip, often when waking from sleep.
It is possible for updateOutputs to be called when a pageflip is pending.
Freeing a DrmOutput with a pending pageflip is not allowed (see ~DrmOutput assert - the page flip handler will be called on the freed memory, possibly leading to use-after-free).
This works around the problem by delaying the destruction with teardown().

BUG: 422460
2020-07-07 18:33:28 -07:00
David Edmundson
9e1bb1f130 [autotests] Fix warning
DrmOutput is a class
2020-07-07 09:24:03 +00:00
Benjamin Port
84b8d866e6 Prevent move/resize event when handling a maximize event 2020-07-07 08:35:12 +00:00
Benjamin Port
2d13bc3aa8 Prevent move/resize event when handling set full screen event
BUG: 421232
2020-07-07 08:35:12 +00:00
Chaojiang Luo
0ef5ddfd47 [drm] Do not blank crtc in atomic mode
In atomic setting mode, when external display tears down, it will blank
crtc with dump buffer by legacy api, then re-plug the external display,
the blank can not be removed. We think the blank is not needed in atomic
mode setting.

Signed-off-by: Chaojiang Luo <chaojiangluo@163.com>
2020-07-03 12:09:34 +08:00
Vlad Zahorodnii
617650d440 [scene] Discard pixmaps on buffer size change
The surface size is a logical size, which renders it unsuitable for
deciding whether the window pixmap needs to be discarded.

We need to discard window pixmaps when the buffer size changes. That
has a drawback though, discarding textures is kind of an overkill with
linux-dmabuf. However, fixing that would involve changes in kwayland
server that are far from being trivial.

BUG: 422459
2020-07-01 09:43:27 +00:00
Vlad Zahorodnii
f7a67e0edc [wayland] Ignore decoration updates if initial state isn't committed yet
or else we might send an unexpected configure event.
2020-07-01 09:18:29 +00:00
Vlad Zahorodnii
1013ee1bd0 [wayland] Queue maximize and fullscreen requests if initial state isn't committed yet
In order to ensure that no configure events will be sent before the full
initial state is committed, we need to queue maximize and full screen
requests or else the client may receive an "unexpected" configure event
and we miss to call initialize().
2020-07-01 09:18:29 +00:00
David Edmundson
1b4c725d10 Update clientGeometry for Unmanaged windows
It was udpated when we received a configure event but not in the initial
track.

The symptom of this being missed out was that blur would not be applied
to the window.

BUG: 423405
CCBUG: 423297
2020-06-30 14:59:54 +01:00
David Edmundson
38691aa0e7 [xwl] Fix xcb to wayland clipboard
A seemingly unrelated change to cursors broke xwayland's clipboard
syncing, presumably because of a change in how startup is ordered with
regards to syncing between our internal wayland connection causing a
crash.

It was fixed with a flush, but ultimately guarding things coming up in
the natural order works better.

Long term plans are to finish removing the internal connection.

See xwayland_selections_test in autotests.
2020-06-29 15:06:33 +01:00
Nicolas Fella
fdbca44d3e Use monochrome icon for keyboard layout sni
All SNIs use monochrome icons, except for this one
2020-06-28 19:12:32 +00:00
Nate Graham
898bd496d8 Merge branch 'Plasma/5.19' 2020-06-25 09:46:22 -06:00
Ismael Asensio
ad3d2f5acf Provide a mask for flag-type properties (window types) 2020-06-25 15:44:11 +00:00
Ismael Asensio
8b9472e0bf [kcm/kwinrules] Fix types property for NET::AllTypesMask
When the user selects all of the types or none of them, the "types"
property must be set to a special value (`NET::AllTypesMask = -1`),
different than the sum of all the flags together.

This re-implements this behaviour as the old KCM, fixing some heuristics
that prevented finding the rule corresponding to the current window.

The enum name that handles this property has been changed to `NetTypes`
to make it more explicit.

BUG: 423214
FIXED-IN: 5.19.3

TEST PLAN:
1. Open the `Application specific settings` on a window via menu
2. Select every "Window Type" (or none of them)
3. Give the rule a different name than the default and save
4. Open it again and check that the same rule is found
2020-06-25 15:44:11 +00:00
Vlad Zahorodnii
fa7fe79825 Merge branch 'Plasma/5.19' 2020-06-25 16:14:12 +03:00
Vlad Zahorodnii
578ede2dd7 Merge branch 'Plasma/5.18' into Plasma/5.19 2020-06-25 16:13:57 +03:00
Vlad Zahorodnii
a0c4a8e766 [x11] Force FocusIn events for already focused windows
Depending on the current focus stealing prevention level, it's possible
for kwin to call XSetInputFocus() on a window that already has the input
focus. In which case, we won't receive the corresponding FocusIn event
and the client will remain inactive from kwin's perspective even though
it isn't.

In order to work around this issue, we can move the input focus to the
null window. By doing so, it's guaranteed that we're going to receive
the matching FocusIn event for the client.

This commit indirectly fixes a bug where fullscreen games are displayed
below panels.
2020-06-25 13:12:44 +00:00
l10n daemon script
6a42eccfec 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"
2020-06-25 09:53:28 +02:00
l10n daemon script
b62f687c37 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"
2020-06-25 09:00:40 +02:00
l10n daemon script
4248f4d9ac 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"
2020-06-25 05:49:56 +02:00
Ismael Asensio
eb6e439335 Merge branch 'Plasma/5.19' 2020-06-24 21:22:43 +02:00
Ismael Asensio
3bfc750a79 [kcm/kwinrules] Fix detection of wmclass property
Property `wmclass` of a window rule works in a special way, as it can have
two meanings depending on `wmclasscomplete` flag:
- false: only matches `resourceClass`
- true: matches `resourceName` and `resourceClass`

This MR fixes two subtle bugs when detecting the properties of a window:

In the first case, `resourceName` was being wrongly set instead, which
prevented window matching for windows where those two values differ.

Also, the `wmclass` field was always set to `resourceName` independently
of `wmclasscomplete` property.

BUG: 423138
FIXED-IN: 5.19.3
2020-06-24 18:13:42 +00:00
Vlad Zahorodnii
c03b4879f0 Merge branch 'Plasma/5.19' 2020-06-24 17:26:19 +03:00
Vlad Zahorodnii
ec5a0249e2 [x11] Hold a passive grab on buttons only when needed
Due to a bug in the XI2 protocol, clients have to reset scroll valuators
on XI_Enter because the scroll valuators might have changed while the
pointer was elsewhere. The XI_Enter event is usually sent when an input
device enters the window, but it can also be generated by a passive grab.

If an XI_Enter event has been generated by a passive grab, the client
should not reset scroll valuators. Unfortunately, there is no any
reliable way for the client to determine if an XI_Enter event has been
sent in response to a deactivated passive grab. A correct fix for the
scroll issues in GTK apps would involve changes in the XI2 protocol.

As a work around, we can hold a passive grab only if the current mouse
wheel action is either "Activate and scroll" or "Activate, raise, and
scroll."

BUG: 394772
FIXED-IN: 5.19.3
2020-06-24 13:48:54 +00:00
Méven Car
61b55732ae Tests: Add outputmanagement to test helper 2020-06-24 11:17:42 +02:00
Cyril Rossi
170741c499 KCM KWin Decoration : kcfgc File attribute should point to kcfg file
BUG: 423398
FIXED-IN: 5.19.3
2020-06-24 09:48:40 +02:00
Vlad Zahorodnii
ad73e13478 [wayland] Switch to SurfaceInterface::bufferScale()
SurfaceInterface::scale() has been renamed to SurfaceInterface::bufferScale().
2020-06-24 06:59:15 +00:00
Chris Holland
e1b5fc9fac The old behavior before D28224 was (X + Y) instead of (X + X) 2020-06-24 06:54:44 +00:00
Aleix Pol
e459c8bf54 No need to recalculate the matrix if yInverted doesn't change 2020-06-23 14:58:48 +02:00
Jonathan Riddell
c1b1fb0b21 Update version number for 5.19.2
GIT_SILENT
2020-06-23 11:18:17 +01:00
David Edmundson
34c1bccdb7 Fix build with loadThemeCursor templates
WaylandCursorImage::loadThemeCursor(const T &shape) uses templates.
These templates are used by input.cpp but the deifnition is in
pointer_input.cpp

On some setups this creates a compilation problem.

This patch introduces an explicit non-templated declaration with the
defintion explicitly complied into the same class.

In master this has been refactored away anyway, so this is a minimal
patch to make things working in the least invasive way.

BUG: 423052
2020-06-22 16:51:38 +01:00
Nate Graham
2af16f1ee0 Merge branch 'Plasma/5.19' 2020-06-22 07:49:27 -06:00
Aleix Pol
e1bf133de7 Fix support for systems with age disabled
If no damage is supported, repaint all the output rather than nothing.
2020-06-22 09:46:27 +00:00
Benjamin Port
a8979aa4e4 KCM Compositing: Fix save state
use settings objects to track state instead of a class member that will need to be synchronized.

BUG: 423223
2020-06-22 09:24:11 +02:00
l10n daemon script
b5040fe425 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"
2020-06-20 07:42:21 +02:00
l10n daemon script
7a30443322 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"
2020-06-20 05:13:31 +02:00
David Edmundson
c567d51749 Apply suggestion to xdgshellclient.cpp 2020-06-19 08:56:14 +00:00