Commit graph

19565 commits

Author SHA1 Message Date
Vlad Zahorodnii
46b81be246 autotests: Make SceneQPainterTest more robust to BufferInterface changes
At the moment, the test depends on the implicit client connection flush
in BufferInterface::unref(). It will be highly desirable if that connection
flush is gone as it allows us batching wayland events better. It also
allows us remove a system call from a hot path.
2021-06-19 09:24:16 +00:00
Alexander Lohnau
e170c3be7d
Use K_PLUGIN_CLASS_WITH_JSON instead of K_EXPORT_KPACKAGE_PACKAGE_WITH_JSON
Task: https://phabricator.kde.org/T14542
2021-06-19 07:12:52 +02:00
Vlad Zahorodnii
b494efb23e autotests: Fix kwinglplatformtest
OpenGL2Compositing enum was replaced with OpenGLCompositing.
2021-06-18 17:31:32 +03:00
Xaver Hugl
b33fef02f5 platforms/drm: show cursor when exiting dpms
BUG: 438824
2021-06-18 14:10:22 +00:00
Nate Graham
c9a719e109 [effects] Use standard arrow cursor in Present Windows & Desktop Grid
The pointing finger cursor is used to show that a piece of text is a
clickable link, and it is inappropriate to use it in other contexts.
Regular UI elements that do something when single-clicked continue to
use the standard arrow cursor in other contexts, so let's follow that
convention in the Present Windows and Desktop Grid effects too.

BUG: 421928
FIXED-IN: 5.23
2021-06-18 12:58:40 +00:00
Felipe Kinoshita
ca3609eb4d [kcmkwin/kwincompositiong] Remove not so useful separators lines
This commit removes the separators lines below "scale method" and
"rendering backend", options here shouldn't be separated since they
are all related to eachother.
2021-06-18 10:40:23 +00:00
Nate Graham
bbf9c54dd8 [kcmkwin/kwineffects] Collapse list item when clicking on it again
Currently, each effect's list items expands when you click on any
non-interactive part of it, but it does not collapse when you click on
it again.

With this commit, now it does.

BUG: 421883
FIXED-IN: 5.23
2021-06-18 10:17:47 +00:00
Aleix Pol
56915dc113 xdgactivation: do not tell effects about unknown applications
Makes for an odd decoration.
We generally will not have an app_id in the cases where we are creating
a token just in case it's necessary down the line.
2021-06-18 00:11:56 +00:00
Aleix Pol
81f7436fda xdgactivation: Let activation requests through when they come from a window manager
If a client already has powers to move clients around, let them also
activate using the right protocols as well.

This is useful to be able to implement SNI or Notifications where the
shell doesn't get full surface activation when interacting with it.
2021-06-18 00:11:56 +00:00
Nicolás Alvarez
08143fb0d0 Update IRC network name in the README
KDE has moved from freenode to Libera Chat, update the README to reflect
this.
2021-06-17 10:07:23 +03:00
Nicolás Alvarez
a5c007c54a Update IRC network name in the README
KDE has moved from freenode to Libera Chat, update the README to reflect
this.
2021-06-16 14:26:36 -03:00
l10n daemon script
2f3a425c5e 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-06-16 01:24:38 +00:00
Nate Graham
77affd3259 [kcmkwin/kwindesktop] Drop local back for Formlayout label width
This hack was added in the past to prevent the combobox from being
pushed out of view when the label next to it was very long, as it can be
in certain languages. However it had the effect of making the label get
elided in *all* languages, and also the issue it was working around is
no longer present; even with very long text, the combobox no longer gets
pushed out of view, and instead the formlayout first switches to mobile
view and then elides the Label, exactly as intended. So we can safely
remove the hack.

BUG: 438504
FIXED-IN: 5.22.2
2021-06-15 17:27:14 -06:00
Xaver Hugl
250169ff84 platforms/drm: make context current without outputs in eglstream 2021-06-15 23:21:08 +02:00
Vlad Zahorodnii
61159d943c effects: Fix interpolated values for redirected animations
If a redirected animation reaches the end, the timeline value will be 0,
i.e. the interpolated() function has to return the from value, not `to`.

BUG: 438368
2021-06-15 08:46:58 +03:00
Vlad Zahorodnii
2ab70d0674 scenes/opengl: Clean up includes 2021-06-14 16:19:48 +03:00
Vlad Zahorodnii
1c94e1bfc4 scenes/opengl: Move out X11 explicit sync
This moves X11 specific code to a better place, which allows us make
item rendering code less platform specific and easier to change.
2021-06-14 13:14:54 +00:00
Vlad Zahorodnii
047c1a91f2 Properly destroy Compositor during teardown
When the aboutToDestroy signal is emitted, the compositor object is
already partially destroyed. This contradicts to the name of the signal.

In addition to that, it will be better to call the stop method in the
destructors of X11Compositor and WaylandClient as it allows them to add
custom cleanup code when compositing is turned off.
2021-06-14 13:14:54 +00:00
Vlad Zahorodnii
38f6494b2c scene/opengl: Remove unused includes 2021-06-14 12:20:37 +03:00
Vlad Zahorodnii
f9cf0baead kwineffects: Allocate hidpi textures in DeformEffect
If a window is animated using DeformEffect, allocate an offscreen
texture with the scale factor of the screen where the window is
considered to be on.

Also, resize the offscreen texture on demand in order to make resource
handling more efficient.
2021-06-14 09:02:44 +00:00
Vlad Zahorodnii
4af9d6c234 kwineffects: Remove unused WindowVertex and WindowQuad props
Since window quads are no longer passed in prePaintWindow(), we don't
need to track original vertex coords. This results in smaller memory
footprint.
2021-06-14 07:56:02 +00:00
Vlad Zahorodnii
5339b1a9d7 scene: Move item preprocessing to scene
We no longer use window pixmaps to get the shape and the opaque regions,
so preprocess() can be called now only if we are about to paint the item.
2021-06-14 07:56:02 +00:00
Vlad Zahorodnii
49744cfc53 scene: Improve window quad management
At the moment, we handle window quads inefficiently. Window quads from
all items are merged into a single list just to be broken up again.

This change removes window quads from libkwineffects. This allows us to
handle window quads efficiently. Furthermore, we could optimize methods
such as WindowVertex::left() and so on. KWin spends reasonable amount
of time in those methods when many windows have to be composited.

It's a necessary prerequisite for making wl_surface painting code role
agnostic.
2021-06-14 07:56:02 +00:00
Vlad Zahorodnii
a6268595fb scene: Generate quads in item local coordinate space
Window quads need to be in some coordinate space. Since we want items to
be used not only for rendering windows, window-local coordinates do not
suffice.

This change makes scene items generate quads in the item-local coordinate
space.

The model matrix is used to map the quads to the global screen coordinate
system from the item coordinate space.

Since the quads are in the item local coordinate space, the mvp matrix
needs to be updated on every draw call. Given the render data, tracking
the last mvp matrix won't result in less glUniform calls. If this indeed
becomes a serious performance bottleneck, we can explore the possibility
of dumping mvp matrices in a UBO, which have been introduced in OpenGL
3.1.
2021-06-14 07:56:02 +00:00
Vlad Zahorodnii
29cc319455 kwineffects: Remove WindowQuadType
The window quad type has become irrelevant.
2021-06-14 07:56:02 +00:00
l10n daemon script
3ed363c498 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-06-14 01:16:13 +00:00
l10n daemon script
943bdc0e64 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-06-13 01:21:07 +00:00
Vlad Zahorodnii
86bb4e68ef Refactor window quad handling
The scene items depend on the scene windows for caching window quads.
The goal of this change is to move window quads management to item.

Merging window quads in one list and then splitting them is inefficient,
it will be highly desirable if window quads are removed from the public
api so we can optimize window quad management.

With this change, the window quad type becomes irrelevant to render
backends for the most part. Note that the Xrender backend is a bit
nitpicky about window quads, so the shadow item doesn't create generic
"WindowQuadShadow" quads anymore.
2021-06-11 06:03:08 +00:00
Vlad Zahorodnii
d109e7d69b Introduce Item visible property
This property can be used to control the visibility of an item and its
child subtree.
2021-06-11 06:03:08 +00:00
Vlad Zahorodnii
a106a5aab8 Move AbstractClient::isShade() to Toplevel
This simplifies rendering code and allows to cache properly the shaded
state for Deleted windows.
2021-06-11 06:03:08 +00:00
Vlad Zahorodnii
43106b7e5d autotests: Remove SceneOpenGLShadowTest
It's barely readable and it doesn't add any real value.
2021-06-11 06:03:08 +00:00
Vlad Zahorodnii
de122825fd scenes/qpainter: Remove support for drop-shadows
Drop-shadows with the software render backend impact performance quite
significantly. It also makes it easier to prepare render backends for the
item based design.
2021-06-11 06:03:08 +00:00
Vlad Zahorodnii
30d0dbbaf0 Remove EffectsHandler::buildQuads()
It's currently unused and it doesn't fit the item based scene design.
2021-06-11 06:03:08 +00:00
Vlad Zahorodnii
a9e4d6d1f7 x11: Initialize m_target of EGL platform surface texture
We need to initialize m_target; otherwise the surface texture won't be
bound to GL_TARGET_2D.
2021-06-11 06:01:00 +00:00
Ismael Asensio
40d708f9c5 kcm/kwinrules: Adapt spinbox width to actual text
Use FontMetrics to calculate the expected max text width so it
doesn't overflow with wider fonts, specially in some languages
like pt_BR

BUG: 438193
FIXED-IN: 5.22.1
2021-06-10 23:16:31 +02:00
Ömer Fadıl Usta
dc73d622c0 Guard gbm and eglstreams parts for non-gbm or non-eglstreams systems 2021-06-10 20:10:14 +00:00
David Edmundson
bc6eba6114 [xwl] Create a new datasource on offer changes
Offers shoul be set on a source before data_device.set_selection. Doing
so afterwards appears to be against the spec and as such we may not pass
the update to wayland clients / klipper.
2021-06-10 17:18:50 +00:00
Vlad Zahorodnii
f280423b92 kwineffects: Remove PaintClipper
PaintClipper worked only with the XRender backend, which is gone now.
2021-06-10 15:58:33 +00:00
Vlad Zahorodnii
3ae400772b kwineffects: Remove dead code
AnimationEffect sets the clip region to clip windows, so this code can
be safely removed.
2021-06-10 15:58:05 +00:00
Xaver Hugl
40c485f2a6 platforms/drm: fix EglStreamBackend init
BUG: 438363
2021-06-10 13:06:43 +00:00
Xaver Hugl
3d6659b0d7 platforms/drm: on NVidia do pageflips with QPainter
Otherwise it's just gonna display a static black screen

CCBUG: 438363
2021-06-10 11:19:07 +00:00
Aleix Pol
a24e92d0b7 blur: Use a custom projection matrix when passing to copy sample
The screen projection matrix doesn't necessarily apply to that
framebuffer, so we can't use it.
2021-06-10 10:06:35 +02:00
Aleix Pol
fffd41b32e Only create the viewport as needed
So far, we were creating a model view with the complete scene rendered
(even if we didn't render the windows themselves). This required us to
have a big glPerspective spanning the entire scene and we were just
cropping it as we rendered it into a smaller texture.

This changes our scenes so we have the correct matrix set up at all
times.

Specifically in the case of the Pinephone, this solves the following
issue where we were unable to connect external displays because it
exceeded GL_MAX_VIEWPORT_DIMS:
https://invent.kde.org/teams/plasma-mobile/issues/-/issues/11
2021-06-10 10:06:35 +02:00
Aleix Pol
bec50eaec0 deform effect: Use the provided matrix instead of creating a new one 2021-06-10 10:06:35 +02:00
Aleix Pol
059b78337f Add Q_ENUM to enum classes 2021-06-10 10:06:35 +02:00
Aleix Pol
09f99df1a3 inputmethod: Be more assertive towards the input panel visibility
If a new input client has taken over, don't override the trackedClient's
geometry.
Only consider the input geometry of a visible keyboard.
2021-06-10 03:33:36 +00:00
Aleix Pol
6fa96852dc inputmethod: Reconsider what a hidden input method is
When the panel disappears, just reconsider the panel's state but don't
just stop sending updates to the input method.
Some input methods are just helpers that show and hide as necessary.
2021-06-10 03:33:36 +00:00
Nate Graham
66661a9ddc [kcmkwin/kwindecoration] Re-phrase awkward message
BUG: 438189
FIXED-IN: 5.23
2021-06-09 14:22:09 -06:00
Vlad Zahorodnii
a06690021d Remove OpenGL2Compositing enum
OpenGLCompositing and OpenGL2Compositing enums mean de-facto the same
thing, it's confusing to have them both.
2021-06-09 15:24:22 +00:00
Nicolas Fella
1e36e79fa3 Remove unused KIO dependency 2021-06-09 16:18:41 +02:00