Commit graph

16 commits

Author SHA1 Message Date
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