For a virtual rendering backend a surfaceless context is needed. Such
a context may not call glDrawBuffer as that results in a GL error.
This change allows the OpenGLBackend to announce that it's context is
surfaceless.
If the surface indicates that it doesn't want keyboard focus we shouldn't
give it keyboard focus.
This was a problem with Kate's autocompletion tool tip windows.
REVIEW: 125553
So far we delegated to ShellSurfaceInterface, but it's possible that
we call into isFullscreen when the ShellSurfaceInterface is already
destroyed.
Note: the functionality needs to be slightly reworked. The fullscreen
state should change once we get a buffer for fullscreen, not when the
client requests it. This is a general pattern which is wrong also for
maximized, etc.
- tab theme and button items
- move menubutton close hint below checkbox (moved on top)
- use proper background palette on palette updates
REVIEW: 125393
KGlobalAccel plugin gets deleted by a global static. At that point
InputRedirection is already deleted but the plugin holds a static pointer
to it.
This change connects to the deleted signal by InputRedirection and
ensures that the plugin doesn't call into the deleted code any more.
The change to reflect the available plugins in the command line options
had side effects as that made it impossible to start KWin if certain
plugins are not available.
This change ensures that we only check the option value if they are set
in the first place.
In addition the multi checks to verify whether combinations are valid
is removed as that makes in reality no sense any more (only few plugins
installed by distros) and doesn't scale any more with the increasing
numbers of backends.
This is the beginning of a new testing era for KWin: finally we are
able to test against a running KWin. This works by making use of the
new virtual framebuffer backend for Wayland. It starts a specific
Application subclass which is mostly a fork of ApplicationWayland.
The individual tests are able to influence the socket name and the
size of the virtual screen. This is supposed to be done in
initTestCase. To know when KWin is fully started one can use the
workspaceCreated signal of KWin::Application. KWin is not started in
another process, but the kwin library is used, so the test has pretty
much full introspection to everything going on inside KWin. It can
access the Workspace, WaylandServer, fake input events through
InputRedirection and so on.
Once the test KWin is running it's possible to connect to it using
KWayland::Client library. This allows to introspect the Workspace
to see whether all worked as expected (e.g. correct stacking order,
active window and so on).
This first autotest is mostly meant to illustrate how to setup a
test and how one can use KWayland::Client to interact with the mock
KWin. For more tests it is suggested to move the connections to the
Wayland server in the init() and cleanup() methods.
The change also affects the qpa plugin: the specific check to only
run in binaries called kwin_wayland doesn't hold any more. This can
now be overwritten by an env variable.
Please note that this first test will probably fail in the CI system
as it might not have XWayland which is needed by KWin.
A new backend which doesn't present the rendered output. It uses a
QPainter scene, renders to a QImage but doesn't present it anywhere.
Thus a real virtual backend.
By exporting the environment variable KWIN_WAYLAND_VIRTUAL_SCREENSHOTS
the backend creates a temporary dir, prints the path to std-out and
saves each rendered frame into that directory. Of course with exit it
will be deleted again.
As distributions do not ship all plugins let's try to filter the options
based on the plugins which are actually available. There is no point in
allowing e.g. framebuffer just to notice then that the plugin is not
shipped ending in confusing error for the user. So let's only add the
options which actually make sense.
Distributions do package each backend plugin in a dedicated package,
which means just because KWin got compiled with a specific backend,
doesn't mean it is also available at runtime.
In order to better support this reality this change introduces a
list-backends command line option. Each of the plugins got the json
metadata extended by the KPlugin syntax, so that we have a name and
description to print.
As we already locate all plugins anyway, the additional findPlugins for
the selected backend is changed to search the list of all plugin meta
data.
AbstractClient now also supports mainClients, so we can do the
fullscreen window check on setActive in a general way. This ensures
that we do get proper stacking changes for activating fullscreen
shell clients.
Similar to what we have in Client::manage we should not always
invoke the Placement algorithm. E.g. an initially fullscreened window
should not get placed.
This needs to be extended for more checks similar to Client::manage
and might indicate that we also need a ShellClient::manage.
REVIEW: 125469
Whenever we set a transient we must register it with the parent and
remove it again. Also if a parent gets destroyed we must inform the
transients.
This fixes a crash in Deleted::copyToDeleted when connecting the main
clients. The crash condition was hit if the parent got destroyed
before the transient.
Reviewed-By: Marco Martin
Main purpose is to reproduce a crash if the parent window gets
destroyed before the transient. For this the following key combo
can be used:
t: show transient
k: close parent window
q: quit application
This currently causes reliably a crash in Deleted::copyToDeleted for
the connect of the mainClients.
Following the approach how it's done for X11: only create the interface
if the shader succeeded to compile and remove support again if it failed
to compile after a reconfigure.
REVIEW: 125444
Discovered by ASAN on the CI system causing the
TestClientMachine::hostName(ostname) to fail since it's enabled.
What happened is that the QByteArray returned by getHostName() gets
destroyed in the main thread but accessed in the resolve thread. This
is changed by calling getHostName in the resolve thread.
REVIEW: 125458
With Qt 5.5 the physicalSize of a screen is broken if the X system does
not provide the XRandR extension. This caused our screen edge test to
fail on the CI system (Xvfb) due to approach window being based on the
dpi.
The problem itself is addressed for Qt in:
https://codereview.qt-project.org/126808
This change just worksaround till the change has made it into our CI
system (at which point the expected fails will break).
Reviewed-By: David Edmundson
When pressing right control key the input gets grabbed/released.
The grab is for both keyboard and pointer and pointer is also confined
to the window.
How to grab/ungrab is added to the window title.
in a way so that each entry has its own
drawback: present mnemonics changed.
they however also change with i18n.
REVIEW: 125434
BUG: 319695
FIXED-IN: 5.5
the pseudo maximization sanitizes huge windows and
was/is the way kdelibs KMainWindow indicates maximization
It must however build up on the hinted maximization
and not MaximizeRestore, or it may falsely destroy
the maximization hint from the client (which now works
in KF5 ;-)
BUG: 352185
REVIEW: 125037
FIXED-IN: 5.5