Commit graph

13386 commits

Author SHA1 Message Date
Boudewijn Rempt
98bcdbe70a [wayland] Add a command-line option to start an input method server
Input-method servers, like maliit, need to be known to KWin since KWin
needs to know about virtual keyboards. Virtual keyboards should be shown
as OSD layers, and they are one of the types of windows that actually
should be showable when the lock screen is active.

kwin_wayland --inputmethod /path/to/your/input-server

tries to start the input server. The input-server's window never gets
keyboard focus and is shown on top of all windows except for KWin's
internal clients.
2015-06-13 04:06:12 +02:00
Boudewijn Rempt
1d78430acc A shell client's layer is OSD if it's OSD 2015-06-13 04:05:15 +02:00
Boudewijn Rempt
63e877a0e3 Fix typo 2015-06-12 23:10:31 +02:00
Boudewijn Rempt
e8f7ab14b5 warnings--: unused parameter 2015-06-12 18:19:39 +02:00
Boudewijn Rempt
e946e5e0db warnings--: helper needs to be created, but appears to be unused 2015-06-12 18:19:34 +02:00
Boudewijn Rempt
955b0bb8e8 warnings--: unused parameter 2015-06-12 17:51:02 +02:00
Boudewijn Rempt
9c2b53dd04 Warnings--: remove set-but-unused variable
Maybe something left over from debugging?
2015-06-12 17:51:02 +02:00
Boudewijn Rempt
1a18eb97ad Remove icon size calculation
The resulting variable wasn't used anywhere, and there weren't any
side-effects from getting the icon size.
2015-06-12 17:50:53 +02:00
Boudewijn Rempt
6ddf294b55 Warnings--: unused parameters 2015-06-12 17:17:21 +02:00
Martin Gräßlin
02cebe93a6 [wayland] Unreference the buffer when destroying the WindowPixmap
When we don't use the buffer anymore, we should discard it. Otherwise
we start to leak buffers and that can result in clients dead locking
while waiting for more free buffers.
2015-06-12 16:22:41 +02:00
Marco Martin
9744625253 don't close desktop windows and docks
reviewed-by:Martin Gräßlin <mgraesslin@kde.org
2015-06-11 16:21:44 -07:00
Martin Gräßlin
65665b052b [wayland] Let's try to activate a ShellClient after it's created
This might cause breakage on kwin_wayland, let's see how it works.
2015-06-11 03:22:50 +02:00
Martin Gräßlin
ad80e31e6a [wayland] Reset ShellClient::m_unmapped before calling setReadyForPainting
m_unmapped determines whether the ShellClient wantsInput. This is used by
the ScriptingModel to check whether a ShellClient should be included. It
gets triggered by windowShonw signal called from setReadyFromPainting. If
m_unmapped is still true at that point the ScriptingModel doesn't include
it.
2015-06-10 20:31:41 +02:00
Martin Gräßlin
93c88aa446 [wayland] While a ShellClient is not shown, it won't take input 2015-06-10 17:46:55 +02:00
Martin Gräßlin
11e0e75fb3 Add a signal Toplevel::windowHidden
Signal is connected in ScriptingModel together with windowShown.
2015-06-10 17:45:59 +02:00
Thomas Lübking
ff2590ac52 fix compilation on older gcc (at least 4.8.3)
thanks to Hrvoje Senjan for bringing this up
REVIEW: 123936
2015-06-10 08:50:17 +02:00
Thomas Lübking
cc9a95df5d evenly distribute windows into all corners
If the user has only maximized windows or all
windows crammed into one region of the screen
the effect would not resemble an aperture at all

this ensures a maximum amount of corners is used
while seeking to still use shortest paths

BUG: 348709
FIXED-IN: 5.4
2015-06-10 08:50:17 +02:00
Thomas Lübking
e830f08def update geom_restore when silently breaking QT mode
the next checkWorkspacePosition (now triggered by
deco border update) would falsely restore the
pre-tiling geometry

BUG: 348640
REVIEW: 123882
2015-06-10 08:50:17 +02:00
Thomas Lübking
42f53eccbd update geom_restore on unshading
REVIEW: 123882
BUG: 348064
2015-06-10 08:50:17 +02:00
Thomas Lübking
1eae9f4baf improve geometry handling on bordersChanged
a) calculateGravitation on the same borders forth and back is idempotent
b) do not checkWorkspacePosition for shaded windows
   may falsely constrain the unshaded geometry into screen bounds

REVIEW: 123882
BUG: 348064
2015-06-10 08:50:17 +02:00
Thomas Lübking
0b9cfffe1a checkWorkspacePosition: Don't adjust to shaded sz
since the client is currently empty, we'll resort
to client hints, ie. effectively resize windows
when shading them (setGeometry and plainResize have
extra checks on whether this geometry is only the decoration
height to not smear client_size)

REVIEW: 123882
BUG: 348064
2015-06-10 08:50:17 +02:00
Thomas Lübking
7f71c89111 don't nuke both dims if undecorated frame isEmpty
isEmpty hits if one dimension is <= 0 - the other one
can be absolutely valid, so preserve it.

REVIEW: 123882
2015-06-10 08:50:17 +02:00
Thomas Lübking
41be18e317 Robust modal activation; ensure showing activated
...window

REVIEW: 123875
BUG: 348083
2015-06-10 08:50:16 +02:00
Martin Gräßlin
f696b578cc [wayland] Add support for QtSurfaceExtension for closing ShellClients
If the ShellClient has a QtExtendedSurface it's closeable.
2015-06-10 00:59:53 +02:00
Martin Gräßlin
6bdf120b3f Workspace::setShowingDesktop operates on AbstractClient 2015-06-09 23:28:48 +02:00
Martin Gräßlin
124bd8aaed [wayland] Add support for the PlasmaShell interface
The PlasmaShell interface allows to create a PlasmaShellSurface for a
given Surface. Through this interface the Surface can request:
* a specific position
* a window type

So far only the window types Normal, Panel and Desktop are supported
which is a sufficient subset for getting plasmashell to work.

In future there should be security checks so that only the dedicated
desktop shell can bind these interfaces.
2015-06-09 19:10:56 +02:00
Martin Gräßlin
2bdabe62aa [wayland] Check for docks in ShellClient in Workspace::updateClientArea
A ShellClient can have window type dock. In that case it's considered to
have a strut. That is currently every panel restricts the area. On the
other hand only internal clients can be docks at the moment. For Plasma's
panels a dedicated interface will be needed.
2015-06-08 21:29:07 +02:00
Martin Gräßlin
280075b7cd [wayland] Support windowType for internal windows
Our internal windows (e.g. a declarative script) can specify their own
window type which then can get honored by KWin.
2015-06-08 21:27:55 +02:00
Martin Gräßlin
e46ad2091b [wayland] Internal ShellClient is on all desktops 2015-06-08 20:18:40 +02:00
Martin Gräßlin
199cd70416 [tests] WaylandClientTest can maximize/restore on middle click 2015-06-07 03:29:06 +02:00
Martin Gräßlin
7cded49145 [wayland] Implement maximizing of ShellClient 2015-06-07 03:28:38 +02:00
Martin Gräßlin
034276af36 Move clientMaximizedStateChanged signal from Client to AbstractClient 2015-06-07 03:17:34 +02:00
Martin Gräßlin
239104b4f4 [wayland] Trigger layerRepaint on old geometry when changing geometry
Applies for the case that we have a positionAfterResize.
2015-06-07 02:38:53 +02:00
Martin Gräßlin
b196ad7052 [scripting] Add support for ShellClients in ScriptingClientModel 2015-06-06 22:11:10 +02:00
Martin Gräßlin
1d9769af1f Move skipTaskbar from Client to AbstractClient
At the same time the functionality for the "original_skip_taskbar" is
splitted out. This removes the weird API with two boolean arguments to
the set method. Instead there is a dedicated method for the orignal
skip taskbar state which delegates to regular skipTaksbar.
2015-06-06 22:11:10 +02:00
Martin Gräßlin
11a3eac070 Move skipPager from Client to AbstractClient 2015-06-06 22:11:10 +02:00
Martin Gräßlin
c4c637db92 [scripting] ScriptingClientModel operates on AbstractClient 2015-06-06 18:53:55 +02:00
Martin Gräßlin
86e0fc4dde [wayland] Ensure internal clients can trigger compositor repaints 2015-06-06 17:43:13 +02:00
Martin Gräßlin
7f0758b85f [wayland] Handle pointer events for internal windows
If there is a visible internal window it gets the pointer events.
The assumption is that the last created internal window is the top
most in stacking order.
2015-06-06 17:43:13 +02:00
Martin Gräßlin
7a64426085 Trigger updateMoveResize after keyboard move 2015-06-06 17:43:13 +02:00
Martin Gräßlin
06fc00b4a9 [wayland] Support pointer warping in the backends
The X11 backend can warp the pointer.
2015-06-06 17:43:13 +02:00
Martin Gräßlin
74c111ef88 [wayland] Add support for pointer warping in InputRedirectionCursor
With libinput we do can support warping pointers, let's do it.
2015-06-06 17:43:13 +02:00
Martin Gräßlin
4ca3734d12 [wayland] Support move/resize mode in pointer move handling 2015-06-06 17:43:12 +02:00
Martin Gräßlin
545c8b190e Send HoverMove event to selected window decoration if buttons are pressed
Ensures that e.g. decoration buttons get the Leave events.
2015-06-06 17:43:12 +02:00
Martin Gräßlin
735ffc8ab2 [wayland] Improve getting cursor image from theme
We don't need to queue the method invokation any more to ensure the
Wayland server connection is flushed since we have the dispatch method
in waylandServer().
2015-06-06 17:43:12 +02:00
Martin Gräßlin
4a1288b0c9 [wayland] Update cursor image from current decoration 2015-06-06 17:43:12 +02:00
Martin Gräßlin
59ca83d67a [wayland/x11] Implement installCursorImage in X11WindowedBackend 2015-06-06 17:43:12 +02:00
Martin Gräßlin
1edd689293 Handle interaction with window decoration directly in InputRedirection
So far input events were sent through Xwayland which is not needed as
we have all information available. Even more it had the pointer surface
on the wrong window when interacting with decorations as it was on the
window and not on the decoration.
2015-06-06 17:43:12 +02:00
Martin Gräßlin
8b3be23032 Don't update focused pointer window on pointer movement while button is pressed
If a button is pressed all mouse events should go to the current surface
regardless of whether the pointer is on top of it or not.
2015-06-06 17:43:12 +02:00
Eike Hein
8468da197c Merge branch 'Plasma/5.3' 2015-06-05 18:04:02 +02:00