Commit Graph

13552 Commits (a9d8926d3c142de10cb315b35382f10ef125a6e4)

Author SHA1 Message Date
Martin Gräßlin a9d8926d3c Workspace::findDesktop returns AbstractClient 2015-09-16 13:54:48 +02:00
Martin Gräßlin a421f546cd Move functionality of Client::updateLayer to AbstractClient
With transient support in AbstractClient we can provide the
functionality in AbstractClient.
2015-09-16 13:54:48 +02:00
Martin Gräßlin b199356774 Move functionality from Client::doSetDesktop to AbstractClient::setDesktop
Functionality related to transient handling can now be provided by
AbstractClient.
2015-09-16 13:54:47 +02:00
Martin Gräßlin 4a3d0fdac6 Workspace::updateOnAllDesktopsOfTransients operates on AbstractClient 2015-09-16 13:54:47 +02:00
Martin Gräßlin 69be73d382 Remove no longer needed casts to Client regarding transients
Restores to functionality before refactoring.
2015-09-16 13:54:47 +02:00
Martin Gräßlin 0003008668 Fixup with removeTransietn 2015-09-16 13:54:47 +02:00
Martin Gräßlin 4e6ea0808a Workspace::constrainedStackingOrder supports transients on AbstractClient 2015-09-16 13:54:47 +02:00
Martin Gräßlin 2f7597e522 Move transients from Client to AbstractClient
Unfortunately introduces a few casts to Client again.
2015-09-16 13:54:47 +02:00
Martin Gräßlin 2da04aa26b Use auto where we call ensureStackingOrder(client->transients())
Preparation step for switching transients from Client to AbstractClient.
2015-09-16 13:54:47 +02:00
Martin Gräßlin 4ad749e560 Workspace::ensureStackingOrder can operate on QList<Client*> or QList<AbstractClient*>
Preparation for getting Client::transients() to be AbstractClient as
ensureStackingOrder is called on the transients.
2015-09-16 13:54:47 +02:00
Martin Gräßlin ba8d11b305 Better support AbstractClient in Deleted::copyToDeleted
At the moment only decoration/border handling is Client specific.
Everything else can be shared with AbstractClient.
2015-09-16 13:54:47 +02:00
Martin Gräßlin 305699be8e Move modal from Client to AbstractClient 2015-09-16 13:54:47 +02:00
Martin Gräßlin 1d242d9daf Move mainClients() and allMainClients from Client to AbstractClient
AbstractClient::mainClients is virtual and overriden in Client,
allMainClients has only a common implementation in AbstractClient.

In activation.cpp we still need one case where a temporary ClientList
needs to be constructed. Once transients are fully migrated that should
be removable again.
2015-09-16 13:54:47 +02:00
Martin Gräßlin a5d3317645 Use auto for iterator over transients()
Preparation for changing transients to QList<AbstractClient>.
2015-09-16 13:52:25 +02:00
Martin Gräßlin df98e3883f Move hasTransient from Client to AbstractClient 2015-09-16 13:52:25 +02:00
Martin Gräßlin 1e00e1597a Workspace::keepTransientAbove operates on AbstractClient 2015-09-16 13:52:25 +02:00
Martin Gräßlin fda5a5feea [wayland] A popup shell surface doesn't want input 2015-09-16 13:52:25 +02:00
Martin Gräßlin a86a7e7b3c Add a placement strategy for transient ShellClients
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.
2015-09-16 13:52:25 +02:00
Martin Gräßlin 0935a60b38 Implement transientFor in ShellClient 2015-09-16 13:52:25 +02:00
Martin Gräßlin c4c3dfc73f Move transientFor from Client to AbstractClient
Right now this caused a few dynamic_casts. On the other hand existing
dynamic_casts from AbstractClient to Client can be removed again.
2015-09-16 13:52:25 +02:00
Martin Gräßlin 07dd743412 Move transient property from Client to AbstractClient 2015-09-16 13:52:25 +02:00
Martin Gräßlin 16e9c8375c [wayland] Don't delete Surface we got fromWindow
KWayland changed to cache created Surfaces and not create a new one
each time. If we delete it, we run in double deleted situations.
2015-09-15 12:18:36 +02:00
Martin Gräßlin cd254c8f47 [wayland] Configure key repeat
We take the configuration from the kcminputrc config file, group
keyboard (see plasma-desktop.git/kcms/keyboard/kcmmisc.cpp)

The values are only used for libinput. For backends providing input
events we expect to get repeated key events anyway.
2015-09-15 10:29:06 +02:00
Thomas Lübking 1ab663436d Merge branch 'Plasma/5.4' 2015-09-14 21:02:41 +02:00
Thomas Lübking 3a1f11d213 delay QuickTiling indication on inner screenborder
The user might just want to move the window from
one screen to another, no point in wasting time to
show the indicator

BUG: 352050
REVIEW: 125024
FIXED-IN: 5.5
2015-09-14 21:02:02 +02:00
Thomas Lübking 295132deef reset the transientInfo id when cleaning group
otherwise a pseudo-transient window with no
group causes a nullptr deref in eg. mainClients

BUG: 352483
FIXED-IN: 5.4.2
REVIEW: 125122
2015-09-14 21:01:22 +02:00
Thomas Lübking 584850f160 ensure to "hide" desktop buttons
before, hiding the buttons relied on the effect
seeing a paint event for the (with a low timeline
value) what's too wonky at least for instant animations
(certain failure) or when effect exits immediatey
(due to screen edge invocation issues or whatever)

BUG: 351869
FIXED-IN: 5.4.2
REVIEW: 124970
2015-09-14 21:01:22 +02:00
Thomas Lübking cc6886d7dd fetch motif hints when get them for managed client
notably *after* storing the old values.
Otherwise the old value is polluted because of
m_hints being nullptr, thus a default value is
returned (instead of the actual old value)

BUG: 347818
FIXED-IN: 5.4.2
REVIEW: 125007
2015-09-14 21:01:22 +02:00
Thomas Lübking 57f8c6d5f8 recreate presentwindows grids from desktopgrid
Theory:
----------
because PresentWindowsEffect::screenCountChanged() is shortcut
for "if (!isActive())", but the desktopgrid doesn't call
PresentWindowsEffect::setActive (or at least
PresentWindowsEffect::screenCountChanged), so the effect can
"miss" the increasing screen count change (it sees the signal,
but ignores it) and when desktopgrid calls it, it assumes the
m_gridSizes array is big enough (but it isn't)

Steps:
----------
1. effects are loaded, 1 screen present
2. 2nd screen gets added, but inactive effects ignore that
3. desktop grid gets activated, updates according to screen count,
   calls presentwindows for screen #2
4. presentwindows data is only prepared for one screen from step 1
   => BOOM

BUG: 351724
CCBUG: 326032
FIXED-IN: 5.4.2
REVIEW: 124960
2015-09-14 21:01:01 +02:00
Martin Gräßlin 0c448f2ed2 Merge branch 'Plasma/5.4' 2015-09-14 16:52:06 +02:00
Marco Martin 5a55727056 support the slide protocol
take and apply thhe informations from the wayland slide
protocol in the sliding popups effect

REVIEW:125120
2015-09-14 16:39:39 +02:00
Martin Gräßlin 873b4ed717 Fix build with some compilers
If it's a QPointer the connect needs a .data()
2015-09-11 14:53:34 +02:00
Martin Gräßlin 43f6c1e041 [wayland] Add support for DpmsInterface
Our server announces the DpmsManagerInterface and in the DRM backend
we announce support for Dpms on the OutputInterface (if the Output
supports it) and we connect to changing Dpms requests.
2015-09-10 14:32:41 +02:00
Martin Gräßlin 679da47235 [wayland] Don't run Compositor loop if all outputs are disabled
This ensures that the Compositor doesn't perform compositing and doesn't
run the compositing timer if e.g. all outputs are dpms disabled. Thus
we don't render any more, don't trigger wakeups and block applications
from rendering if they properly implement the frame rendered callback.
2015-09-10 14:31:46 +02:00
Martin Gräßlin ffa075490e [drm] Mark outputs as disabled in backend depending on DPMS state
Whenever the dpms of an output changes we update the outputs enabled
state in the AbstractBackend.
2015-09-10 14:31:46 +02:00
Martin Gräßlin 4f1033f17b [wayland] AbstractBackend indicates whether outputs are enabled
By default Outputs are considered to be enabled. This allows a
concrete backend implementation to mark outputs as disabled (e.g.
if dpms has put outputs into powersaving mode). This allows the
Compositor to disable itself if outputs are not visible anyway.
2015-09-10 14:31:46 +02:00
Martin Gräßlin e3ff85d4d9 [drm] Re-enable Output on input event
If an Output went into DPMS standby we need to re-enable the Output
once we get any input event.

For this we connect to the signals of InputRedirection once we go
to standby. Once we enable again, we disconnect (to not handle the
events all the time), blank the screen (initial modesetting) and
trigger a complete repaint.
2015-09-10 14:31:46 +02:00
Martin Gräßlin 6281cf84b4 [drm] Make DrmOutput a QObject
Needs to emit signals when DPMS changes and also needs private slots
when DPMS changes.
2015-09-10 14:31:46 +02:00
Martin Gräßlin a1bcc8e848 [drm] Don't present on an output which is in dpms standby
It will fail if the output is not on, so let's don't try to present
on a disabled output.
2015-09-10 14:31:46 +02:00
Martin Gräßlin 66ad99787c Add signal InputRedirection::keyStateChanged
Complements all other signals for internal usage that there is an
input event.

Needed by e.g. DPMS implementation to re-enable the outputs.
2015-09-10 14:31:46 +02:00
Martin Gräßlin 902bdb6cf0 [drm] Add initial support for DPMS
We read the drm property for the connector and set dpms initialy to On.
2015-09-10 14:31:46 +02:00
Martin Gräßlin 5fb67414d2 [libkwineffects] Proper no-size check in WindowQuadList::splitAt(X|Y)
A quad might have a null size in case it has a null width or null height.
Not just one dimension.

BUG: 236353
BUG: 210467
FIXED-IN: 5.4.2
REVIEW: 125131
2015-09-10 10:43:06 +02:00
Martin Gräßlin 07414e88a5 Add support for modifier only shortcuts on Wayland
On popular demand!

This change tracks how modifiers are used and detects a modifier only
key press/release. That is:
* no other key is pressed when the modifier gets pressed
* no other key gets pressed before the modifier gets released

If such a press/release is detected, we call a configurable dbus call.
The possible shortcuts can be configured in kwinrc, group
"ModifierOnlyShortcuts". The following keys are supported:
* Shift
* Control
* Alt
* Meta

As value it takes a QStringList (comma seperated string) with
service,path,interface,method,additionalargs

E.g. to invoke Desktop Grid effect on Meta key:

[ModifierOnlyShortcuts]
Meta=org.kde.kglobalaccel,/component/kwin/,org.kde.kglobalaccel.Component,invokeShortcut,ShowDesktopGrid

I do not intend to add a config interface for it. Let's keep it a hidden
way.

REVIEW: 124954
2015-09-09 08:58:43 +02:00
Martin Gräßlin f6f555d688 Merge branch 'Plasma/5.4' 2015-09-08 08:42:07 +02:00
Martin Gräßlin 0b95561193 Fake a leave event for the decoration when client is left
We need to send a fake HoverMove event on minimized to remove all
hovered states of the decoration.

At the same time we need to ensure that no further hover events are
sent to a minimized client.

BUG: 351984
FIXED-IN: 5.4.1
REVIEW: 124997
2015-09-07 15:27:06 +02:00
Marco Martin 658a28a257 support OnScreenDisplay from wayland 2015-09-03 18:19:38 +02:00
Marco Martin d3053fab58 support the kwayland contrast protocol
support wayland as well in the background contrast effect
REVIEW:125035
2015-09-03 17:00:24 +02:00
Jonathan Riddell 1ade154034 Update version number for 5.4.1
GIT_SILENT
2015-09-03 10:56:12 +01:00
Marco Martin 3f5bf65a9e Use the kwayland blur protocol in the blur effect
use the new blur protocol to fetch information about the
region of blur behind to apply to windows like Plasma::Dialog
REVIEW:125017
2015-09-02 14:43:44 +02:00
l10n daemon script 5eb8fc28b2 SVN_SILENT made messages (.desktop file) 2015-08-31 13:32:03 +00:00