Commit Graph

542 Commits (3619d58044f9412a20a4051696bab024f342e27b)

Author SHA1 Message Date
Martin Gräßlin 226c9a0367 Call checkWorkspacePosition also for Wayland clients in ::updateClientArea 2015-10-16 08:34:25 +02:00
Martin Gräßlin 8cdfb0e88f Merge back implementation of Client::move and ShellClient::move
Implementation goes to AbstractClient, method is no longer virtual.
The X11 specific code is moved to a new virtual protected doMove
method implemented in Client.
2015-10-15 15:29:09 +02:00
Martin Gräßlin c578720615 Add virtual AbstractClient::updateTabGroupStates(TabGroup::States)
Method added so that we can call into TabGroup::updateStates from code
in AbstractClient. Default implementation does nothing, implementation
in Client performs the actuall call.

As a first case added to Client::move in order to be able to move the
implementation to AbstractClient.
2015-10-15 15:29:09 +02:00
Martin Gräßlin d7b4d8fe82 Move functionality for geom_before_block to AbstractClient
Semantically it belongs together with geometry update blocking which
is already in AbstractClient.
2015-10-15 15:29:09 +02:00
Martin Gräßlin a186e407bf Move handling around deco_rect_before_block to AbstractClient
The usage was always to trigger repaints on the old and the new
visibleRect. And store the new visibleRect as the future old one.

This is now encapsulated in a dedicated method called
addRepaintDuringGeometryUpdates().
2015-10-15 15:29:09 +02:00
Martin Gräßlin 6049b9ff3c Move implementation of sendToScreen from Client to AbstractClient
Method is no longer virtual, stub in ShellClient removed.
2015-10-14 16:38:17 +02:00
Martin Gräßlin 9f91431e8c Move quick tiling from Client to AbstractClient
In order to make it possible to quick tile also ShellClients.
2015-10-14 08:36:29 +02:00
Martin Gräßlin 9f2b4c7d14 Introduce a virtual AbstractClient::updateQuickTileMode(QuickTileMode)
New method is used to modify the quick tile mode state directly.
Preparation step for moving the quick tile handling to AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin fa18d60e9e Use quickTileMode() instead of quick_tile_mode
Preparation step to have quick tile handled inside AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin 61caf788e3 Use (set)GeometryRestore() instead of geom_restore in Client::setQuickTileMode
Preparation step to move the implementation to AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin 94b5ca0d2b TabSynchronizer operates on AbstractClient
Change required to get methods using TabSynchronizer moved to
AbstractClient. Unfortunately we need to cast to Client when calling
updateStates. It's save as if it's not a Client we
a) don't have a tabGroup in the first place
b) the check if (main == only) will hit and the method returns
2015-10-14 08:36:29 +02:00
Martin Gräßlin 9ef42ae3c7 Move blocking geometry updates functionality to AbstractClient 2015-10-14 08:36:29 +02:00
Martin Gräßlin 727929db8a Use isDecorated() instead of m_decoration in Client::setQuickTileMode
A preparation step to move the implementation to AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin ec6c778df7 Move implementation of checkWorkspacePosition to AbstractClient
No longer a virtual method, the implementation of Client is turned into
AbstractClient. The stub removed from ShellClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin eacaf25acf Improve sharing of maximize between Client and ShellClient
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).
2015-10-14 08:36:29 +02:00
Martin Gräßlin 60342d44e3 Move adjustedSize from Client to AbstractClient 2015-10-14 08:36:29 +02:00
Martin Gräßlin e121d4a107 Use quickTileMode() instead of quick_tile_mode in Client::checkWorkspacePosition
Preparation step for moving implementation of checkWorkspacePosition
to AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin d1baa4d283 Use geometryRestore() instead of geom_restory in Client::checkWorkspacePosition
Preparation for moving the implementation to AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin 78e9a56cd1 Move checkOffscreenPosition from Client to AbstractClient 2015-10-12 10:50:20 +02:00
Martin Gräßlin 53b87dbbd9 Move (is|set)ElectricBorderMaximizing from Client to AbstractClient 2015-10-12 10:26:00 +02:00
Martin Gräßlin 226a099366 Move electricBorderMaximizeGeometry from Client to AbstractClient
As it's not used outside of Client the method is turned from public
to protected.
2015-10-12 10:24:49 +02:00
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
Thomas Lübking d61e6cd445 improve restricted moveresize
* skip all overhead on unrestricted moveResizes
* the titlebar is not guaranteed to be the top border (anymore)
* don't block vertical resize when resizing on a top corner
* reduce QRegion operations by knowledge about the degenerated titlebarregion (rect)
* rename int (sic!) "titleArea" to "requiredPixels"

REVIEW: 125428
2015-09-29 23:02:41 +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 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
Thomas Lübking 266edb123d Merge branch 'Plasma/5.4' 2015-08-15 01:58:07 +02:00
Thomas Lübking 269e275cb0 smart placement of unregularily max'd clients
1. if a client has oversize, ensure to keep the titlebar in
sight

2. if a maximized client *almost* covers the entire maximization
area, users can easily be trapped to click into the missing
pixels, thus the client below.

Therfore the clients is then stuffed into one corner, with
preference to the titlebar edge and the screen area (ie.
*away* from panels and towards actual screen borders because
of fitt's law)

BUG: 349935
REVIEW: 124286
FIXED-IN: 5.4
2015-08-15 01:34:41 +02:00
Thomas Lübking eb71b47db4 only discard pixmaps when the XCB Window resized
Causes invalid textures on the nvidia blob
when referencing textures for crossfading
eg. during maximization

BUG: 324823
REVIEW: 124591
FIXED-IN: 5.4
2015-08-15 01:34:41 +02:00
Martin Gräßlin 3139dcd3b9 Drop cmakedefine HAVE_WAYLAND
Now a required build dependency.
2015-08-12 11:39:20 +02:00
Martin Gräßlin 2192bd69e0 [wayland] Add support for PanelBehavior in ShellClient
The PanelBehavior determines the stacking of panel surfaces and whether
they "have a strut".
2015-06-20 00:14:49 +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 acb8016e65 make checkOffscreenPosition multiscreen aware
on a multiscreen setup, the window can be off in multiple directions

CCBUG: 336193
REVIEW: 124122
2015-06-18 22:41:26 +02:00
Thomas Lübking e830f08def update geom_restore when silently breaking QT mode
the next checkWorkspacePosition (now triggered by
deco border update) would falsely restore the
pre-tiling geometry

BUG: 348640
REVIEW: 123882
2015-06-10 08:50:17 +02:00
Thomas Lübking 0b9cfffe1a checkWorkspacePosition: Don't adjust to shaded sz
since the client is currently empty, we'll resort
to client hints, ie. effectively resize windows
when shading them (setGeometry and plainResize have
extra checks on whether this geometry is only the decoration
height to not smear client_size)

REVIEW: 123882
BUG: 348064
2015-06-10 08:50:17 +02:00
Thomas Lübking 7f71c89111 don't nuke both dims if undecorated frame isEmpty
isEmpty hits if one dimension is <= 0 - the other one
can be absolutely valid, so preserve it.

REVIEW: 123882
2015-06-10 08:50:17 +02:00
Martin Gräßlin 2bdabe62aa [wayland] Check for docks in ShellClient in Workspace::updateClientArea
A ShellClient can have window type dock. In that case it's considered to
have a strut. That is currently every panel restricts the area. On the
other hand only internal clients can be docks at the moment. For Plasma's
panels a dedicated interface will be needed.
2015-06-08 21:29:07 +02:00
Martin Gräßlin 4ca3734d12 [wayland] Support move/resize mode in pointer move handling 2015-06-06 17:43:12 +02:00
Thomas Lübking f887c7d4ee Merge branch 'Plasma/5.3' 2015-06-03 21:40:08 +02:00
Thomas Lübking 1df2d5979f keep quick maximized w/ size restritions in screen
... bounds
BUG: 348121
REVIEW: 123910
2015-06-03 21:22:22 +02:00
Martin Gräßlin 737ad0b664 Move keepInArea to AbstractClient 2015-05-27 14:20:12 +02:00
David Edmundson df1499784f move isFullScreenable to AbstractClient
REVIEW: 123871
2015-05-21 16:40:21 +01:00
Martin Gräßlin 4b41c33268 Workspace::movingClient changed to AbstractClient
In events.cpp it's casted to Client as it's X11 specific.
In InputRedirections it's kind of broken, but window movement is
anyway broken.
2015-05-08 12:43:45 +02:00
Martin Gräßlin aa1e9161d5 Workspace::clientArea takes AbstractClient instead of Client 2015-05-08 12:43:44 +02:00
Thomas Lübking 08b7b4818b unmaximize from partial to enter quick tiling
BUG: 345423
FIXED-IN: 5.3
2015-04-07 23:59:16 +02:00
Martin Gräßlin dfa89cc050 Port reading Motif hints to XCB
A wrapper class for MotifHints is added to xcbutils. This class manages
the information about the read Motif hints, so that Client doesn't need
to have a copy of the read states.

The class is designed in a way that during Client::manage we get rid of
another roundtrip.

REVIEW: 122378
2015-02-06 13:43:57 +01:00
Thomas Lübking 93fb58aa88 Merge branch 'Plasma/5.2' 2015-02-06 00:29:55 +01:00
Thomas Lübking ff700a8db5 fix e3768b4355
accidentally picked the patch from the wrong branch
just about comments
2015-02-06 00:27:31 +01:00
Thomas Lübking 74e3167732 save geom_restore before calling for border update
otherwise the stored geometry would be correct for
maximized borders, thus the unmaximized borders
make the window to small on unmaximizing

BUG: 343691
FIXED-IN: 5.2.1
REVIEW: 122416
2015-02-05 21:37:34 +01:00
Thomas Lübking f496a91e59 updateFocusMousePosition() before some actions
in particular artificial geometry updates that should not
update the focus and are prone to a static cursor

BUG: 343319
REVIEW: 122299
FIXED-IN: 5.2.1
2015-02-05 21:37:33 +01:00