Commit Graph

583 Commits (9b8836b455108d30b1f085d0a1761ba0fb3bb663)

Author SHA1 Message Date
Martin Gräßlin 9b8836b455 Move (set)electricBorderMode() from Client to AbstractClient
While it was public in Client, it was not used anywhere outside of
Client, because of that it's only protected in AbstractClient.
2015-10-12 09:56:54 +02:00
Martin Gräßlin b489ebabdc Move signal quickTileModeChanged from Client to AbstractClient 2015-10-12 09:38:42 +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
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 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 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 df98e3883f Move hasTransient from Client to AbstractClient 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
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
Martin Gräßlin a0adf3507a Move Q_PROPERTY wantsInput from Client to AbstractClient
This fixes the EffectWindow::acceptsFocus property which failed to
properly delegate to wantsInput for ShellClients.
2015-07-22 08:42:48 +02:00
Martin Gräßlin 1ccd608121 Move hasStrut from Client to AbstractClient
Base implementation returns false.
2015-06-20 00:14:15 +02:00
Thomas Lübking 39c35f8f48 fix sendToScreen/checkWorkspaceGeometry
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
2015-06-19 19:48:39 +02:00
Thomas Lübking 41be18e317 Robust modal activation; ensure showing activated
...window

REVIEW: 123875
BUG: 348083
2015-06-10 08:50:16 +02:00
Martin Gräßlin 034276af36 Move clientMaximizedStateChanged signal from Client to AbstractClient 2015-06-07 03:17:34 +02:00
Martin Gräßlin 1d9769af1f Move skipTaskbar from Client to AbstractClient
At the same time the functionality for the "original_skip_taskbar" is
splitted out. This removes the weird API with two boolean arguments to
the set method. Instead there is a dedicated method for the orignal
skip taskbar state which delegates to regular skipTaksbar.
2015-06-06 22:11:10 +02:00
Martin Gräßlin 11a3eac070 Move skipPager from Client to AbstractClient 2015-06-06 22:11:10 +02:00
Martin Gräßlin 4ca3734d12 [wayland] Support move/resize mode in pointer move handling 2015-06-06 17:43:12 +02:00
Martin Gräßlin 4a1288b0c9 [wayland] Update cursor image from current decoration 2015-06-06 17:43:12 +02:00
Martin Gräßlin 1edd689293 Handle interaction with window decoration directly in InputRedirection
So far input events were sent through Xwayland which is not needed as
we have all information available. Even more it had the pointer surface
on the wrong window when interacting with decorations as it was on the
window and not on the decoration.
2015-06-06 17:43:12 +02:00
Martin Gräßlin eac99d5df6 Clenup: Drop QPoint argument from Client::mousePosition
Unused variable is unused.
2015-06-04 19:26:35 +02:00
Martin Gräßlin f16644ac2e Move maxSize and minSize to AbstractClient
With a default implementation returning either a INT_MAX size or 0.
2015-05-27 14:20:12 +02:00
Martin Gräßlin 737ad0b664 Move keepInArea to AbstractClient 2015-05-27 14:20:12 +02:00
Martin Gräßlin 007e1253c6 Add resizeWithChecks to AbstractClient
The virtual method does not take the xcb_gravity_t - that's only added
in a variant in Client.
2015-05-27 14:20:11 +02:00
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 846fd58d14 Move caption property and captionChanged signal to AbstractClient 2015-05-20 14:39:40 +02:00
Thomas Lübking 75bd798ad9 Merge branch 'Plasma/5.3' 2015-05-19 22:52:52 +02:00
Thomas Lübking 43e3b7db28 Show Desktop: break state with activation (only)
... not them becoming visible.
Latter doesn't work for most cases (unminimizing)
for obvious reasons (they're not minimized) and
when a new window is mapped, the focus stealing
prevention seems a good filter
(if it's not good enough to gain the focus,
it's not good enough to break the state either)

REVIEW: 123783
CCBUG: 346837
CCBUG: 346933
CCBUG: 347212
2015-05-19 22:07:58 +02:00
Martin Gräßlin 0dda7b3f94 Drop Client::m_frameWrapper workaround for reparenting deco
No longer used, so we can just drop it.

Thanks to QtWayland for emitting a warning, which made me find this
useless code.
2015-05-18 08:01:33 +02:00
Martin Gräßlin 23862e512d Move implementation of ::palette to AbstractClient
Includes moving of the colorscheme and DecorationPalette related
functionality.
2015-05-08 12:43:47 +02:00
Martin Gräßlin 38b418887a Move minimize implementation to AbstractClient 2015-05-08 12:43:47 +02:00
Martin Gräßlin d2884484bc Move ::titlebarPosition to AbstractClient 2015-05-08 12:43:47 +02:00
Martin Gräßlin a4d16debfc Partly move shade implementation to AbstractClient
* properties defined in AbstractClient
* implementation of isShade moved to AbstractClient
* implementation of setShade(bool) moved to AbstractClient
* default implementation for isShadeable added to AbstractClient
* default implementation for shadeMode returning ShadeNone
* default implementation fo setShade which does nothing
2015-05-08 12:43:47 +02:00
Martin Gräßlin 254887155c Implement virtual desktop handling in AbstractClient 2015-05-08 12:43:47 +02:00
Martin Gräßlin 1bfba1765c Signal desktopPresenceChanged carries AbstractClient as argument 2015-05-08 12:43:47 +02:00
Martin Gräßlin e672a53721 Move implementation of demanding attention to AbstractClient 2015-05-08 12:43:47 +02:00
Martin Gräßlin 986308f938 Move implementation of isSpecialWindow to AbstractClient 2015-05-08 12:43:46 +02:00
Martin Gräßlin 4b27abd76b Move implementation of wantsTabFocus to AbstractClient 2015-05-08 12:43:46 +02:00
Martin Gräßlin 1fcd1120d9 Move auto-raise handling to AbstractClient
Adds QTimer to AbstractClient and introduces new protected method to
start the timer.
2015-05-08 12:43:46 +02:00
Martin Gräßlin 25e3af5988 Implement keepAbove and keepBelow in AbstractClient
Moves the properties and the base implementation into AbstractClient.
Methods invoke a new protected virtual method which is implemented in
Client to update the TabGroup.
2015-05-08 12:43:46 +02:00
Martin Gräßlin b84118a51b Workspace::updateClientLayer operates on AbstractClient
Requires a virtual updateLayer in AbstractClient. Default implementation
does nothing.
2015-05-08 12:43:46 +02:00
Martin Gräßlin 7d51838efc Implement AbstractClient::isActive and ::setActive
Moves the implmentation to AbstractClient. Methods are no longer virtual,
setActive calls a virtual protected method which is implemented in Client
for Client specific activation code.
2015-05-08 12:43:46 +02:00
Martin Gräßlin 3527f1d4b8 Implement AbstractClient::icon
Moves implementation, adds a protected setter and provides the property.
2015-05-08 12:43:46 +02:00
Martin Gräßlin 2f59f3e8b4 Move property closeable to AbstractClient 2015-05-08 12:43:46 +02:00
Martin Gräßlin 4d466f9ab3 Implement AbstractClient::skipSwitcher
Moves implementation from Client to AbstractClient.
2015-05-08 12:43:46 +02:00
Martin Gräßlin 3182c8f3e5 Implement AbstractClient::isFirstInTabBox
Moves implementation from Client to AbstractClient. Setter is protected,
getter is no longer virtual.
2015-05-08 12:43:46 +02:00
Martin Gräßlin 4ac4a97c20 Implement AbstractClient::tabBoxClient
Moves the implementation from Client to AbstractClient.
2015-05-08 12:43:46 +02:00
Martin Gräßlin 69f198e923 Move ::demandAttention to AbstractClient 2015-05-08 12:43:46 +02:00