Commit graph

18739 commits

Author SHA1 Message Date
Aleix Pol
6646422007 screencasting: fix build
Properly specify a null format.

CCMAIL: jgrulich@redhat.com
2020-12-10 00:11:08 +01:00
Vlad Zahorodnii
fb0bcff1c8 plugins/qpa: Improve handling of output addition and removal
With this change, the QPA will try to avoid re-creating all platform
screens if a single output has been connected or disconnected.
2020-12-09 17:44:00 +00:00
Vlad Zahorodnii
5943eea4c9 Introduce Platform::{outputEnabled,outputDisabled} signals
These signals can be useful if you want to know what output exactly has
been disabled or enabled.

The outputEnabled signal is emitted after the outputAdded signal, and
the outputDisabled signal is emitted before the outputRemoved signal.
2020-12-09 17:44:00 +00:00
Vlad Zahorodnii
1b31f5279a Document Platform::{outputAdded,outputRemoved} signals 2020-12-09 17:44:00 +00:00
Jan Grulich
0ddc360776 Screencast: support BGRx format for backwards compatibility with WebRTC 2020-12-09 15:34:34 +00:00
Vlad Zahorodnii
94201cbadd Remove unused signal in Platform 2020-12-09 16:54:15 +02:00
Vlad Zahorodnii
3cdc97a4e9 Avoid converting socket name between QString and QByteArray back and forth
It only contributes overhead.
2020-12-09 15:07:29 +02:00
David Edmundson
1e2f2a28c7 Port to kwayland-server socket changes 2020-12-09 07:23:40 +00:00
l10n daemon script
9799456f3b 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-12-09 06:48:24 +01:00
Vlad Zahorodnii
279aef103e platforms/wayland: Print a warning message if buffer swap fails
If eglSwapBuffers() fails, frame scheduling will be broken. KWin can't
recover from that, but still, having a log message might be useful for
the debugging purposes.
2020-12-08 11:16:31 +00:00
Vlad Zahorodnii
592633eed7 Fix KWIN_BUILD_XRENDER_COMPOSITING build option 2020-12-08 11:23:12 +02:00
Vlad Zahorodnii
d99e6b5d2a platforms/x11: Move XRenderBackend to platformsupport directory
This change moves the XRender backend to platformsupport directory,
similar to the OpenGL and the QPainter backend. This allows to put
platform-specific logic in XRenderBackend.
2020-12-08 08:50:19 +00:00
Vlad Zahorodnii
b41a1eba50 wayland: Ignore the move request for immovable windows
A window can be immovable due to various reasons, for example the window
position is enforced by a window rule or the window is shown in the full
screen mode. In which case, the move request has to be ignored.
2020-12-08 08:22:18 +00:00
Vlad Zahorodnii
5578437522 wayland: Check serials in move and resize requests
If a move or a resize request is processed after the button is released,
the window will be stuck in the move/resize mode.

This change prevents that kind of race condition by adding relevant serial
checks in the move and the resize request handlers.
2020-12-08 08:22:18 +00:00
Thiago Sueto
4dba1da7c7 Add keyboard shortcuts for general navigation following the Meta-for-desktop xdg spec 2020-12-07 15:09:08 +00:00
Adrien Faveraux
50b1bb4a2b adapt Fake input to kwayland change 2020-12-07 08:12:12 +00:00
Adrien Faveraux
22ad35e876 Adapt kwin to sliding change in kwaylandserver 2020-12-07 07:47:29 +00:00
l10n daemon script
b1a115aa76 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-12-05 06:33:37 +01:00
Gabriel Souza Franco
c50acc0179 Add window id to failed pixmap request debug msg 2020-12-04 19:35:44 +00:00
Carson Black
49c7316e8c input: update keyboard repeat config reading to reflect new configuration style 2020-12-04 17:29:42 +00:00
Gabriel Souza Franco
c2b0a31e08 Show window ids as hex in debug console 2020-12-03 19:09:15 -03:00
Vlad Zahorodnii
e320f76fb0 platforms/virtual: Emit missing outputAdded signal 2020-12-03 22:06:07 +02:00
Vlad Zahorodnii
41a5362136 platforms/wayland: Add initial HiDPI support
This can be useful for test purposes and for people who have HiDPI monitors.
2020-12-03 15:59:54 +00:00
Vlad Zahorodnii
6b94be8652 Revert "Change the defaults for active screen"
This reverts commit bcba2e252f.

This change broke a dozen of tests, most of which were fixed. However,
it made more clear that we need to re-evaluate if enabling this option
by default is a good idea.
2020-12-03 12:04:10 +02:00
Vlad Zahorodnii
c793d5d619 autotests: Fix PointerInputTest
The "Active screen follows mouse" option may make the test fail. We want
it to pass no matter what the current value of the option is.
2020-12-03 09:55:37 +00:00
Vlad Zahorodnii
919e878d35 autotests: Set initial cursor position in QuickTilingTest
This is to ensure that tests pass no matter what the current value of
the "Active screen follows pointer" option is.
2020-12-03 11:53:40 +02:00
Vlad Zahorodnii
f1483b11af platforms/virtual: Emit outputAdded and outputRemoved
Otherwise things that rely on those two signals may introduce undefined
behavior in autotests.
2020-12-02 20:55:30 +02:00
Vlad Zahorodnii
9d5a1b0531 platforms/virtual: Remove redundant m_enabledOutputs
It's the same as VirtualBackend::m_outputs.
2020-12-02 20:52:01 +02:00
Vlad Zahorodnii
ebf4e082c1 platforms/hwcomposer: Emit outputAdded 2020-12-02 20:51:14 +02:00
Vlad Zahorodnii
64260000d6 platforms/fbdev: Emit outputAdded 2020-12-02 20:51:14 +02:00
Vlad Zahorodnii
2d5482b013 plugins/x11: Emit outputAdded and outputRemoved
Currently, these two signals are emitted primarily only on Wayland, but
in order to have consistent core API, it's better to emit them on X11 too.
2020-12-02 20:51:14 +02:00
Vlad Zahorodnii
389407805c platforms/drm: Properly clean up the shadow framebuffer object
In case hardware transforms can be used again, the shadow framebuffer
must be destroyed; otherwise rendered results will be distorted due to a
mismatch between the dimensions of the shadow framebuffer and the mode
size.
2020-12-02 16:05:08 +00:00
Vlad Zahorodnii
9236254d5c Schedule a repaint when a window is damaged
Currently, if an X11 or Wayland window is damaged, we will schedule a
repaint. This results in some code duplication that this change intends
to get rid of.
2020-12-02 15:33:08 +00:00
Vlad Zahorodnii
017528956b Move Scene::isPerScreenRenderingEnabled() to Platform
This way the Compositor can know if per screen rendering is enabled
before creating the Scene.
2020-12-02 15:32:30 +00:00
Vlad Zahorodnii
b94c876597 Fix crash in eglTerminate()
At the moment, the gbm_device for the primary device is destroyed before
the EGLDisplay is destroyed. This results in a crash in Mesa.

In order to fix the crash, this change ensures that the EGLDisplay is
destroyed before the gbm device.
2020-12-02 15:32:02 +00:00
Vlad Zahorodnii
932cd27a5c plugins/screencast: Don't make effects opengl context current
This makes eglSwapBuffers() fail with per screen rendering enabled. In
long term, the screencast plugin has to create its own OpenGL context
and capture window frames after a compositing cycle has been performed.
However, it's currently tricky to do because of monitor screencasting.
2020-12-02 15:31:22 +00:00
David Edmundson
5e350b0db5 [autotests] Fix mouse between screens
There were multiple other cases of placing the mouse between screens at
the start of tests. It seems to be all copy paste.

Only maximise and pointerConstraints were failing before this, but we
may as well fix all of them.
2020-12-02 15:09:55 +00:00
zhang yaning
d1e9a4a46b add audio pause mapping in xkb_qt_mapping. 2020-12-02 17:50:55 +08:00
Vlad Zahorodnii
afc77c82f3 platforms/x11: Set reasonable refresh rate for dummy output
A refresh rate of -1 may break compositing scheduling code that relies
on the refresh rate being valid.
2020-12-02 09:10:09 +00:00
Vlad Zahorodnii
e3e6b3de2d platforms/x11: Use correct logging category 2020-12-02 08:34:50 +00:00
Xaver Hugl
b460909212 Small refactor in the drm backends 2020-12-01 16:58:24 +00:00
David Edmundson
d56d4370b2 [autotests] Fix autotests
Since the active screen now follows the mouse, the position is
important.

Between two screens is an overly confusing place for it anyway.
2020-12-01 11:19:55 +00:00
Vlad Zahorodnii
1a4d578b5e wayland: Plumb some X11 code
Things such as move and resize are implemented on Wayland using event
filters that handle both X11 and Wayland clients.

Having both code paths enabled results in things getting performed
twice, e.g. window actions are executed twice, first in X11Client and
the second time in WindowActionsEventFilter.

This also fixes warnings produced by KKeyServer about an unsupported
platform.
2020-11-30 12:54:29 +00:00
Johnny Jazeix
8c3355bdc0 fix compilation in FreeBSD, errno is defined in errno.h 2020-11-29 19:31:49 +01:00
Ismael Asensio
a6c51c5445 kcm/rules: Add a Duplicate action to rules list
Useful action, especially for heavy kwin rules users

As an example, this can help users to migrate their rules to Wayland
(where some matching properties such as window class may be different)
while keeping a version of the rule compatible with X11.

BUG: 429588
FIXED-IN: 5.21
2020-11-29 00:16:51 +01:00
Xaver Hugl
9ab688067a Create egl backend for multiple backends and enable multi-gpu usage for the gbm backend 2020-11-28 17:53:41 +00:00
Vlad Zahorodnii
2a8395c7dd Trim trailing whitespace 2020-11-28 11:01:47 +00:00
Vlad Zahorodnii
2acf25ae69 Remove confusing debug message
This debug message is not helpful without knowing where it comes from.
In addition to that, it indicates that the lack of libinput connection is
bad, but it is not. For example, with the nested wayland compositor you
will never have a valid libinput connection, which is fine.
2020-11-28 11:00:40 +00:00
Andrey Butirsky
fac29606eb impr: Keyboard Layout DBus API: drop excessive method arguments
It's enough to give info about current layout only or all the layouts
altogether, so no need to pass layout to asqure in an argument.

P-W part:
impr: Keyboard Layout plugin: drop excessive DBus API method arguments
2020-11-27 19:04:18 +00:00
Andrey Butirsky
1755b0fd8b impr: Keyboard Layout DBus API: expose switchToNextLayout() method
switchToPreviousLayout() is also added

P-W part:
"Keyboard Layout plugin: passthrough DBus switchToNextLayout() method
to QML applet"
2020-11-27 19:04:18 +00:00