Commit graph

13613 commits

Author SHA1 Message Date
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
Thomas Lübking
dc9f14087c Merge branch 'Plasma/5.4' 2015-09-29 22:59:53 +02:00
Thomas Lübking
1d3a1aa061 restore linked screenedges times
commit c6bd68d78a2e00ce094a4087c106aaf4067f9f57 fixed a bug
that allowed early invocation when pushback was forced down.
However, it also turned activation and re-activation time
additive again (ie. invocation could only happen after
r+a ms instead of after r ms)

see also REVIEW 124888
REVIEW: 125143
2015-09-29 22:59:13 +02:00
Martin Gräßlin
9f054bd8ad Fix connects with QPointer
We need to call data() on the QPointer in a connect, otherwise
compilation fails on some compilers.
2015-09-28 14:09:10 +02:00
Thomas Lübking
af4809134c fix up delayed quick tiling
a) if the move is left after the delay is triggered
   but before the timer hit, do not cause a stale QT
   indication
b) only delay QT if there's actually another screen
   on the other side

BUG: 352744
REVIEW: 125250
2015-09-25 14:37:02 +02:00
Martin Gräßlin
36a2bad8fd Merge branch 'Plasma/5.4' 2015-09-18 15:29:33 +02:00
Rob Ert
8686ca7ca0 [kcmkwin/effects] Support binary effect plugins
Locates plugins through KPluginMetaData. To improve code
readability the load method is split into dedicate mehtods for
* binary plugins
* builtin effects
* scripted effects

REVIEW: 125232
BUG: 352680
FIXED-IN: 5.4.2
2015-09-18 15:27:28 +02:00
Martin Gräßlin
6dc211dfaf Workspace::adjustClientSize operates on AbstractClient
And now also during resizing clients snap to ShellClients.
2015-09-18 14:05:19 +02:00
Martin Gräßlin
47d2b4cb49 Workspace::adjustClientPosition operates on AbstractClient
With that moving clients snap also against ShellClients and not just
Clients.
2015-09-18 13:46:42 +02:00
Martin Gräßlin
51888e8abd Introduce an allClientList in Workspace
Holds AbstractClients that is both X11 and Wayland clients. Allows
to easily change code which needs to operate on all clients to get
to them without needing special handling for Wayland clients. At the
same time we are still able to get to the windowing system specific
clients through the old clientList() and waylandServer()->clients().
2015-09-18 13:44:54 +02:00
Martin Gräßlin
6326d96c02 [backends/x11] Set a black background pixel on our rendering window
By setting a black background pixel the window doesn't open with
garbage content (garbage being copy content of what was in the
framebuffer).
2015-09-18 11:06:33 +02:00