In Client existing method is marked as override, in ShellClient a new
override is added which delegates to requestGeometry. Existing method
is renamed to doSetGeometry and all internal calls delegat to it.
Needs better merging with the implementation of Client.
The changeMaximize method is added as a pure virtual protected method
to AbstractClient. This replaces the previous pure virtual maximize
method. Which is now directly implemented in AbstractClient (reusing
the implementation previously in Client).
So far we delegated to ShellSurfaceInterface, but it's possible that
we call into isFullscreen when the ShellSurfaceInterface is already
destroyed.
Note: the functionality needs to be slightly reworked. The fullscreen
state should change once we get a buffer for fullscreen, not when the
client requests it. This is a general pattern which is wrong also for
maximized, etc.
Merges together the code from ShellClient and Client and removes the
starting differences. Long term it's better to have only one
implementation to prevent diversions in the implementation.
As it doesn't match exactly protected virtual methods are called
which allow more specific implementations for a certain aspect of the
layer resolving.
A transient ShellClient has an offset position to the parent surface.
Use this to position the ShellClient properly.
This fixes the random placement of menus.
This change introduces a mechanism for internal windows to be rendered
to a QOpenGLFramebufferObject to be composited using the texture bound
to the FBO. This is useful for in-process rendering (e.g. QtQuick) and
at the same time bypassing the windowing system.
The OpenGL context of the QOpenGLFramebufferObject needs to be sharing
with the compositing OpenGL context.
The creation of PlasmaWindowInterface is moved from WaylandServer into
AbstractClient. This allows the sub classes to better control when to
create/destroy the Client.
For creation it's bound to becoming visible - that is Windows which are
only created but never shown are not announced at all.
For Client it's destroyed with the normal tear-down of a Client, for
ShellClient it's destroyed on unmapped (which also means a new one
will be created again in case of another mapping of the surface).
As a side effect, this works around the problem that ShellClients do not
yet get destroyed for QtWayland's menus (needs further investigation).
Prime target is to preserve the in-screen
condition of client AND window.i[1]
Atm. when the client is fully in sight
(but the window is not) - regardless of snapping
or screen change - a workspace update (screen change,
resolution change, adding/removing a strutting panel)
would allow the client to partiall escape screen bounds.
This is changed so that if the client is fully in sight,
it's kept fully in sight (but not the decoration)
If the entire window was fully in sight, it's also kept
(as is right now)
The code handles inner screen edges (if the client was in sight,
the entire window will be if we'd bleed to the other screen)
[1] I'd say that handling the client is more relevant,
but foresee more complaints if the window wasn't handled anymore ;-)
During that, i stumbled across some other issues.
- when a window centered on one screen is moved to a screen smaller
than the window, the window is shrinked to the dimensions of that
screen and now randomly touches eg. left AND right edge. When
moved back, the right and bottom edge were preferred
(to the window was "moved" into the lower right corner).
It's now kept centered.
- geom_restore was saved before keeping the window in the new
screen area (causing accidental drops on screen changes)
BUG: 330968
REVIEW: 122517
FIXED-IN: 5.4
Prime target is to preserve the in-screen condition
of client AND window.[1]
Atm. when the client is fully in sight (but the window is not) -
regardless of snapping or screen change - a workspace update
(screen change, resolution change, adding/removing a strutting
panel) would allow the client to partiall escape screen bounds.
This is changed so that if the client is fully in sight,
it's kept fully in sight (but not the decoration)
If the entire window was fully in sight, it's also kept
(as is right now)
The code handles inner screen edges (if the client was in sight,
the entire window will be if we'd bleed to the other screen)
[1] I'd say that handling the client is more relevant,
but foresee more complaints if the window wasn't handled anymore ;-)
During that, i stumbled across some other issues.
- when a window centered on one screen is moved to a screen
smaller than the window, the window is shrinked to the dimensions
of that screen and now randomly touches eg. left AND right edge.
When moved back, the right and bottom edge were preferred
(to the window was "moved" into the lower right corner).
It's now kept centered.
- geom_restore was saved before keeping the window in the new
screen area (causing accidental drops on screen changes)
BUG: 330968
REVIEW: 116029
FIXED-IN: 5.3
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.
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.
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.
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.
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.