Commit graph

13342 commits

Author SHA1 Message Date
David Edmundson
268eb70016 [hwcomposer] Only update the attached screen 2015-06-17 15:08:49 -07:00
Martin Gräßlin
0b00af25dc [wayland] Announce AbstractClient to PlasmaWindowManagement interface
Creates a PlasmaWindowInterface for each AbstractClient and so far
passes caption and virtual desktop through.
2015-06-16 06:50:22 +02:00
Martin Gräßlin
6e58d50efa [wayland] Drop EGL_PLATFORM env variable from QProcessEnvironment passed to launched processes
Can result in interesting crashes of the launched processes, if KWin uses
e.g EGL_PLATFORM=hwcomposer.
2015-06-13 21:29:56 +02:00
Boudewijn Rempt
d457a8d92b This line wasn't intended to go in. 2015-06-13 19:10:33 +02:00
Martin Gräßlin
859a3bb598 [wayland] Add support for PlasmaWindowManagement interface
So far this only allows to trigger show desktop functionality and exports
the state.

In future this should be restricted to just one dedicated desktop shell
process.
2015-06-13 18:23:54 +02:00
Martin Gräßlin
01ac0abfd7 [wayland] Change keyboard focus window when active window changes
We used to change it only on keypresses. This resulted in the strange
situation that e.g. the input method virtual keyboard doesn't show up
until one presses a real key, because e.g. maliit only activates the
keyboard if there is an active focus object in the Qt application.
2015-06-13 17:54:08 +02:00
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