Commit graph

18869 commits

Author SHA1 Message Date
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
Vlad Zahorodnii
bdfb946267 Convert Night Color into a plugin
Night Color adjusts the color temperature based on the current time in
your location. It's not a generic color correction module per se.

We need a central component that can be used by both night color and
colord integration to tweak gamma ramps and which will be able to
resolve conflicts between the two. The Night Color manager cannot be
such a thing because of its very specific usecase.

This change converts Night Color into a plugin to prepare some space for
such a component.

The tricky part is that the dbus api of Night Color has "ColorCorrect"
in its name. I'm afraid we cannot do that much about it without breaking
API compatibility.
2020-11-27 18:55:01 +00:00
Andrey Butirsky
2bac328cc8 feat: QML Keyboard Layout applet: allow Short Name override
In parity with legacy layout Widget,
user can now override layout Short Name from KCM

FEATURE:
CCBUG: 390079
2020-11-27 17:35:35 +00:00
Andrey Butirsky
283dff9174 fix: [2/2] Keyboard Layout applet: layout Name doesn't fit if variant is set
Variants are now stored separate from layouts in their own config entry.

P-D commit:
fix: [1/2] Keyboard Layout applet: layout Name doesn't fit if variant is set
2020-11-27 17:22:54 +00:00
Aleix Pol
cea2781318 screencating: query for dmabuf availability before we start streaming
As things are right now, we can only do 32bit textures for dmabuf (see
gbm_bo_format in gbm.h). This means that we were lying to our receivers
when we had 24bit textures by then giving a 32bit texture instead.

This changes it so we request a dummy texture before starting and if we
are offered one we assume they're available and offer a 32bits stream
directly (i.e. BGRA).
2020-11-27 15:42:23 +00:00
Vlad Zahorodnii
e298caaa7a wayland: Fix clipped thumbnails of client-side decorated apps
The buffer offset for client-side decorated windows is not 0, this plus
mixing the frame position and the client size may result in clipped
thumbnails of client-side decorated applications, such as gedit, etc.

BUG: 428595
2020-11-27 15:34:32 +00:00
Vlad Zahorodnii
a3cf1b9205 Drop AbstractClient::isInitialPositionSet()
It's the same as AbstractClient::isPlaceable(), which is a more generic
flag to indicate if the window can be placed.
2020-11-27 10:41:13 +02:00
Aleix Pol
7f4d1120c5 Have clients where we've set their position as non-placeable
If the client opted to position them on purpose, don't move them around.
If the geometry of the workspace changes it's their job to react
accordingly.

BUG: 429353
2020-11-27 08:18:49 +00:00
Claudius Ellsel
bcba2e252f Change the defaults for active screen
As suggested in https://bugs.kde.org/show_bug.cgi?id=425798#c12.

CCBUG: 425798 - https://bugs.kde.org/show_bug.cgi?id=425798
2020-11-27 08:18:02 +00:00
Vlad Zahorodnii
83003f0ccc Re-initialize colord integration when colord daemon is restarted
We need to re-create all colord devices in case colord daemon is reloaded.
2020-11-26 20:28:08 +00:00
Vlad Zahorodnii
3a7bce693e Explicitly destroy plugins
A plugin may need to access kwinApp() or kwinApp()->platform() during
tear down, but the problem is that plugins are destroyed after the
kwinApp() object. The plugin manager must be destroyed explicitly while
the application is still valid to ensure that no crash will occur
during compositor teardown.
2020-11-26 20:51:14 +02:00
Yuri Chornoivan
02c3dfb84b Fix extraction after krunner plugin separation 2020-11-26 09:36:28 +02:00
Aleix Pol
440555166f Address window placing problem on rotation
When changing the workspace size, clients will need to reposition
themselves. This leaves a short amount of time where strutted clients
(e.g. panels) will be floating in the wrong place.

This change makes it so when the area could not be properly calculated,
we ignore these clients until they start giving us proper values again.

This is a bit of a workaround though, it would make sense to implement
client placement more synchronously so we didn't have weird moments
where everything is wrong.

It's mostly prominent on the phone but it happens elsewhere when you
rotate.
2020-11-26 02:49:28 +00:00
Aleix Pol
91064cb26a xdgshellclient: Support set_fullscreen argument
xdgshell allows clients to specify which output should we fill on
set_fullscreen. This change takes this request into consideration
instead of ignoring it.
2020-11-26 02:47:34 +00:00
Vlad Zahorodnii
f04fa44f34 Fix license info in Findlcms2.cmake 2020-11-25 13:30:24 +02:00
Vlad Zahorodnii
8f6edea521 Turn krunner integration into a plugin
krunner stuff doesn't really belong in kwin, it has nothing to do with
compositing or any other things that are the domain of compositors.
Given that, being as a plugin suits the krunner integration stuff best.
2020-11-25 09:34:25 +00:00
Xaver Hugl
459aa66d8e Set setMoveResize(true) after stopping fullscreen and quick tiling
BUG: 427848
2020-11-24 18:17:48 +00:00
Vlad Zahorodnii
5058d5d1b4 Provide more information about colord devices
This helps a lot with identifying outputs in the color corrections kcm.
2020-11-24 18:16:19 +00:00
Vlad Zahorodnii
27e2e85144 Add manufacturer, model, and serialNumber properties to AbstractOutput
This can be useful for the colord integration plugin.
2020-11-24 18:16:19 +00:00
Michał Ziąbkowski
b186f86786 Fixed Toggle Night Color global shortcut, which used i18n in object name, leading to erratic behavior e.g. when system locale or translations changed.
BUG: 428024
2020-11-24 17:49:16 +00:00
Vlad Zahorodnii
59bf2a52ed Initialize the supports partial update flag to false
With 870679e46f, if the partial update
extension is unsupported, setSupportsPartialUpdate() won't be called.

The problem is that it may leave OpenGLBackend::supportsPartialUpdate()
uninitialized, which can lead to a crash if an OpenGL render backend
tries to call eglSetDamageRegionKHR() and EGL_KHR_partial_update is
unsupported.
2020-11-24 18:18:30 +02:00