It needs [1] from plasma-wayland-protocols.git or fails with
"outputmanagement_v2_interface.cpp:214:50: error:
'error_already_applied' was not declared in this scope" otherwise.
[1] f882bd942283262c27811a937e0d674d365ed72a
This class can be used to create an anonymous file, for instance
to pass data between compositor and clients, through means of a
file descriptor, as is done in various Wayland protocols, notably
the keymap exchange.
It also implements sealing the file, so that it can be shared
between multiple clients without them being able to modify it.
If supported, memfd_create is used, otherwise a `QTemporaryFile`
is used.
Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
The current code has multiple index-based for loops iterating over items we get from XCB
Dealing with raw indices is error-prone and not pretty
By using std::span we can replace these loops with range-based for loops
Also remove some intermediate containers that aren't neccesary
We assume that outputs in kwinApp()->platform()->enabledOutputs() are
stored in the xinerama order. However, this is not the case on Wayland
and it's not going to be changed because it increases the complexity.
This change makes Workspace::xineramaIndexToOutput() use Xinerama
extension API to map a xinerama index to the associated Output object.
With this, Xwayland applications will be able to put on outputs as
expected.
Note that xinerama indices are not cached because
Workspace::xineramaIndexToOutput() is not used in any hot code path. If
that changes, xinerama indices can be cached. The cache must be
invalidated whenever we get screens changed notify event from RANDR.
It seems it doesn't bring much and it may backfire. Especially don't
pass GBM_BO_USE_LINEAR as it will limit a lot the buffers that can be
created and GBM_BO_USE_RENDERING use seems to be more harmful than
helpful on most cases.
This makes KWin switch to in-tree copy of KWaylandServer codebase.
KWaylandServer namespace has been left as is. It will be addressed later
by renaming classes in order to fit in the KWin namespace.
When we do more color management stuff we'll need it in more places,
making it a hard requirement reduces the amount of needed ifdefs and
should make adding color management features a little simpler.
Allows removing some CMake checks config-kwin.h contents. This is
supported by all compilers and required for C++17. While touching those
lines I also cleaned up an unnecessary HAVE_UNISTD_H check (glibc always
has it and and incorrect use of HAVE_SYS_PROCCTL_H.
fbdev has been deprecated and unmaintained for a while. With Linux 5.14
including SimpleDRM driver, we can drop it. (at the time of writing this
commit message, the latest Linux version is 5.16).
kwin disables ptrace for a good reason - to prevent other processes from
attaching to kwin and snooping sensitive data or taking control of kwin.
But, that will also make things such as memory statistics unavailable to
read, etc.
On the other hand, the supported platforms where kwin runs all have
security measures in places to forbid shady processes ptrace'ing kwin.
For example, on Linux it's YAMA.
On Linux, by default, a process can ptrace only its descendants. For
example, this can be used by debuggers; otherwise you would need to be
the superuser to attach to any process.
This change drops our ptrace logic in favor of system provided security
measures. It allows the System Monitor to gather kwin's memory usage
statistics and also simplifies code, the current debugger detection
logic is not really robust.
If the system provided security measures are proven to be insufficient,
we can add the ptrace disabling logic back, but it would be great to
avoid that because system monitor won't be able to gather resource usage
statistics, which can be useful for detecting memory leaks in plasma
wayland session, etc.
Notifications are really only useful in a setting with a full
shell environment where there is a notification center to display them.
Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
None of the features it adds ontop of `QComboBox` are used.
Allows to drop the dependency on KCompletion.
Signed-off-by: Eike Hein <eike.hein@mbition.io>
The ifdefs for have_gbm obfuscate the code unnecessarily - the drm backend
is not a great experience with qpainter, so in practice noone should ship
it without gbm anyways.
The proprietary NVidia driver now supports gbm, which vastly improves the
user experience. For older devices that will not get gbm support dropping
EglStreams will likely not have a big impact as it has several session breaking
issues anyways.
By removing the backend a lot of logic can be simplified, most notably multi-gpu.