Commit Graph

13670 Commits (03074c925ce97e3144c7e08695beffdf982214de)

Author SHA1 Message Date
Thomas Lübking af4809134c fix up delayed quick tiling
a) if the move is left after the delay is triggered
   but before the timer hit, do not cause a stale QT
   indication
b) only delay QT if there's actually another screen
   on the other side

BUG: 352744
REVIEW: 125250
2015-09-25 14:37:02 +02:00
Martin Gräßlin 36a2bad8fd Merge branch 'Plasma/5.4' 2015-09-18 15:29:33 +02:00
Rob Ert 8686ca7ca0 [kcmkwin/effects] Support binary effect plugins
Locates plugins through KPluginMetaData. To improve code
readability the load method is split into dedicate mehtods for
* binary plugins
* builtin effects
* scripted effects

REVIEW: 125232
BUG: 352680
FIXED-IN: 5.4.2
2015-09-18 15:27:28 +02:00
Martin Gräßlin 6dc211dfaf Workspace::adjustClientSize operates on AbstractClient
And now also during resizing clients snap to ShellClients.
2015-09-18 14:05:19 +02:00
Martin Gräßlin 47d2b4cb49 Workspace::adjustClientPosition operates on AbstractClient
With that moving clients snap also against ShellClients and not just
Clients.
2015-09-18 13:46:42 +02:00
Martin Gräßlin 51888e8abd Introduce an allClientList in Workspace
Holds AbstractClients that is both X11 and Wayland clients. Allows
to easily change code which needs to operate on all clients to get
to them without needing special handling for Wayland clients. At the
same time we are still able to get to the windowing system specific
clients through the old clientList() and waylandServer()->clients().
2015-09-18 13:44:54 +02:00
Martin Gräßlin 6326d96c02 [backends/x11] Set a black background pixel on our rendering window
By setting a black background pixel the window doesn't open with
garbage content (garbage being copy content of what was in the
framebuffer).
2015-09-18 11:06:33 +02:00
Martin Gräßlin 23f1b04a71 Fix regression in Workspace::activateNextClient
This fixes yet another regression from the transient refactoring.
The passed in client might be null, so we need a nullptr check. There
are several already in that code.

Was tricky given that I removed a cast there.
2015-09-17 16:15:26 +02:00
Martin Gräßlin 000954c508 Allow transients to go over dock windows under certain conditions
For Wayland transients are popups relative to a parent surface. This
means for a dock window we obviously want them above the dock, otherwise
the context menu would be below the dock.

To not break the existing functionality (which makes sense) we bind
it to whether the transient has a positioning hint - that's only set
for ShellClients.
2015-09-17 14:33:54 +02:00
Martin Gräßlin a6118016ec Reintroduce nullptr check in Client::removeFromMainClients
Removed by accident in 69be73d3, of course needed and causes an
unusable session due to kwin crashing when managing clients.

Sorry!
2015-09-17 14:17:55 +02:00
Martin Gräßlin 9988fa9d74 Add safety check for recursive transient for
An AbstractClient cannot be transient for itself.
2015-09-17 14:10:57 +02:00
Martin Gräßlin d25c465211 Move layer functionality to AbstractClient
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.
2015-09-17 11:06:59 +02:00
Marco Martin 49e5e81970 support raise and lower windows on wayland
connect raise/lowerRequested to workspace()->raiseClientRequest
/workspace()->lowerClientRequest
REVIEWED-BY:Martin Graesslin
2015-09-16 16:36:26 +02:00
Martin Gräßlin fc5b303c5f Workspace::raiseClientWithinApplication opertes on AbstractClient 2015-09-16 13:54:48 +02:00
Martin Gräßlin e46bf87311 Workspace::lowerClientWithinApplication operates on AbstractClient 2015-09-16 13:54:48 +02:00
Martin Gräßlin c4f02a6677 Pass through mainClients for AbstractClient in EffectWindowImpl 2015-09-16 13:54:48 +02:00
Martin Gräßlin f84b4758f2 Fix incorrect static_casts to Client
Replace by better dynamic_casts to AbstractClient.
2015-09-16 13:54:48 +02:00
Martin Gräßlin 5f429625f0 Workspace::topClientOnDesktop returns AbstractClient 2015-09-16 13:54:48 +02:00
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