Commit Graph

185 Commits (8510f31340ac78d76df69a3bccb001f610613913)

Author SHA1 Message Date
Martin Flöser 42b099355c Add support for initial apply rules for skip (taskbar|pager|switcher)
Summary: This adds support for those set rules in ShellClient.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D9866
2018-01-14 11:19:47 +01:00
David Edmundson 01d6878dc2 Add explicit protocol for colour scheme management
Summary:
To replace the deprecated/broken qt extended surface

BUG: 385214

Test Plan: Ran test in plasma-integration

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D9660
2018-01-04 18:32:18 +00:00
David Edmundson ee28104c7a Port to new AppMenu iface
Plus test

Test Plan:
Ran kwin with menus and patched QPT
Ran test

Reviewers: graesslin

Reviewed By: graesslin

Subscribers: graesslin, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D9262
2017-12-22 14:38:31 +00:00
Martin Flöser a8be959b8f Implement geometry update blocking in ShellClient
Summary:
Commit 188491d392 introduced a regression
in ShellClient and broke the QuickTiling test - sorry about that.

This change fixes the failing test. The main reason was a slight change
in semantics of setGeometry. But the real problem is/was that the
geometry update blocking is not supported in ShellClient.

This change brings in the checks from Client to ShellClient, thus that
the geometry is properly blocked and when unblocked the geometry is
updated correctly or a request is sent. What makes it rather difficult is
that the geometry update blocker operates on an updated geom while
ShellClient::setGeometry needs to compare to the original geom to
determine whether a direct update or a request is required.

Thanks to supporting geometry update blocking the changeMaximize calls
are adjusted to use setGeometry instead of requestingGeometry directly.

Overall this is an important improvement and might also allow us to no
longer require the special RequestGeometryBlocker in ShellClient.

Test Plan: Tests pass

Reviewers: #plasma, #kwin

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8956
2017-12-04 17:24:22 +01:00
Martin Flöser f0f4e494fe Merge branch 'Plasma/5.11' 2017-11-16 20:34:52 +01:00
Martin Flöser 1ae7990a95 Allow a cross-process check for same applications
Summary:
Commit 5d9027b110 introduced a regression in TabBox by using the generic
framework inside KWin to test for same application. What I did not
consider was that the code in TabBox was "broken by design". It didn't
use the generic check as that is too strict and considers windows from
different processes as not belonging to the same application. But this
is not wanted in the case of TabBox.

On the other hand the change itself is an improvement to also support
Wayland in a better way and not have special handling situations. Thus
just reverting would not help.

Instead this change addresses the problem by extending the internal API
and to allow more adjustements. So far there was already an
"active_hack" boolean flag. This is extended to proper flags with an
additional flag to allow cross application checks.

The checks in Client which would filter out different applications check
for this flag and are skipped if set. In addition ShellClient also adds
support for this flag and compares for the desktop file name.

Thus we get in TabBox the same behavior as before with the advantage of
having a better shared code base working on both X11 and Wayland.

BUG: 386043
FIXED-IN: 5.11.4

Test Plan:
Started two kwrite processes on X11, clicked new in one of them,
used Alt+` and verified that there are three windows shown.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8661
2017-11-16 20:33:54 +01:00
Martin Flöser 188491d392 Support user fullscreen for XdgShellSurfaces
Summary:
So far ShellClient did not support that the user can set a window to
fullscreen. This was omitted in the initial implementation as WlShell
doesn't support passing the state back to the surface.

With XdgShell this problem doesn't exist any more and we can implement
it. The implementation is mostly based on the one for Client and
adjusted for the Wayland world.

Test Plan:
New test cases and manual testing (send kate and kwrite to
fullscreen through alt+f3 menu)

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8169
2017-11-14 18:00:47 +01:00
Martin Flöser c2d4cb8846 Support initial minimize rule in ShellClient
Summary: Honors the rules for minimizing a window on initial show.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8182
2017-10-19 18:00:42 +02:00
Martin Flöser d3eccada62 Implement Apply desktop rule for ShellClient
Summary:
This change sets up ShellClient for supporting window rules by reading
in the rules once it gets created. As a first rule the Apply initially
rule for desktop is implemented.

Currently it is not yet possible to set window rules through the
configuration menu. So far only injecting rules through the test
framework (temporary rules) is implemented. The idea is to first
implement all rules then to expose them to the UI.

Test Plan: New test case

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8177
2017-10-19 18:00:06 +02:00
Marco Martin 735fcc6e95 Make use of foreign protocol
Summary:
not sure if that is the right "parent" that has
to be set, set the transient for surfaces that
have setParentOf of an imported set

Test Plan:
m_XdgForeign->transientFor(surface()) finds the surface is expected,
not sure how to test it further

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: luebking, graesslin, davidedmundson, plasma-devel, kwin, #kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D7521
2017-10-13 11:32:22 +02:00
Martin Flöser 0372fdaf92 Move WindowRules from Client to AbstractClient
Summary:
So far window rule specific functionality was only implemented in Client
and in ShellClient there was only a dummy implementation. This change
moves the client_rules member variable from Client to AbstractClient.
Areas which would not compile anymore are adjusted.

This is a first step to get window rule support for Wayland windows.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8090
2017-10-07 07:42:41 +02:00
Martin Flöser cd97c049b5 Fix regression concerning popup handling for wl_shell_surface
Regression introduced due to making popup a member variable and this
is not ready in the init method. So connect to the rescue.

Fixes failing PointerInputTest.
2017-09-25 21:10:41 +02:00
David Edmundson e492f9e298 XdgV6 - Kwin side
Summary:
Adds XDGV6 support for the kwin side.

Popup placement support is limited to the stuff v5 had,
a simple offset, rather than the awesome new positioner.

But Qt doesn't make use of it yet either.
Also ideally we should do all the positioning before sending the first
configure, but again Qt doesn't actually do anything with that anyway.

Also integrate pinging clients

Test Plan: gtk3-demo  works nicely.

Reviewers: #plasma, graesslin, mart

Reviewed By: #plasma, graesslin

Subscribers: mart, graesslin, kwin, plasma-devel, #kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D6591
2017-09-25 16:47:30 +01:00
Martin Flöser e0f95fd913 Delay syncing internal window geometry to end of cycle
Summary:
The syncing of the window geometry to the internal geometry can
unfortunately cause a freeze in very special conditions:
1. create QML component
2. a Plasma::Dialog gets created
3. It creates the DialogShadows
4. This triggers QGlobalStatic creation which locks a non-recursive
mutex
5. The creation of DialogShadows creates a Registry and triggers a
roundtrip on the Wayland server
6. KWin processes all Wayland events
7. This triggers the creation of a ShellClient
8. The ShellClient has a PlasmaShellSurface which requested a position
9. The new geometry does not match the geometry of the Plasma::Dialog
10. ShellClient syncs the geometry to the Plasma::Dialog
11. Plasma::Dialog updates the theme because window geometry changed
12. This accesses the DialogShadows...

which is still in the non recursive mutex and we have a freeze.

By delaying the sync to the end of cycle we jump out of this deadly
sequence.

BUG: 384441

Test Plan:
The freeze doesn't hit any more. It's possible that some test
cases need adjustments.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7712
2017-09-07 19:06:54 +02:00
Martin Flöser a7b29e09ce Make AbstractClient::caption no longer a virtual method
Summary:
The implementation can now be shared, it doesn't differ anymore between
X11 (Client) and Wayland (ShellClient). So instead of code duplication a
shared implementation in AbstractClient.

Test Plan: X11 and ShellClient tests still pass

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7426
2017-09-01 17:03:06 +02:00
Martin Flöser 6685288d48 Add <number> to Wayland captions if the caption is the same
Summary:
Bringing another caption feature from X11 to Wayland. If we have
multiple windows with the same caption, starting from the second window
a suffix <number> is added.

E.g. if we have three windows with caption "foo", the naming is:
 * foo
 * foo <2>
 * foo <3>

The change tries to use as much shared code between the X11 and Wayland
implementation. Unfortunately it's not possible to share completely as
the X11 implementation does X11 specific things like editing the visible
name.

By sharing the code the numbering also works cross windowing system.
That is if a window is called "foo" on X11, a new window on Wayland with
caption "foo" will get adjusted to "foo <2>" and vice versa.

The change also eliminates a duplicated signal for captionChanged in
ShellClient (found by test case).

By using the shared implementation on X11 side a bug gets fixed which
got introduced with the support of "unresponsive", this is no longer
considered and the numbering still works even if there is a window which
is unresponsive.

Test Plan: New test case and manual testing

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7425
2017-09-01 17:02:36 +02:00
David Edmundson f0971532c9 Send output enter/leave events to surfaces
Summary:
A surface has an API to know which screen(s) it's on, this is useful
especially for knowing the scale it should render at.

In practice Qt currently doesn't do anything with this information; but
that's set to change.

Test_helpers is changed as we need to create output objects in order for
wl_surface to map them.

Closes task T4467

Test Plan:
Attached unit test.
As mentioned above, it doesn't have any real world impact currently, so not a lot
to test.

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: johanhelsing, graesslin, plasma-devel, kwin, #kwin

Tags: #kwin

Maniphest Tasks: T4467

Differential Revision: https://phabricator.kde.org/D7359
2017-08-24 17:57:30 +01:00
Martin Flöser bbca8c6677 Implement the shortcut caption suffix for Wayland windows
Summary:
The generation of the shortcut caption part is moved from Client to
AbstractClient. The ShellClient also has a captionSuffix and implements
the full part in caption.

Overall this needs more refactoring to support more sharing between the
two implementations. But one step at a time.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D7093
2017-08-12 11:31:33 +02:00
Martin Flöser 00281711d9 Handle processId being 0 in ShellClient::killWindow
Summary:
If ClientConnection fails to get the process id (which happens at least
on FreeBSD) the process id is 0. We should not try to terminate this pid
as it terminates all processes is KWin's process group which is the whole
session.

Test Plan: Only compile test

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7168
2017-08-07 07:14:20 +02:00
Martin Flöser afd52c188a Drop the stripped parameter from AbstractClient::caption
Summary:
The parameter is not used anywhere in KWin. Only the default value was
used. So let's drop this.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7059
2017-08-02 17:09:49 +02:00
Martin Flöser 64da6c8d1e Replace Workspace::slotWindowQuickTileFoo by a quickTileWindow with argument
Summary:
Thanks to std::bind we don't need that many different slots to setup the
global shortcut connections. Instead we can have one shared
implementation which takes the argument and passes it to the window.

To support std::bind arguments in kwinbindings the initShortcut method
and dependencies are adjusted as well as a new macro is added.

As I don't want to include abstract_client.h in workspace.h a new enum
is created for the quick tiling flags used in Workspace. This caused a
larger refactoring as the change to an enum class also caused quite some
changes.

Test Plan: Affected test cases still pass

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6783
2017-07-29 17:40:03 +02:00
Martin Flöser c29d6093ba Implement support for window shortcuts for Wayland windows
Summary:
Moves most of the implementation from Client to AbstractClient, so that
it can be used for both Client and ShellClient. Only the X11 specific
code is kept in Client.

Not yet implemented is updating the window caption.

Unfortunately the testing of this feature showed that setting a window
shortcut is not working on Wayland at all (the Qt widget doesn't properly
catch the shortcut). So this feature is currently only of erm theoretical
use.

Test Plan: Added new test case. No testing in real world as explained.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6818
2017-07-25 07:12:42 +02:00
Eike Hein e7e79124aa Set pid on the ClientConnection backing the PlasmaWindow surface.
Summary: Depends on D5747.

Reviewers: #plasma, sebas, graesslin

Reviewed By: #plasma, graesslin

Subscribers: kwin, plasma-devel, #kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D5756
2017-06-12 01:09:22 +02:00
Rohan Garg 3817eddfc6
m_clientSize is already connected in ShellClient::init
Summary:
TODO no longer applies since ShellClient::init already connects
SurfaceInterface::sizeChanged to update m_clientSize

Test Plan

Subscribers: kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5787
2017-05-10 10:52:19 +02:00
Martin Flöser a2d19c6b9d Revert "Set pid on the PlasmaWindow based on the client connection."
This reverts commit 262fb00b51.

CCMAIL: hein@kde.org
2017-05-08 16:46:16 +02:00
Eike Hein 262fb00b51 Set pid on the PlasmaWindow based on the client connection.
Summary: Depends on D5747.

Test Plan:

Reviewers: #plasma,sebas,graesslin

Subscribers: plasma-devel
2017-05-08 19:25:54 +09:00
David Edmundson 80f21064f1 Merge branch 'scaling' 2017-04-29 14:11:13 +01:00
Martin Gräßlin 1193b0da77 Initial support for popup window handling
Summary:
So far KWin did not properly handle popup windows. That is when a popup
surface got created and a click outside the surface happened KWin did not
send out the popupDone Wayland event.

This change makes KWin aware of whether a surface is a popup and tracks
through a new PopupInputFilter whether there are popup windows. In case
there are popups the new filter waits for mouse press events and cancels
the popups if the press does not happen on any surface belonging to the
same client. To quote the relevant section of the Wayland documentation:

    The popup grab continues until the window is destroyed or a mouse
    button is pressed in any other client's window. A click in any of the
    client's surfaces is reported as normal, however, clicks in other
    clients' surfaces will be discarded and trigger the callback.

So far the support is still incomplete. Not yet implemented are:
 * support xdg_shell popup windows
 * verifying whether the popup is allowed to be a popup
 * cancel the popup on more global interactions like screen lock or
   kwin effect

BUG: 366609
FIXED-IN: 5.10

Test Plan: Auto test and manual testing with QtWayland client

Reviewers: #plasma, #kwin

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5177
2017-04-07 16:14:50 +02:00
Martin Gräßlin 489e6954c5 Support the emergency show property on ksld's lock screen window
Summary:
The emergency show window should be considered as a lock screen window
and be shown while the screen is locked. This is the KWin part to D5157.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5158
2017-04-06 16:49:53 +02:00
David Edmundson 5c0c0cdb91 Set m_client size in global compositor co-ordinates
KWin wants to deal with the post-scaled down client size, not the texture size.

Reviewers: #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3494
2017-03-29 20:53:22 +01:00
Martin Gräßlin 5083adb1b8 Call performMoveResize when we got a new geoemtry during resize
Summary:
So far on a geometry sync we did not call performMoveResize like we
do on X11 when getting the sync. This resulted in the
clientStepUserMovedResized not getting called during resize and the
geometry update effect to not function.

BUG: 374869
FIXED-IN: 5.9.1

Test Plan: Geometry hint updates

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D4333
2017-01-30 17:02:13 +01:00
Martin Gräßlin 00c68891c7 Add support for skipCloseAnimation for internal windows
Summary:
We need this to use the new OnScreenNotification in the screenshot
effect.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D4089
2017-01-13 19:50:50 +01:00
Kai Uwe Broulik 93938d60b8 Restore global menu support
This brings back global menu support in KWin.
The DBusMenu infrastructure is different that we just read the DBus service name and
menu object path from the windows rather than passing around window IDs on DBus which
won't work on Wayland.

Differential Revision: https://phabricator.kde.org/D3089
2017-01-11 10:21:03 +01:00
Martin Gräßlin 6a78bd45fe Fix syncing of geometry to internal window when using ::move
Summary:
The OnScreenNotification gets moved during its placement. This update
of the geometry did not get synced to the QWindow's geometry as it
should.

The reason for this is the rather special implementation of
AbstractClient::move. This just modifies the geom variable and does not
call into setGeometry at all. Instead a virtual doMove method is invoked
to inform the platform specific client implementation about the move of
the window. For a "normal" ShellClient that is fine - there is nothing
to do.

This change adds an implementation of doMove in ShellClient to sync the
geometry to the internal window. This is not yet enough to fix the
geometry of the OnScreenNotification. It gets placed with a
GeometryUpdatesBlocker in place causing the doMove never to be called.
Instead setGeometry is invoked again when the geometry updates get
unblocked. So far ShellClient did not do anything in this case. This
change ensures that at least the doSetGeometry method is performed again.

Test Plan: Added test case and manual testing of OnScreenNotification

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3963
2017-01-04 18:00:24 +01:00
Martin Gräßlin 0a042dad69 Sync opacity from an internal QWindow to its ShellClient
Summary:
This change adds support for opacity on a KWin internal QWindow.
Calling QWindow::setOpacity syncs the value to the ShellClient
representation of the QWindow.

This is needed for fading out the OnScreenNotification on mouse
over.

Test Plan: Added auto test and manual test

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3928
2017-01-03 07:35:54 +01:00
Martin Gräßlin f32e655031 Implement borderlessMaximizedWindows for Wayland windows
Summary:
Maximize code was not yet adjusted to support decorations. Code is as
much as possible similar to the X11 Client implementation.

BUG: 370982

Test Plan: Added auto test and run a nested KWin/Wayland with the setting enabled

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3508
2016-11-29 12:36:31 +01:00
Martin Gräßlin 9934f5b575 Properly implement maximize of ShellClient
Summary:
This brings some more checks from Client to ShellClient. Thus the
states are better adjusted.

Unfortunately the X11 implementation is also slightly adjusted, so could
create regressions in worst case.

BUG: 368393

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3507
2016-11-29 12:35:59 +01:00
Martin Gräßlin 6bee7f4aac KillWindow support for Wayland windows
Summary:
AbstractClient gains a new pure virtual killWindow method and this gets
implemented in ShellClient.

ShellClient performs the killing by sending a term signal to the
process. This can only work if the client connected through the socket
and didn't get a socketpair fd passed. In that case the pid is KWin's
and KWin doesn't want to terminate. Thus this is special handled to
destroy the connection instead.

In case terminating the process has no effect, the connection gets
destroyed after five seconds.

The KillWindow is adjusted to operate on AbstractClient instead of
Client.

This implements T4463.

Test Plan: Killed windows and auto test

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3370
2016-11-17 14:06:42 +01:00
Martin Gräßlin d9612b327c Merge branch 'Plasma/5.8' 2016-11-07 11:41:30 +01:00
Martin Gräßlin 2a15592571 Simplify the window title passed in from the window system
Summary:
So far KWin used the window title provided from the window directly
without any sanitizing. This could result in broken window decorations
if the title included line breaks. Those were passed to the decoration
and depending on the way how the decoration renders the title, it could
result in visual breakage.

Having line breaks in a window title doesn't make sense. Given that KWin
now simplifies the title when copying it to it's own structure. This
also ensures that the title passed to e.g. task manager does not have
any line breaks on Wayland.

BUG: 323798
FIXED-IN: 5.8.4

Test Plan: Opened the web page in a nested KWin, properly rendered now.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3215
2016-11-07 11:26:48 +01:00
Martin Gräßlin f17d06ee7d Merge branch 'Plasma/5.8' 2016-11-04 10:03:10 +01:00
Martin Gräßlin db58c421eb Internal windows cannot be minimized
Summary:
This change ensures that the DebugConsole does not have a minimize
button.

BUG: 372000
FIXED-IN: 5.8.4

Reviewers: #kwin, #plasma_on_wayland, broulik

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3244
2016-11-04 08:59:43 +01:00
Martin Gräßlin b7bd5f9a09 Add support for desktopFileName provided by NETWinInfo
Summary:
KWindowSystem provides a KDE specific property for the desktop file
name. This allows KWin to take the icon from the desktop file. The
advantage from the desktop file is that KWin normally gets higher
resolution icons than provided through the xproperty based icons used
previously. If the desktop file does not provide an icon name, KWin
falls back to the previous implementation.

As on Wayland the icon is taken from the desktop file name already the
code for X11 and Wayland is merged in AbstractClient. Also to the
PlasmaWindowInterface the appId is taken from the new desktop file
instead of the resourceName. Due to that for Xwayland windows where KWin
knows the desktop file name it can be passed to PlasmaWindowInterface.
This allows e.g. the task manager to better map the windows to
applications and provide better icons. Also it means that icons do not
need to be passed as bitmap data to the clients.

Test Plan:
Verified that icon is taking from desktop file if provided and
from X property if not provided and that Wayland windows still have icon.

Reviewers: #kwin, #plasma_on_wayland, hein

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3177
2016-10-31 13:19:46 +01:00
Martin Gräßlin 03d706150a Support docks which take input
Summary:
On X11 one needs to force activate a panel to pass it focus. This change
implements something similar for Wayland but a little bit more stateful
by using a request on the PlasmaShellSurface. If set KWin will activate
the panel.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3037
2016-10-18 08:18:46 +02:00
Martin Gräßlin 01667cacea Panel auto hide support for Wayland panels
Summary:
This change implements auto-hide support for Wayland panels. To properly
test the screenedgeshowtest is reworked to support both X11 and Wayland
windows.

Reviewers: #kwin, #plasma_on_wayland, bshah

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3080
2016-10-18 08:18:23 +02:00
Martin Gräßlin f41b610608 Support custom color scheme for Wayland windows
Summary:
On Wayland the QtExtendedSurface is used to pass the path to the color
scheme using the generic window property. To support this ShellClient
installs an event filter on the extended surface and listens for dynamic
property change events.

As the color scheme is KDE specific anyway it is not a problem that a Qt
specific interface is being used. For other toolkits just passing the
name to KDE's color scheme isn't sufficient anyway. If at some point we
find a way to support this for e.g. GTK+ we would need to come up with a
dedicated interface.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3047
2016-10-17 09:00:32 +02:00
Martin Gräßlin 8201def97f Set icon to wayland if desktop file is not found
Summary:
For X windows KWin uses the generic X icon if no icon is found. Thus
KWin should use the generic Wayland icon if no icon is found for a
Wayland client.

With this change applications with incorrect desktop file name at least
get a generic icon instead of no icon.

Test Plan: Started Qt assistant on Wayland and it had icon.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3023
2016-10-17 09:00:02 +02:00
Bhushan Shah 7843974a8a [wayland] Support for hideClient in ShellClient
Summary:
This implements the hideClient for ShellClient which was previously
not implmented. Also autotest for same is added.

Test Plan: ran autotest

Reviewers: graesslin, #plasma

Reviewed By: graesslin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3022
2016-10-11 20:01:49 +05:30
Martin Gräßlin dd3c6d6cc2 Implement show on screen edge for Wayland
Summary:
This change ports ScreenEdges to operate on AbstractClient instead of
Client. For this AbstractClient gained a new pure virtual method
showOnScreenEdge which is also implemented in ShellClient.

In ShellClient the functionality is bound for the case windows can
cover a panel. If triggered the panel gets raised again.

The auto hiding panel, though, is not yet implemented. For that the
protocol needs to be adjusted to give a hint to the compositor when to
hide and hint back to the panel when it was shown. This needs a change
in KWayland and thus is not 5.8 material.

Test Plan: See added test case

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2793
2016-10-05 07:51:47 +02:00
Martin Gräßlin 7d93b58578 Fix whether a panel is supposed to have a strut in ShellClient
Summary:
The PanelBehavior was incorrectly mapped to hasStrut resulting in too
many modes creating a strut for the panel.

CCBUG: 368499

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2788
2016-09-16 14:30:10 +02:00