Commit Graph

25 Commits (2bdabe62aa8340f56d6aaceae773256d40555b87)

Author SHA1 Message Date
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 7cded49145 [wayland] Implement maximizing of ShellClient 2015-06-07 03:28:38 +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 35abacabc4 [wayland] Handle unmap in ShellClient
Do not destroy the ShellClient when the Surface gets unmapped. Instead
just hide the ShellClient and show it again on the next damage.
2015-06-03 21:19:00 +02:00
Martin Gräßlin 5a98d8bbbd [wayland] Set depth in ShellClient depending on whether the Buffer has alpha
We need to set the depth in order to properly determine whether the
Surface has an alpha channel and whether blending needs to be enabled
for rendering.

For this a new method is introduced in Toplevel to set the depth. If
the depth changed in a way that the Toplevel gained or lost the alpha
channel a signal is emitted which implies that the hasAlpha property of
Toplevel is no longer constant.
2015-06-01 16:25:21 +02:00
David Edmundson 9791978d53 enable wayland clients to go fullscreen
REVIEW: 123853
2015-05-28 10:58:40 +01:00
Martin Gräßlin 988ce28943 [wayland] Ensure size is updated before marking window as ready for painting
Fixes regression introduced with 90a6814: we may not queue a signal
taking a pointer to a ShellClient as the ShellClient might be destroyed
before the queued signal is delivered.

The idea for the queued signal was to ensure that the size is set when
windowShown is emitted - this can also be achieved by first updating the
size.
2015-05-28 08:27:34 +02:00
Martin Gräßlin 007e1253c6 Add resizeWithChecks to AbstractClient
The virtual method does not take the xcb_gravity_t - that's only added
in a variant in Client.
2015-05-27 14:20:11 +02:00
Martin Gräßlin da2731be51 Move Client::move to AbstractClient and add implementation in ShellClient 2015-05-27 10:16:46 +02:00
David Edmundson df1499784f move isFullScreenable to AbstractClient
REVIEW: 123871
2015-05-21 16:40:21 +01:00
Martin Gräßlin 9954f1167f [wayland] Call pixmapDiscarded when ShellClient's size changes 2015-05-21 13:34:26 +02:00
Martin Gräßlin 45c1eddf4a Make Toplevel::window() virtual and implement in ShellClient
We need a shared window id in some way to e.g. properly support TabBox.
Though I do not like that the return value is xcb_window_t. This should
be either changed or a new "generic" windowId needs to be introduced.
2015-05-21 13:34:26 +02:00
Martin Gräßlin eec356494a [wayland] Internal ShellClients don't take input
We handle input for own windows in an own way.
2015-05-21 13:34:26 +02:00
Martin Gräßlin 23b19b4efe [wayland] Add a bool ShellClient::isInternal
Helper method to identify whether a ShellClient is for one of KWin's
internal connections (e.g. a QWindow).
2015-05-21 13:34:26 +02:00
Martin Gräßlin 4ed4d4dab4 [wayland] Create a windowId for ShellSurface
The internal used window Id consists of two parts identifiying the
Client and one identifying the Surface. That is the first 16 bits
are set to the ClientConnection, the last 16 bits are taken from
the Surface id. As the Surface id is 32 bits, but we only use 16 bits
there is a chance of overlap. So this might need some improvement.
2015-05-21 13:34:26 +02:00
Martin Gräßlin e97576aab7 [wayland] Implement caption in ShellClient
Just delegates to the title of the ShellSurfaceInterface.
2015-05-20 14:40:32 +02:00
Martin Gräßlin f2bcccedf4 [wayland] Fix typo in 2ff903e 2015-05-20 08:57:51 +02:00
Martin Gräßlin 2ff903e8b3 [wayland] Sync ShellClient's geometry with internal QWindow's geometry
Update geometry when the referenced internal QWindow changes position.
This makes the close button in PresentWindows work.
2015-05-20 08:27:48 +02:00
Martin Gräßlin 7d152991c7 [wayland] ShellClient can reference an internal QWindow
If the ShellClient got created for a Qt internal window, we try to
find the QWindow and if we get one, we use the geometry directly as
it got set by KWin in the first place.

Also a windowId() is added to ShellClient which can be used by the
effect system to find an EffectWindow. If it's an internal QWindow
we just use that window id. For other clients we still need some
smart solution.
2015-05-18 15:31:41 +02:00
Martin Gräßlin 31cc2628cc [wayland] Reuse position when size of a ShellClient changes
Means the window is not always reset to (0,0) when the size changes.
2015-05-18 15:31:40 +02:00
Martin Gräßlin e9e055dcca Call Workspace::clientHidden when ShellClient gets destroyed
Ensures that active_client gets changed if it was a ShellClient.
2015-05-08 12:43:47 +02:00
Martin Gräßlin 912ab71abd ShellClient inherits AbstractClient
This allows to make ShellClient behave more like a Client and allows
to activate it. Some pieces for activating are still missing.
2015-05-08 12:43:47 +02:00
Martin Gräßlin b6f793090e Toplevel::setOpacity becomes virtual
It calls unconditionally into NETWinInfo.
2015-05-08 12:43:47 +02:00
Martin Gräßlin d60c377890 [wayland] Introduce a ShellClient
The ShellClient is a Toplevel subclass for a
KWayland::Server::ShellSurfaceInterface. It gets created when a new
ShellSurfaceInterface is created and destoryed when it gets unmapped.

So far the usage is still rather limited. The ShellClient is opened
at position (0/0). While it's possible to pass pointer events to it,
it's not yet possible to activate it, so no keyboard focus.
2015-05-08 12:43:44 +02:00