Commit graph

419 commits

Author SHA1 Message Date
Fabian Vogt
6e1564fc17 gbm_dmabuf: Fix crash if gbm_bo_create fails
And perform proper cleanup if eglCreateImageKHR fails.
2021-09-23 16:09:11 +00:00
Xaver Hugl
416f55cea3 platforms/drm: fix hidden cursor
BUG: 438824
2021-09-23 15:54:18 +02:00
Vlad Zahorodnii
ca1c72dd16 wayland: Fix cross cursor in Xwayland apps
Startup code in plasmashell was changed so xsetroot is not called
anymore, which is sort of fine.

Unfortunately (or not?), it exposed a bug in kwin. Cursor::x11Cursor()
only works in the standalone X11 session.

On Wayland, Cursor::x11Cursor() will return XCB_NONE which results in
seeing cross cursor when there should be arrow cursor.

This change moves xcb_cursor_t look up code from X11Cursor to the base
Cursor class. In hindsight, I would like to introduce a window manager
class where the xcb cursor and other x11 specific code can be moved in
the future for better encapsulation of platform-specific code.

CCBUG: 442539
2021-09-23 13:52:51 +00:00
Vlad Zahorodnii
df11acd467 x11: Cast Window to EGLNativeWindowType using a C cast
reinterpret_cast<>() will fail if the types we cast from and to have
mismatching sizes.

Unfortunately, there are platforms that have Window and
EGLNativeWindowType of different size. This results in compilation
errors.

In order to work around those problematic platforms, this change
replaces reinterpret_cast cast with a c style cast.
2021-09-23 09:41:19 +03:00
Amir Maimon
51925567f6 platforms/drm: Fix explicitGpus check
The check for explicitGpus in udev event handler was limited to new
GPUs, and didn't consider changes to the GPU driver, eg. from vfio-pci
to amdgpu
2021-09-23 06:35:28 +00:00
Xaver Hugl
6d79d855be platforms/drm: waitIdle before updating outputs
KMS can only ever have one frame pending at the moment. If we
update the outputs while a pageflip is still pending on any output
the atomic commit will fail with EBUSY, which both invalidates
the testing for output configuration and makes applying the wanted
configuration fail.

This can be removed again once KMS gains the ability to do mailbox
presentation; that will likely still take a while though.

BUG: 442677
2021-09-21 14:18:16 +02:00
Vlad Zahorodnii
2200febcd6 Restore fbo binding after updating surface texture from EGLStreams
Currently, data from client buffer EGLStream is copied to a surface
texture. An fbo is used for that purpose. The main issue with it is that
it doesn't restore the old framebuffer binding.

The surface texture can be updated in the middle of a compositing cycle.

If the framebuffer binding is not restored, any window that must be
rendered in an offscreen texture won't be rendered to the offscreen
texture.

This change makes EglStreamSurfaceTextureWayland restore the fbo binding
so the DeformEffect and software screen rotation work as expected with
the proprietary NVIDIA driver.

BUG: 442697
2021-09-21 12:41:45 +03:00
Jan-Marek Glogowski
6ead28a6a1 composite: adjust terminal messages (prio + text)
This makes the compositingPossible() output more elaborative,
and adjusts their priorities to qCWarning.

I thought about dropping the "Compositing is not possible"
(qCCritical) message. It's not critical for X11 and Wayland
depends on OpenGL. OTOH it's from a different component. So in
the end I settled for qCWarning again; there is no real way
to know, if the platform will consider this a critical problem
(and eventually abort).

Then I saw X11StandalonePlatform::compositingNotPossibleReason,
which has more user friendly, QT Richtext / HTML encoded output,
but this seems overkill for the terminal; now I would like to
know, where this is actually used...

While at it report "manually" suspended compositing via qCInfo
instead of qCDebug.
2021-09-20 13:18:33 +00:00
Jan-Marek Glogowski
bcdf047018 composite: log when disabled via OpenGLIsUnsafe
After updating my Debian buster to bullseye, I noticed missing
shadows / composite for KDE, which made overlapping windows hard
to recognize.

.xsession-errors just had "kwin_core: Compositing is not possible".
Using the suggested QT_LOGGING_RULES="kwin_*.debug=true" didn't
provide any more clues; nothing I tried did.
Eventually I ended reading the kwin source and found, that
disabled composite via kwinrc :: [Compositing] :: OpenGLIsUnsafe
was not reported.

IMHO all these disabling cases should use qCCritical(KWIN_CORE),
like the "Compositing is not possible" message, but for the time
being, this simply logs the OpenGLIsUnsafe reason, just like all
the others.
2021-09-20 13:18:33 +00:00
Vlad Zahorodnii
f2b6a6b2f6 scenes/opengl: Fix null dereference in OpenGLWindow::windowTexture()
If the SurfaceItem has no SurfacePixmap, kwin will crash when trying to
access the surface texture.

BUG: 437709
2021-09-20 12:39:28 +00:00
Xaver Hugl
e004f1b7fc platforms/drm: fix buffer re-using
We don't always have explicit modifiers when we're using AMS

CCBUG: 442677
2021-09-20 14:28:58 +02:00
Xaver Hugl
cf7cc0d43e Implement DRM leasing 2021-09-17 23:09:08 +02:00
Xaver Hugl
ca869e2bc5 platforms/drm: disable explicit modifiers by default
There are some unresolved issues where driving outputs can fail because
of bandwidth constraints. These don't appear to happen with implicit
modifiers, or at least they don't happen as often.
2021-09-17 13:52:07 +00:00
Xaver Hugl
4848964c60 platforms/drm: allow modesets when setting Broadcast RGB
CCBUG: 442520
2021-09-17 15:48:40 +02:00
Alexander Lohnau
08d3ceb024 Port to new KDecoration2::DecorationThemeProvider class
By supporting all the required attributes in the DecorationThemeMetaData class
the custom struct can be dropped.

Task: https://phabricator.kde.org/T14744
2021-09-17 12:45:47 +00:00
Fabian Vogt
e26ea6bf23 Fix build on 32bit platforms
error: invalid cast from type ‘uintptr_t’ {aka ‘unsigned int’} to type ‘EGLNativeWindowType’ {aka ‘long unsigned int’}
2021-09-17 10:59:29 +00:00
Xaver Hugl
a7a515a0af platforms/drm: re-use buffers for testing
b38bb416 introduced flicker when restarting compositing because the
DrmGpu::findWorkingCombination method usually creates new buffers for
the commit, without rendering into them. Instead of that, re-use
existing buffers where possible
2021-09-17 11:56:20 +02:00
Xaver Hugl
d308262d4a platforms/drm: simplify active handling a bit 2021-09-17 11:34:51 +02:00
Xaver Hugl
15da95149d platforms/drm: add a method for setting legacy properties 2021-09-16 18:03:14 +02:00
Xaver Hugl
e88f2501bf platforms/drm: simplify DrmPipeline::checkTestBuffer 2021-09-16 18:03:14 +02:00
Xaver Hugl
3fc74f103a platforms/drm: drop some unused methods 2021-09-16 18:03:14 +02:00
Xaver Hugl
99cd923e4a platforms/drm: simplify format stuff a bit 2021-09-16 18:03:14 +02:00
Xaver Hugl
b3e245b177 platforms/drm: make SRC properties readable
They're 16.16 fixed point. Should make debugging easier
2021-09-16 18:02:36 +02:00
l10n daemon script
b461111130 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-09-16 01:18:13 +00:00
Severin von Wnuck
05af11b4ed qpa: Fix EGL config selection
The configs returned by eglChooseConfig are sorted from highest to lowest buffer sizes.
Filter the configs to find a suitable candidate that matches the requested attributes of the surface.
This fixes the corrupted Aurorae window decorations on Wayland with the proprietary Nvidia driver.
2021-09-16 00:37:19 +02:00
Andreas Sturmlechner
38e24ecd64
Fix build with 32-bit
Follow-up to 839710201c

Tested-by: David Flogeras <dflogeras2@gmail.com>
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2021-09-15 19:06:23 +02:00
Xaver Hugl
b8d69a326c platforms/drm: improve VT switching behavior
Instead of setting pipelines one by one, use DrmGpu::updateOutputs to
set all the outputs on a GPU with a single atomic commit. This makes
the switch both faster, more reliable and in case the other drm master
changes the output configuration, prevents blanking.
2021-09-13 16:58:49 +02:00
Aleix Pol
2bd02f660b wayland platform: Remember to call setTransformInternal() from updateTransform() 2021-09-13 10:11:09 +00:00
Vlad Zahorodnii
839710201c x11: Fix build with EGL_NO_PLATFORM_SPECIFIC_TYPES
eglCreateWindowSurface() wants a Window (unsigned long), but with
EGL_NO_PLATFORM_SPECIFIC_TYPES, EGLNativeWindowType is defined as an
opaque pointer, i.e. void*.

BUG: 440372
2021-09-13 06:37:19 +00:00
Xaver Hugl
e10f2ce06e platforms/drm: correct property blob handling
If a property blob got created by another drm master we can't rely on
re-using it, so create a new blob of our own with the data copied over
when the kernel destroys it.
Also free property blob objects when we don't need them anymore.

BUG: 440294
2021-09-13 01:28:47 +02:00
Aleix Pol
883dbfda17 drm: Properly check for the need for transformation
At the moment we were checking for size difference between the buffers
which works for rotation but not for flipped or up-side down screens.

This changes how we check it by comparing the effective transform vs the
supported one in drm to see if they differ.

Fixes https://invent.kde.org/plasma/plasma-phone-components/-/issues/112
2021-09-10 20:11:57 +02:00
l10n daemon script
84426e8082 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-09-10 01:18:40 +00:00
Xaver Hugl
1b504818a3 platforms/drm: improve warning messages in DrmPipeline 2021-09-09 19:52:01 +00:00
Xaver Hugl
a0a98d0b31 platforms/drm: only delete outputs if not pre-existing
When there aren't enough CRTCs to drive all the outputs this could
delete existing outputs.
2021-09-09 19:52:01 +00:00
Xaver Hugl
b89f04943c platforms/drm: only test combinations if there are any
Otherwise we could hit an assert in DrmPipeline
2021-09-09 19:52:01 +00:00
Xaver Hugl
ffc4c12548 platforms/drm: commit pipelines directly instead of testing
The current behavior seems to cause some issues, and this is faster and
more efficient.
2021-09-09 19:52:01 +00:00
Aleix Pol
2ef53e7350 drm: Make hardware rotation opt-in
The current implementation sometimes will leave the screens unusable,
therefore KWIN_DRM_SW_ROTATIONS_ONLY=1 is default.
Use KWIN_DRM_SW_ROTATIONS_ONLY=0 to test hardware DRM operations.
2021-09-09 16:54:35 +00:00
l10n daemon script
16f5ce9361 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-09-08 01:27:17 +00:00
Xaver Hugl
b38bb41698 Test DrmPipelines for outputs
Not all combinations of connectors, crtcs and planes will work
on all hardware, so we need to test the pipelines before using
them.

BUG: 433107
CCBUG: 435265
2021-09-08 02:44:29 +02:00
Xaver Hugl
18a8245ca2 platforms/drm: rename user data in DrmPipeline to output 2021-09-07 23:36:32 +02:00
Xaver Hugl
65b55e2045 platforms/drm: change when to reset the output with eglstreams
In order to accomodate crtc or primary plane changes on outputs we
need to dynamically recreate rendering resources with EglStreams as
the stream is tied to the crtc or plane currently in use.
2021-09-07 23:36:32 +02:00
Xaver Hugl
f82d9f3d23 platforms/drm: remove duplicated warning
The same warning already gets printed in DrmPipeline
2021-09-07 21:34:01 +00:00
Xaver Hugl
e59f50e599 platforms/drm: adjust how transforms are set
Instead of using setTransformInternal directly, have DrmOutput
set it in updateTransform, like with the other setters. Also use
updateTransform instead of setTransformInternal in DrmBackend, so
that hardware rotation can be used where possible.
2021-09-07 21:34:01 +00:00
Xaver Hugl
1af2067f40 platforms/drm: reload m_conn in DrmConnector::updateProperties 2021-09-07 21:34:01 +00:00
Kai Uwe Broulik
8bebf5cee1 Port to function-pointer based QMetaObject::invokeMethod
It's more efficient and compile-time checked
2021-09-07 06:30:39 +00:00
Xaver Hugl
ed2d0979c7 platforms/drm: fix warning 2021-09-07 05:45:51 +00:00
Xaver Hugl
237ef3d47f platforms/drm: fix drmModeSetCursor2 fallback
the return value is -errno, not errno.
2021-09-07 05:45:15 +00:00
Vlad Zahorodnii
b40fb76c71 platforms/wayland: Prepend KWayland::Client:: to Surface 2021-09-06 10:42:03 +00:00
Vlad Zahorodnii
1d54231df1 scene: Generate unnormalized shadow texture coords
This makes shadow texture coordinates consistent with surface and
decoration texture coords and allows reusing window quads between
kwin items and qtquick items more easily.
2021-09-06 12:17:44 +03:00
Columbariu s
2fbeb0abc1 screencast/pipewire: Add TODO marks for extending modifier capabilities
no_use_linear: dropping the gbm GBM_BO_USE_LINEAR flag on allocation
explicit_modifiers: moving from the modifier-less api to the modifier
aware one with explicit modifiers
2021-09-03 17:49:37 +00:00
Columbariu s
150ebf0cf7 screencast/pipewire: announce format with modifier 2021-09-03 17:49:37 +00:00
Columbariu s
8a2475da63 screencast/pipewire: Add buildFormat method 2021-09-03 17:49:37 +00:00
Columbariu s
b05900e242 screencast/pipewire: Check for a modifier in the format negotiation via pipewire 2021-09-03 17:49:37 +00:00
David Edmundson
78439fd3e7 Avoid test commit whilst constructing DrmOutput
Otherwise we'll try to render a frame on an output before making the
output, which segfaults.
2021-09-03 16:43:48 +00:00
Xaver Hugl
c48ac020cd platforms/drm: correct cursor dirty handling 2021-09-03 18:26:23 +02:00
Xaver Hugl
5da8df39a5 AbstractWaylandOutput: make updateMode use uint32_t 2021-09-02 14:34:07 +02:00
Xaver Hugl
26ad8e194f platforms/drm: support Broadcast_RGB setting
This allows the user to switch between full and limited rgb.

BUG: 375666
BUG: 353689
2021-09-02 13:53:02 +02:00
Xaver Hugl
f096629f89 platforms/drm: refactor drm property enums 2021-09-02 13:48:58 +02:00
Méven Car
0a2c511489 Wayland: Add support for protocol kde-output-device_v2, allow to detect drm mode changes
CCBUG: 407058
2021-09-01 13:37:43 +00:00
Xaver Hugl
a3cbaf48dc platforms/drm: fix modifier env variable
Like the name suggests, modifiers were meant to be enabled by default
2021-08-31 16:30:03 +00:00
Vlad Zahorodnii
d70cfadf96 platforms/drm: Fix outputDisabled signal
The outputDisabled() signal must be emitted **after** removing the
output from a list of enabled outputs.
2021-08-31 16:02:19 +00:00
Xaver Hugl
85a6dc3cad platforms/drm: correct multi-gpu mistake
As all outputs from secondary GPUs are in the same map as the ones from
the primary GPU, EglMultiBackend::findBackend always returned the
primary backend. To fix that, search in secondary backends first
2021-08-30 23:00:19 +02:00
Vlad Zahorodnii
89d49b4d5d platforms/virtual: Add new outputs before removing old outputs
This is to prevent hitting the case where there are no any outputs.
Ideally, it shouldn't matter in which order outputs are added or
removed, but the Workspace and AbstractClient subclasses don't work
with true headless mode. If there are no outputs, kwin can crash.
2021-08-30 15:08:52 +00:00
Xaver Hugl
f4d63bb8ed platforms/drm: first emit outputDisabled, then remove output
The current behavior is in contradiction to the description of
Platform::outputDisabled
2021-08-30 16:24:25 +02:00
Xaver Hugl
dbf4a59527 platforms/drm: prevent having zero outputs at any time
Instead of updating all outputs first, create the placeholder output
before the last output gets removed.
2021-08-30 16:24:08 +02:00
Vlad Zahorodnii
8a93a33b96 x11: Make sure that outputs are stored in xinerama order
With the new output query algorithm, position of an output may not align
with its xinerama index. This can be problem on x11 as some protocols,
e.g. startup feedback, use xinerama indices to identify outputs.

Technically, the RandR specification doesn't say that CRTCs are stored
in the xinerama order, it only mentions that the first CRTC corresponds
to the primary output. However, such assumption was made by kwin prior
to output query changes, this change merely restores that behavior.
2021-08-30 13:28:53 +00:00
Vlad Zahorodnii
813804d5a0 x11: Port X11Output::setGammaRamp() to Application::x11Connection()
It's faster.
2021-08-30 12:16:24 +00:00
Vlad Zahorodnii
96830d2295 x11: Simplify X11Output::geometry()
There is a separate type for placeholder x11 outputs, so X11Output can
return its geometry without performing any checks.
2021-08-30 12:16:24 +00:00
Xaver Hugl
0054d825c4 platforms/drm: directly check for required properties
Instead of crashing because a nullptr property gets accessed, use
an explicit error message and ignore the offending object. This also
acts as documentation
2021-08-27 20:25:18 +00:00
Xaver Hugl
d6de38c1d6 platforms/drm: use drm formats instead of gbm formats
There's no need to guard the code, gbm and drm format definitions
are the same. Using GBM_BO_FORMAT_* even caused bugs, as that is
an enum and not a proper format identifier.

BUG: 441253
2021-08-27 11:56:36 +00:00
Xaver Hugl
092660613a platforms/drm: fix legacy mode
CCBUG: 441253
2021-08-27 11:50:02 +00:00
Vlad Zahorodnii
ff87b33a8a Port away from EffectsHandler::screenGeometryChanged() to EffectsHandler::virtualScreenGeometryChanged()
It's confusing to have two signals (virtualScreenGeometryChanged() and
screenGeometryChanged()) that indicate the same thing.

This change ports parts of kwin from the screenGeometryChanged() signal
to the virtualScreenGeometryChanged() signal with the main motivation to
drop the former.

The virtualScreenGeometryChanged() signal was chosen as the replacement
for the consistency sake with EffectsHandler's virtualScreenGeometry and
virtualScreenSize properties.
2021-08-27 09:23:33 +00:00
Vlad Zahorodnii
bd6d04b417 x11: Pass the output name to X11Output constructor
The output name is static, i.e. it cannot change, so there's no point
for having a setter.
2021-08-27 08:23:22 +00:00
Vlad Zahorodnii
a8810e0c33 x11: Rework how X11 outputs are queried
Currently, there are a couple of issues with output querying on X11:

(a) if an output is changed, for example its transform has been changed,
    then all outputs will be destroyed and created again

(b) it's possible to encounter the case where the platform has no
    outputs. The X11Platform destroys all outputs, then queries new
    outputs. The Workspace and AbstractClient sub-classes handle having
    no outputs very poorly! It's even possible to hit a crash.

With this change, outputs will be queried similar to how it's done on
Wayland.
2021-08-27 08:23:22 +00:00
Xaver Hugl
83ccfbb571 platforms/drm: exit more cleanly if we can't find a buffer config 2021-08-26 16:10:26 +00:00
Xaver Hugl
ef48c247e6 platforms/drm: re-add some logging for egl configs
But only print it when KWin can't find a fitting config

CCBUG: 441253
2021-08-26 17:38:58 +02:00
Vlad Zahorodnii
8d422f3005 Remove globalPos() in AbstractWaylandOutput
It's confusing to have globalPos() and geometry() as both can return the
same information.

This change drops globalPos() function as it's not used outside the
AbstractWaylandOutput class and renames setGlobalPos() to moveTo() to
avoid having a setter without matching getter.
2021-08-26 16:35:41 +03:00
Ahmad Samir
2c2469f991 Fix clazy warning: Use QString() multi-arg
No need to use arg(QString::number(int )), when arg() already has a int
overload.

Also replace "endl" with "Qt::endl".

GIT_SILENT
2021-08-25 20:09:55 +00:00
Aleix Pol
9a4bbdf226 Make it possible for an effect to render a screen
Useful in case it needs the contents of the screen but they can't be
blitted, as the state of the framebuffer is unknown.
2021-08-25 14:44:03 +00:00
Xaver Hugl
5cc5d81cea guard gbm version for gbm_bo_get_fd_for_plane 2021-08-25 14:39:35 +00:00
Xaver Hugl
1be65e818c Port screenId based rendering methods to AbstractOutput 2021-08-25 13:53:33 +02:00
Xaver Hugl
e6cab81b53 platforms/drm: multi-gpu buffer import with modifiers 2021-08-25 13:30:49 +02:00
l10n daemon script
e227e93792 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-08-25 01:15:54 +00:00
Xaver Hugl
fbff8636b9 platforms/drm: fix gpu removal
As soon as m_backends.removeOne(*it) returns, "it" no longer
points to the same value.

CCBUG: 441372
2021-08-24 12:36:44 +00:00
Ahmad Samir
9f41691684 fix clazy warning: Pass a context object as 3rd connect parameter
GIT_SILENT
2021-08-23 23:02:46 +00:00
Xaver Hugl
1e572a4299 platforms/drm: make debug logging less verbose 2021-08-23 21:53:21 +00:00
l10n daemon script
76d1de48a8 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-08-22 01:17:35 +00:00
Vlad Zahorodnii
dd6a60beea qpa: Implement QPlatformWindow::requestActivateWindow() 2021-08-19 06:30:55 +00:00
Xaver Hugl
2e0336681f platforms/drm: consider KWIN_DRM_DEVICES for hotplugged gpus 2021-08-17 19:23:35 +02:00
Xaver Hugl
566223b190 platforms/drm: fix crashing debug operator 2021-08-16 14:58:34 +00:00
Xaver Hugl
26dff99f78 platforms/drm: explicit modifiers
IN_FORMATS contains information about which buffer formats can be
scanned out with a given drm plane. Using these plane-specific
format+modifier combinations as well as explicit modifiers in
general can yield bandwidth and performance improvements,
especially in multi-gpu systems.
2021-08-16 16:56:32 +02:00
Vlad Zahorodnii
7f883fa724 Make EGL_KHR_surfaceless_context mandatory
We use surfaceless contexts with internal windows. We also require
the EGL_KHR_surfaceless_context extension for making context current
without outputs.

Arguably, we could use pbuffers, but since mainstream drivers (Mesa and
NVIDIA) support surfaceless contexts, the extra complexity doesn't buy
us anything.
2021-08-16 10:56:46 +00:00
David Edmundson
46980c0bb4 Fix crash in nested wayland backend on startup
In a recent refactor screens are only created when our xdg_surface has
been acked. This leaves a window where m_waylandCursor is null and
events are still being processed.
2021-08-16 08:09:42 +00:00
l10n daemon script
214a318811 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-08-16 01:12:48 +00:00
l10n daemon script
d6f16882ff 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-08-14 01:18:16 +00:00
Vlad Zahorodnii
7e9c6587db Remove scene window traces in scene items
This further decouples scene items from scene windows. The SurfaceItem
still needs to access the underlying window, I would like to re-iterate
over that later.

With this change, it will be possible to introduce WindowItem factory
function in the Toplevel class.
2021-08-12 17:52:24 +00:00
Vlad Zahorodnii
a13fd02ea8 Remove virtualdesktops.h include in toplevel.h
toplevel.h is included in many places. Changing virtualdesktops.h may
trigger rebuild of all kwin.

With this change, only cpp files that use virtualdesktops.h will need to
be recompiled.
2021-08-12 17:23:15 +00:00
Manuel Stoeckl
51d82fc6e5 Replace an old workaround for alpha-only shadows
SceneOpenGLShadow::prepareBackend used to use QImage::Format_Indexed8,
plus a special code path in GLTexture, to create single-channel OpenGL textures.
Now that Qt supports QImage::Format_Alpha8, this workaround can be removed.
2021-08-11 23:32:18 -04:00
l10n daemon script
4ab4f928f0 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-08-12 01:14:37 +00:00
Vlad Zahorodnii
4912c7cfa2 scenes/opengl: Calculate item transforms differently
Currently, a vertex coordinate is transformed first, then mapped to
the global screen coordinates. This causes a problem if a transform
is applied to the top-most item and child items are not at (0, 0).
For example, scaled windows may have popping out sub-surfaces, etc.

With this change, the item transforms will be computed differently. For
example, if the parent item is transformed, a child's transform will
look as follows

  [Parent's translation][Parent's transform][Child's translation]

instead of

  [Parent's translation][Child's translation][Parent's transform]

In the future, I'd like to get rid of the Item::setTransform() call in
OpenGLWindow::performPaint() and have either AnimationEffect or
libkwineffects call Item::setTransform().

BUG: 440201
2021-08-11 19:43:31 +03:00