I am trying to cross-compile and since qtwaylandscanner_kde is used
during the build, I need to build a native version of the
qtwaylandscanner_kde tool first. This change allows building
qtwaylandscanner_kde as a standalone CMake project which the cross-build
can then be pointed at to find the host tool. If an explicit path to
qwaylandscanner_kde is not passed, we will try to use ExternalProject_Add
to build it. This approach was taken from ksyntaxhighlighting:
https://invent.kde.org/frameworks/syntax-highlighting/-/blob/master/src/indexer/CMakeLists.txt
This patch makes it significantly easier to cross-compile KWin, as we now
only need a native QtCore library instead of all the dependencies.
The Scene no longer clips window quads if the specified paint region is
infinite. The infinite region is defined as (INT_MIN/2, INT_MIN/2,
INT_MAX, INT_MAX). If you try to scale the infinite region, you will
easily hit integer overflow.
This change makes the DeformEffect disable geometry clipping if the given
paint region is infinite region in order to avoid hitting integer
overflow.
This allows to toss a large amount of custom rendering code.
Furthermore, it removes the build-time dependency on Plasma Framework
for FrameSvg and Theme from KWin core as it's pulled in through QML
imports now.
It also cleans up the API and removes functions that are effectively
unused or no-op after this change.
For instance, effects often destroy their effect frames
in pre/postPaintScreen, which would now destroy an `OffscreenQuickView`,
which changes GL context. This is alleviated by delaying detruction
of the internal view.
Support for the features of text cross-fade and selection frame,
which are not used by any of the built-in effects, is dropped.
Signed-off-by: Eike Hein <eike.hein@mbition.io>
The lanczos filter depends on the effect system. It makes very difficult
changing painting code from SceneWindow to Item.
Given that the last big users of the laczos filter - present windows and
desktop grid effects were re-written in QML. The only remaining user of
the lanczos filter is the thumbnail aside effect. Given that it's a
really obscure usecase, switching to the linear filter won't be very
noticeable.
As a backup plan, one can reimplement the thumbnailaside effect using
QML. The lanczos filter is already implemented in plasma-framework.
The first time the GBM backend's EGL context is made current after
creation, both the read and draw surfaces are set to EGL_NO_SURFACE.
This will set the GL read and draw buffers to GL_NONE in accordance with
the EGL spec.
When a real surface is later made current, however, the spec is arguably
unclear on whether the read and draw buffers should remain set to
GL_NONE or whether they should be restored to the default GL_BACK. The
Mesa driver does the latter, the NVIDIA driver does the former.
To work around this difference, Kwin has an explicit call to
glDrawBuffer in GbmSurface::makeContextCurrent. It does not have a
corresponding call to glReadBuffer, though, which can cause some desktop
effects such as background contrast to render incorrectly with the
NVIDIA driver. This change adds that missing call.
Workspace::findAbstractClient(QUuid) overload is used only by the
windows krunner plugin.
This change fixes a potential null dereferencing and removes the
findAbstractClient() overload in favor of a more generic findToplevel()
overload.
Releasing the buffers is necessary for example in the case of a GPU reset,
to make sure that the gbm surface is still properly destroyed and all buffers
with invalid content freed.
Instead of buffers being both drm framebuffers and gbm / dumb buffers, these
responsibilities are now split, which makes it possible to do zero copy
screen casting in the future.
Both framebuffers and gbm / dumb buffers also now always hold a valid underlying
resource, which simplifies code a bit.
since it has been replaced by windowview, and Desktop Grid
is ported as well, remove present windows which is effectively dead code
now
BUG:447001
BUG:362844
BUG:450487
BUG:453426
BUG:374481
BUG:185381
BUG:413342
BUG:451150
BUG:283333
BUG:315314
BUG:397500
BUG:321236
BUG:436572
BUG:335782
* give windowview the ability to show windows from current desktop, all
desktops or current class
* invokable from shortcuts screen edges or gestures
* add a search field to quickly filter
* current present windows effect still present but only internal as is used by desktop grid, which should eventually be ported as well
This can be done either from windowview or overview, tough note that some of the duplication from overview added in windowview is necessary regardless, as WindowHeap, the shared qml part needs some properties exposed from the c++ part.
Implementation wise I'm ok for it being in either place, but i think the functionality of present windows needs to be preserved, otherwise would be a completely unacceptable regression, namely:
* Behavior of what now are the ctrl+f7,f10 and f11 global shortcuts, showing windows of current app (invokable by shoortcut instead of having to use the pointer), windows of current desktop (the only thing overview does atm) or all desktops
* filter on typing, as opposed to invoking krunner. main use case of present windows is quickly switching, and filtering is the most helpful feature, some people do like krunner instead, but is completely out of place for my use case, and i suspect for many other users as well
* also clicking on a taskbar group should be possible to filter
* the view that opens by clicking on a taskbar group should follow the same layout strategy used elsewhere and currently being an effect used only there and not accessible form the list can't even be configured