Commit graph

13623 commits

Author SHA1 Message Date
Martin Gräßlin
29b2082daa [wayland] Honor ShellSurfaceInterface::acceptsKeyboardFocus in ::wantsInput
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
2015-10-08 12:51:49 +02:00
Martin Gräßlin
0bb4498e1d [wayland] Proper metatype for ShellClient
Needs meta type declared and properly used in WaylandServer.
2015-10-08 12:51:40 +02:00
Martin Gräßlin
3cb8438399 [wayland] Keep transient state directly in ShellClient
So far we delegated to ShellSurfaceInterface, but it's possible that
we call into isTransient when the ShellSurfaceInterface is already
destroyed.
2015-10-08 11:04:06 +02:00
Martin Gräßlin
b35c3e8501 [wayland] Keep fullscreen state directly in ShellClient
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.
2015-10-08 10:05:40 +02:00
Thomas Lübking
f3cfbacb1e do not grab server during manage
REVIEW: 125474
2015-10-05 23:41:45 +02:00
Thomas Lübking
7a38b21f49 do not reinterpret_cast insufficient data
BUG: 341010
FIXED-IN: 5.5
REVIEW: 125513
2015-10-05 23:41:16 +02:00
Thomas Lübking
7e72aee474 return sane screen geometry on missing randr
may help in the xinerama case, follow up to
https://git.reviewboard.kde.org/r/125074/

REVIEW: 125456
2015-10-05 23:40:57 +02:00
Thomas Lübking
ed2314dfbe overhaul of deco kcm
- tab theme and button items
- move menubutton close hint below checkbox (moved on top)
- use proper background palette on palette updates

REVIEW: 125393
2015-10-05 23:40:46 +02:00
Martin Gräßlin
be7e9249cf [globalaccel] Ensure we don't call into deleted InputRedirection on shutdown
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.
2015-10-05 14:47:15 +02:00
l10n daemon script
83cc5f5842 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-10-05 10:23:58 +00:00
l10n daemon script
43c35c1c6c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-10-04 10:50:57 +00:00
Martin Gräßlin
eed5531b4f [wayland] Rework command line checks for platforms
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.
2015-10-03 20:14:16 +02:00
l10n daemon script
c342be5961 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-10-03 11:20:49 +00:00
Martin Gräßlin
b74cae4dbe [autotests] And remove the problematic code
Last version of 4b917da861 was even
worse: doesn't compile. So let's just remove it completely.
2015-10-03 10:04:28 +02:00
Martin Gräßlin
4b917da861 [autotests] Only use QTest::setMainSourcePath if we have Qt 5.5
Update to f5fbdaa6ca which didn't solve
the problem. Seems to be new function in Qt 5.5.
2015-10-03 09:50:37 +02:00
Martin Gräßlin
f5fbdaa6ca [autotests] Don't use QTEST_SET_MAIN_SOURCE_PATH
It fails to build on Kubuntu's CI. Apparently not defined, let's use
what it resolves to on the author's system.
2015-10-02 16:02:13 +02:00
Martin Gräßlin
7fed20f136 [autotest] Welcome to integration testing KWin
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.
2015-10-02 15:14:41 +02:00
l10n daemon script
4b74b294ab SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-10-02 10:17:30 +00:00
Martin Gräßlin
bfa9646d1d [wayland] Add a virtual framebuffer backend
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.
2015-10-02 10:58:33 +02:00
Martin Gräßlin
007a317099 [wayland] Add options depending on available backend plugins
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.
2015-10-02 09:47:27 +02:00
Martin Gräßlin
fc0272f3c4 [wayland] Add a --list-backends command line arg for listing available backends
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.
2015-10-02 09:31:47 +02:00
Martin Gräßlin
8ffca66d94 [wayland] Trigger an update of client layer when managing a ShellClient
Let's ensure it's in the correct layer before we do something with the
new window.
2015-10-01 17:24:03 +02:00
Martin Gräßlin
b5255de4b6 Move layer updating for setActive back to AbstractClient
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.
2015-10-01 17:21:56 +02:00
Martin Gräßlin
b587926803 [wayland] Introduce better placement checks for ShellClient
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
2015-10-01 16:47:28 +02:00
Marco Martin
0bf64446cd remove unwanted debug and change in 9912d84 2015-10-01 16:03:02 +02:00
Martin Gräßlin
242e2806ca [wayland] Properly support add/remove transient on ShellClient
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
2015-10-01 14:12:46 +02:00
Martin Gräßlin
48a6272916 [tests] Support a trasient window in the waylandclienttest
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.
2015-10-01 14:03:48 +02:00
Martin Gräßlin
044e2a05b2 [effects] Properly announce/remove support in blur/contrast if shader fails
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
2015-10-01 11:12:09 +02:00
Martin Gräßlin
0e0c76e080 Merge branch 'Plasma/5.4' 2015-10-01 10:52:54 +02:00
Martin Gräßlin
5968096434 Fix heap-use-after-free use in resolving ClientMachine
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
2015-10-01 10:09:52 +02:00
Thomas Lübking
b170f3fd23 Merge branch 'Plasma/5.4' 2015-10-01 09:32:44 +02:00
Thomas Lübking
85b3515794 support absolute libexec path configuration
BUG: 353154
REVIEW: 125466
FIXED-IN: 5.4.2
2015-10-01 09:26:12 +02:00
Marco Martin
9912d84f74 supports kwayland skipsTaskbar
read the skipTaskbar property from plasmashellsurface
and set it accordingly in the corresponding PlasmaWindow
for the model
REVIEW:125454
2015-09-30 16:55:32 +02:00
Thomas Lübking
8173deab6b Merge branch 'Plasma/5.4' 2015-09-30 16:39:49 +02:00
Thomas Lübking
75b08e1ee7 log *which* binary failed to start
Users shouldn't have to od libraries.
CCBUG: 353154
REVIEW: 125464
2015-09-30 16:38:02 +02:00
Martin Gräßlin
748754bce1 [tests] Add fullscreen mode to waylandclienttest
Pressing key f toggles the window between fullscreen and normal mode.
2015-09-30 15:37:00 +02:00
Martin Gräßlin
eda4f61037 [autotest] Add workaround for broken no-XRandr in screen edge test
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
2015-09-30 15:06:01 +02:00
Martin Gräßlin
8073d851c4 [screenedges] Add a missing context to connect
Lambda capturing this should get disconnected when this gets destroyed.
2015-09-30 10:48:11 +02:00
Martin Gräßlin
1f2087ce7c Merge branch 'Plasma/5.4' 2015-09-30 10:30:47 +02:00
Martin Gräßlin
7365069ba0 [autotests] Adjust TestScreenEdges::testCallback to changes
We need to add more delay to get it trigger/pushback again.
2015-09-30 10:30:10 +02:00
Martin Gräßlin
acf668d798 [autotests] Adjust TestScreenEdges::testFullScreenBlocking for changes
We need to wait the reactivation time before getting a pushback again.
2015-09-30 10:30:04 +02:00
Martin Gräßlin
e5fbb20e8b [backends/x11] Allow grab keyboard/pointer
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.
2015-09-30 07:40:45 +02:00
Martin Gräßlin
4fa01583cb [backends/x11] Use NETWinInfo for our window. 2015-09-30 07:40:45 +02:00
Thomas Lübking
b0dc3b3009 shuffle mnemonics in "more actions"
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
2015-09-29 23:03:20 +02:00
Thomas Lübking
ace742d143 initialize pseudo_max with desired maximization
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
2015-09-29 23:02:41 +02:00
Thomas Lübking
0302b97aea prevent calling xrandr w/o extension available
BUG: 343844
FIXED-IN: 5.5
REVIEW: 125074
2015-09-29 23:02:41 +02:00
Thomas Lübking
d04645266c enforce update on re-redirection
REVIEW: 125039
BUG: 342881
FIXED-IN: 5.5
2015-09-29 23:02:41 +02:00
Thomas Lübking
cb1005120a support changing tabbox mode
Allow to change from general window cruising to application specific
cruising w/ releasing the Alt key

BUG: 316544
FIXED-IN: 5.5
REVIEW: 125392
2015-09-29 23:02:41 +02:00
Thomas Lübking
121d59ee28 add black/whitelist config to videowall
REVIEW: 125410
BUG: 353153
FIXED-IN: 5.5
2015-09-29 23:02:41 +02:00
Thomas Lübking
d61e6cd445 improve restricted moveresize
* skip all overhead on unrestricted moveResizes
* the titlebar is not guaranteed to be the top border (anymore)
* don't block vertical resize when resizing on a top corner
* reduce QRegion operations by knowledge about the degenerated titlebarregion (rect)
* rename int (sic!) "titleArea" to "requiredPixels"

REVIEW: 125428
2015-09-29 23:02:41 +02:00