Currently, ExpoLayout delays layout updates by using a singleshot timer
(primarily due to the author of the effect not being aware of
QQuickItem::polish() and QQuickItem::updatePolish()).
This change makes ExpoLayout schedule layout updates using QtQuick's
native item polish machinery, which gets triggered before rendering and
thus we can batch more geometry updates.
In addition to that, this change simplifies the initialization code in
ScreenView by making the fact that ExpoLayout is arranged right before
rendering internal to the WindowHeap type.
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
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.
Due to the screen edges test not being an integration test, it's very
hard to change output related code in libkwin. screens.cpp needs to have
a few ifdefs to successfully compile.
This change rewrites the screen edges test as an integration test in
order to allow us using other components of kwin in screens.cpp and
screenedge.cpp without ifdef guards.
It's not a one-to-one port.
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.
Active output is a window management concept. It indicates what output
new windows have to be placed on if they have no output hint. So
Workspace seems to be a better place for it than the Screens class, which
is obsolete.
This allows us to drop obsolete Screens class.
Currently, the Screens class is a thin wrapper around platform outputs +
some extra tracked state, e.g. active output, workspace geometry, etc.
This is a little helper that can be very convenient with our transition
from int-based screen ids to AbstractOutput.
As is, the main issue with int screen ids is that they are extremely
dynamic.
Instead of crashing because a nullptr property gets accessed, use
an explicit error message and ignore the offending object. This also
acts as documentation
With AbstractOutput being used more heavily, it makes sense to have
something like Screens::number() in the Platform class. As is, the steps
to get an output for a given point are awkward - first, get the screen
id, then use the screen id to get the output.
With the new virtual desktop model, we have an issue where the old
code that uses desktop() needs to be ported to desktops().
However, using no desktop() is better as we don't need to deal with
cases where a window can be on several desktops, which can be annoying
sometimes.
This change removes the desktop arg in electricBorderMaximizeGeometry()
and ports it to a Workspace::clientArea() overload that requires no
desktop.
Under the hood, Workspace::clientArea() still uses desktop(), but it
could also use a different strategy to compute the client area if the
window is on several virtual desktops, e.g. intersect client area on
every virtual desktop.
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