As long as there's something to minimize, do that.
Otherwise unminimize only the windows we minimized
on last invocation.
BUG: 356161
FIXED-IN: 5.6
REVIEW: 126225
In order to increase the security we disable ptrace on kwin_wayland.
This makes it impossible for a another process running as the same
user to attach to kwin_wayland to install a key logger. It doesn't
protect against higher privileged users, but that's no problem: they
can just read the input device file and don't need to attach to KWin
to become a key logger.
This change is highly inspired by a similar change to kscreenlocker.
A difference is that KWin checks whether we are running under a
debugger. In such a case we still want to allow ptrace.
Need to pass a proper env to ScreenLocker to ensure we don't mess
with the greeter's environment by e.g. unsetting QT_IM_MODULE or
setting EGL_PLATFORM.
Reviewed-By: Bhushan Shah
A recent change [1] led to Qt5PlatformSupport.pc not being installed
anymore. Pkg-config was only used for finding the paths, and the actual
include flags and library names were hardcoded in KWin's
FindQt5PlatformSupport.cmake anyway, so let's just focus on finding
Qt5Gui, the module which provides this Qt5PlatformSupport library, and
work from there.
Thanks to Hrvoje Senjan (shumski) for pointing me towards the upstream
Gerrit change.
[1] https://codereview.qt-project.org/140954/
REVIEW: 126234
The ctor used by kwin_x11 still had the call to init which is now
performed by SceneOpenGL. This means init was performed twice
ultimately hitting an assert when creating the overlay window.
This is needed to make KWin build-able on non-Linux, but is actually
only a workaround. The dependency should also be available on non-Linux.
This disables the EGL integration in the Wayland backend (QPainter still
available) and the EGL fallback in the qpa plugin (preferred context
sharing still available, but requires a working OpenGL Scene).
REVIEW: 126202
The implementation of VirtualTerminal is too linux specific and doesn't
compile on e.g. freebsd. Currently the most usage is in combination with
libinput. Only usage is:
* libinput related functionality in InputRedirection
* backends without custom input handling
Thus binding the feature to whether libinput is available is currently
the least invasive approach to get it compile on non-Linux.
In the long run this needs a different solution. The functionality
provided by VirtualTerminal is required and without the backends don't
work. It's needed to get notified about VT switches, when KWin needs to
stop rendering. So a solution for non-Linux needs to be found if
non-Linux wants to provide Wayland in future.
REVIEW: 126182
All backends already have an init method so far called from the ctor.
This change moves the call to init out of the OpenGL backends and makes
it the responsibility of the creating code to also call init on the
backend.
This change makes it easier to have virtual methods being called during
the initialization.
The backend is prepared for managing multiple x11 windows. Currently
it's still only one window, but it's all internally working through
the architecture for multiple windows.
For this AbstractBackend has a new virtual screenGeometries() method
which returns a QVector<QRect>. By default it's just one QRect at 0/0
with the size of the one screenSize().
The last stage for window rendering is triggered by
Scene::finalDrawWindow. Adding a security check there if screen is locked
no non-lock screen window should be rendered.
Unfortunately this method is virtual so the check needs to be done in the
base and all implementing child methods (currently only OpenGL).
REVIEW: 126144
Most of those effects didn't need special screen locking handling on
X11 as they prevented screen locking. On Wayland though, we don't
want the lock screen shown on a cube.
REVIEW: 126122
the stackingOrderChanged() signal came before the window turned an effect window
usually this is no problem as the change shall not be caught anyway, but
the window may have changed its stack position
BUG: 353745
FIXED-IN: 5.5
REVIEW: 126134
window wasn't correctly represented in
zoom, present windows and desktop grid effects
on the fly code streamlining:
- logout and above windows were handled equally in different code paths
- windows were painted on 0 opacity instead of just aborting the paint
local semi-paintdata because PaintData isn't assignable
(const dptr, I think) and we're post freeze.
BUG: 355539
FIXED-IN: 5.5
REVIEW: 126133
This is similar to the applications to start. That is the value of the
command line argument is interpreted as a command to start.
The difference is that when this application exits, KWin will also quit.
The argument is so to say interpreted as a session.
Reviewed-By: Bhushan Shah