Vlad Zahorodnii
1e01b1334e
platforms/drm: Remove redundant drmModeGetResources
2020-10-13 21:02:32 +03:00
Bhushan Shah
d9d1c976cd
platforms/drm: do not try to use the GPU card node
...
On some devices, the GPU nodes are also added as /dev/dri/cardX, they
are not useful for KMS purposes and does not have display resources.
If we encounter such cards, then skip them.
2020-10-13 23:14:06 +05:30
Vlad Zahorodnii
0ef272bc21
platforms/drm: Save last working output transform
...
This can be useful for testing output transformations without kscreen.
2020-10-13 05:34:39 +00:00
Vlad Zahorodnii
691ce56627
platforms/drm: Query cursor capabilities per individual gpu
...
We should not assume that the cursor capabilities are shared by all DRM
devices.
2020-10-13 05:34:01 +00:00
Vlad Zahorodnii
29fbe27ffc
core: Use less confusing name for Platform::supportsQpaContext()
...
Platform::supportsQpaContext() indicates if the EGL display supports
surfaceless contexts, so reflect that in the method name.
2020-10-13 05:32:48 +00:00
Vlad Zahorodnii
9b89a3d967
qpa: Merge OpenGL platform context classes
...
This makes our QPlatformOpenGLContext private subclass simpler.
As a slightly unrelated change, this patch also fixes a bug where our
platform opengl context may return a wrong surface format if surfaceless
contexts are unsupported.
2020-10-13 05:32:48 +00:00
Vlad Zahorodnii
b7bd8472f2
scene: Reduce the call cost of Platform::supportsQpaContext()
...
Every time Platform::supportsQpaContext() is called, we go through the
list of supported extensions and perform a string comparison op. This is
not really cheap.
2020-10-13 05:32:48 +00:00
Vlad Zahorodnii
d3934be591
Prefer std::make_unique over std::unique_ptr(new T)
...
This way code is thinner and it is guaranteed that no memory leaks will
occur if an exception gets thrown for some reason.
2020-10-12 08:51:01 +03:00
Aleix Pol
daf693d3ed
Restore building the wayland_backend without gbm
...
Disables the compilation on the few places that use it to allow creating
dmabufs easily.
Patch inspired by David Faure.
2020-10-09 13:15:12 +00:00
Xaver Hugl
b50f747876
Multi-GPU output support on Wayland
...
This commit sets up udev and the DrmBackend to list and use all GPUs.
BUG: 425586
BUG: 417323
2020-10-05 21:05:55 +00:00
l10n daemon script
30b516eceb
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-09-30 06:16:48 +02:00
l10n daemon script
e534d5abad
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-09-26 05:57:20 +02:00
Vlad Zahorodnii
0c266e760b
Replace remaining usages of old connect syntax with new connect syntax
...
This change replaces the remaining usages of the old connect syntax with
the new connect syntax.
Unfortunately, there are still places where we have to use SIGNAL() and
SLOT() macros, for example the stuff that deals with d-bus business.
Clazy was used to create this change. There were a few cases that needed
manual intervention, the majority of those cases were about resolving
ambiguity caused by overloaded signals.
2020-09-24 09:33:45 +00:00
Aleix Pol
9479c0d6b4
Do not call randomly eglGetError() after eglMakeCurrent
...
If it failed, it will return accordingly, and then we get to call
eglGetError, only when it fails.
2020-09-23 10:05:30 +00:00
Vlad Zahorodnii
90dce019ad
qpa: Expose output names to QScreen
...
It can be useful for things such as effects.
2020-09-23 06:36:31 +00:00
Aleix Pol
61e655f7f7
Centralize WindowPixmap buffer updating code
...
Uses a setter and clear method pattern rather than having the code
repeated.
Instead of keeping a QPointer, now we are a QObject and we get notified
about destruction intention directly, so we can clear the pointer when
necessary.
2020-09-22 13:04:35 +00:00
Aleix Pol
6f1e72886a
simple for -> foreach on a hot path
2020-09-17 03:12:59 +02:00
Aleix Pol
06e26212a2
Add missing const-referenece
...
I assume it was a typo
2020-09-17 03:12:59 +02:00
Aleix Pol
fec4e058e5
Do not try to create a gbm dmabuf when gbm is not available
...
Allows us to take the fallback path instead of just crashing
2020-09-15 15:45:44 +02:00
Aleix Pol
eafe23b27c
Hopefully fix the build on BSD
...
At the moment it complains about std::array being unknown.
2020-09-10 01:06:41 +02:00
Vlad Zahorodnii
53cb4207ea
scenes/opengl: Use std::array to store lanczos kernel data
...
This fixes a compiler warning (-Wclass-memaccess) and makes code a bit
cleaner.
2020-09-09 19:36:26 +00:00
Aleix Pol
76fbb43798
Reduce repeated Screens::scale(int)
2020-09-09 17:46:56 +00:00
Aleix Pol
75321a2166
Don't check if there's a non-rendered output twice
...
We are already doing it on the line above.
2020-09-09 17:46:56 +00:00
Aleix Pol
a7ecaa55e3
Prefer constant iterators when we don't change the container
2020-09-09 17:46:56 +00:00
Bhushan Shah
e900dc3b5e
qpa: remove unused override for the inputcontext
...
Previously qtvirtualkeyboard was integrated weirdly so that it was
acting as the focus object and proxy for input methods, however now that
we support proper input methods, this code is totally unused in the QPA
and actually prevents the QT_IM_MODULE from working now that
qtvirtualkeyboard is dropped.
See: f26f2fe181
for the reference of the
code deleted.
2020-09-03 12:29:57 +00:00
Vlad Zahorodnii
848f7f3177
Revert "plugins/drm: Link against Wayland::Server"
...
This reverts commit efb9e0edb2
.
libwayland-server is now in the link interface of kwayland-server.
2020-09-02 19:31:29 +03:00
Vlad Zahorodnii
efb9e0edb2
plugins/drm: Link against Wayland::Server
...
We need to link against Wayland::Server because the EGL Streams protocol
wrapper uses wl_array in its public API.
2020-09-02 16:10:25 +00:00
Vlad Zahorodnii
f55ae15788
Remove unused wayland-cursor.h includes
2020-09-02 15:59:36 +03:00
Vlad Zahorodnii
12e428bd33
plugins/windowsystem: Adjust installation path
...
${PLUGIN_INSTALL_DIR}/kf5/org.kde.kwindowsystem.platforms/ is now an
obsolete installation destination for KWindowSystem platform plugins.
2020-09-01 22:44:11 +03:00
David Edmundson
8303a4cdf8
Make GL Context current when deleting lanczos textures in timer hander.
...
A timer could have fired at any time. We process mulitple QtQuickViews
on timers which change the GL context.
Deleting a kwin GLTexture calls glDeleteTextures/glDeleteFramebuffers.
Surprisingly I haven't seen a crash report from this, but it doesn't
look right.
2020-09-01 09:13:00 +00:00
Nicolas Fella
0f588c256c
Drop empty X-KDE-PluginInfo-Depends
...
The whole concept is almost unused and there's no point in having it there but empty
See also https://phabricator.kde.org/T13553
2020-09-01 09:11:48 +00:00
Adrien Faveraux
788c65d260
Fix Build Warning
2020-08-26 19:24:02 +02:00
Aleix Pol
eeeac04974
Implement EGL_KHR_partial_update and EGL_EXT_swap_buffers_with_damage
...
Summary:
Notify the driver about the parts of the screen that will be repainted.
In some cases this can be benefitial. This is especially useful on lima
and panfrost devices (e.g. pinephone, pinebook, pinebook pro).
Test Plan:
Tested on a pinebook pro with a late mesa version.
Basically I implemented it, then it didn't work and I fixed it.
Maybe next step we want to look into our damage algorithm.
2020-08-19 14:51:42 +00:00
Aleix Pol
d5da366507
Add a generic Output::transformation method
...
Makes it possible to map any space into the output's coordinates system
2020-08-19 14:51:42 +00:00
Vlad Zahorodnii
b4b0b93188
qpa: Don't delete platform screens manually
...
According to the documentation, deleting a platform screen manually can
lead to a crash due to a call to a pure virtual method.
2020-08-18 16:12:43 +03:00
Aleix Pol
b755e6d91b
Fix using --scale on kwin_wayland windowed mode
2020-08-18 10:55:21 +00:00
Aleix Pol
3733e3e77f
Remove embedded implementation of the Virtual Keyboard
2020-08-18 10:55:21 +00:00
Aleix Pol
be22876348
Don't double-delete Window::handle
...
It also gets deleted when cleaning up the Workspace.
Found using ASAN.
2020-08-14 16:51:46 +02:00
Aleix Pol
71de41a570
Don't leak screens when cleaning up
...
Found using ASAN.
2020-08-14 16:50:39 +02:00
Vlad Zahorodnii
4ce853e8e4
Prettify license headers
2020-08-07 19:57:56 +00:00
Vlad Zahorodnii
1fb9f6f13a
Switch to SPDX license markers
...
The main advantage of SPDX license identifiers over the traditional
license headers is that it's more difficult to overlook inappropriate
licenses for kwin, for example GPL 3. We also don't have to copy a
lot of boilerplate text.
In order to create this change, I ran licensedigger -r -c from the
toplevel source directory.
2020-08-07 19:57:56 +00:00
Andrey Butirsky
307a9bc559
Avoid crash in KWin on Session leave
...
BUG: 420077
- hunk of original commit e8a1f8ecc
seems was lost during a94be708e
merge,
so restoring it again
- add missing check
Original Differential Revision: https://phabricator.kde.org/D28889
2020-08-06 12:21:03 +00:00
Andreas Haratzis
159fbc5ec4
Fix clipped shadows on useraction menus, when wayland and desktop scaling is enabled.
2020-08-05 11:54:54 +00:00
Vlad Zahorodnii
e7d02ad355
Introduce X11 default screen property in Application
...
This spares unnecessary looping through all available X11 screens.
2020-08-05 08:48:00 +00:00
Aleix Pol
d4cd2b5a6a
Account for OpenGLWindow::windowPixmap returning nullptr sometimes
2020-07-31 19:49:15 +02:00
Vlad Zahorodnii
d4ec18d844
Fix build
2020-07-29 15:35:50 +03:00
Chaojiang Luo
def9817a7e
fix:Check image map nullptr error
...
The map may be failed, we should check the image map is succeed first.
Signed-off-by: luochaojiang <luochaojiang@uniontech.com>
2020-07-29 12:11:17 +00:00
Aleix Pol
03b12d1dfc
drm: Use introspection to print enums
...
Removes a bit of code and allows to list the supported
transformations on the same line, which is useful to be able to
grep over the output.
2020-07-29 10:39:47 +00:00
Vlad Zahorodnii
2103b999e7
screencast: Address minor issues
2020-07-28 18:38:49 +00:00
Aleix Pol
02fc40fa4a
Make sure we don't leak the QPlatformFontDatabase using smart pointers
...
Found it when running KWin on ASAN
2020-07-28 08:19:41 +00:00