Commit Graph

608 Commits (ca1f66b1df24f0e3daa53472ecfcce4e2d88b112)

Author SHA1 Message Date
Vlad Zahorodnii b8a6fd7c46 Don't initialize QFlags<T> with nullptr
Summary: This looks very odd.

Test Plan: Compiles.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24086
2019-09-19 21:42:34 +03:00
Vlad Zahorodnii 62a7db7028 Use nullptr everywhere
Summary:
Because KWin is a very old project, we use three kinds of null pointer
literals: 0, NULL, and nullptr. Since C++11, it's recommended to use
nullptr keyword.

This change converts all usages of 0 and NULL literal to nullptr. Even
though it breaks git history, we need to do it in order to have consistent
code as well to ease code reviews (it's very tempting for some people to
add unrelated changes to their patches, e.g. converting NULL to nullptr).

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson, romangg

Reviewed By: #kwin, davidedmundson, romangg

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23618
2019-09-19 17:48:21 +03:00
Vlad Zahorodnii 726e6c1567 Don't initialize QFlags<T> with 0 value
Summary:
clang-tidy has a check that converts all usages of null pointer literals
to nullptr keyword. However, there's a small issue related to QFlags<T>.

Apparently, QFlags<T> has a constructor that takes a pointer and if you
pass 0 to it, clang-tidy will replace 0 with nullptr, e.g.

    NET::States(0) -> NET::States(nullptr)

Even though passing nullptr is totally correct, it looks very weird.

Test Plan: Complies.

Reviewers: #kwin, gladhorn

Reviewed By: #kwin, gladhorn

Subscribers: gladhorn, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23948
2019-09-15 00:17:53 +03:00
Frederik Gladhorn b64e67ce7c Remove disabled TabGroup feature
Summary:
This has been commented out since 2014, I doubt it will come back.
This is a big amount of code, maintenance will be easier without it.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: romangg, graesslin, kwin

Tags: #kwin, #documentation

Differential Revision: https://phabricator.kde.org/D23069
2019-09-14 10:58:48 +02:00
Vlad Zagorodniy a035401b55 Use XCB wherever possible
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23756
2019-09-07 19:54:45 +03:00
Vlad Zagorodniy 2963c9ca56 Quick tile only resizeable clients
Summary:
Maximized clients weren't considered as resizeable when quick tiling was
added. Therefore, a special case was added in Client::setQuickTileMode().
However, that special case didn't take into account that a fullscreen
client can be also maximized. Clearly, we don't want users quick tile
fullscreen clients.

BUG: 411028
FIXED-IN: 5.17.0

Test Plan: No longer able to quick tile maximized fullscreen window of Konsole.

Reviewers: #kwin

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23604
2019-09-05 10:37:39 +03:00
Vlad Zagorodniy 7a3722b4f5 Switch to Q_ASSERT
Summary:
Switch to Q_ASSERT in order to make code a bit more consistent. We have
places where both assert and Q_ASSERT are used next to each other. Also,
distributions like Ubuntu don't strip away assert(), let's hope that
things are a bit different with Q_ASSERT.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: romangg, davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23605
2019-08-31 20:07:05 +03:00
Vlad Zagorodniy 684b4b635e Use more traditional doxygen style
Summary:
So far we were following a bit unique and rare doxygen comment style:

    /**
     * Contents of the comment.
     **/

Doxygen comments with this style look balanced and neat, but many people
that contribute to KWin don't follow this style. Instead, they prefer
more traditional doxygen comment style, i.e.

    /**
     * Contents of the comment.
     */

Reviewing such changes has been a bit frustrating for me (so selfish!)
and for other contributors.

This change switches doxygen comment style in KWin to a more traditional
style. The main reason for doing this is to make code review process easier
for new contributors as well us.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22812
2019-07-29 22:06:19 +03:00
Vlad Zagorodniy 97dbbfbe2c Pass arguments to changeMaximize in correct order
Summary:
The first argument in AbstractClient::changeMaximize specifies whether
the maximized state of the client needs to be toggled in horizontal
direction.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22486
2019-07-22 23:28:42 +03:00
Roman Gilg 75a1506869 Rework Client fullscreen control
Summary:
After fixing superficial issues go and work over Client's fullscreen control.
This way we:
* check first for what the rule wants uis to do,
* do only proceed if there is a change from/to fullscreen
* remove code, that becomes unneeded by this.

This goes with the assumption, that the current fullscreen state is always
correctly stored in the m_fullscreenMode variable, but the previous code
implicitly did the same at numerous occasions, just not in a consistent
manner.

Test Plan: Manually and auto tests still pass.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: graesslin, zzag, kwin

Tags: #kwin

Maniphest Tasks: T11098

Differential Revision: https://phabricator.kde.org/D18185
2019-07-17 10:37:56 +02:00
Vlad Zagorodniy 4e5d3d0010 Port away from QRegion::rects
Summary:
QRegion::rects was deprecated in Qt 5.11. It is advised to use begin()
and end() methods instead.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22353
2019-07-10 01:00:51 +03:00
Roman Gilg b0d1689722 Remove Client fullscreen hack
Summary:
This hack seems to be deactivated by default nowadays and I did not find an
option in the KCMs to activate it. Git blame shows some last commits from
around 2012 to the functions, but they only deal with code style.

Also even if it would be enabled, in light of Wayland we don't want some
roque XWayland client go bonkers via this hack.

This patch removes the code path in order to decrease complexity and ease
future changes to the fullscreen handling overall.

Test Plan: Manually and autotests pass.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, graesslin, kwin

Tags: #kwin

Maniphest Tasks: T11098

Differential Revision: https://phabricator.kde.org/D18157
2019-07-09 10:41:51 +02:00
Roman Gilg 4f7800a56a Correct code style of Client fullscreen control
Summary:
As a preperational step for future changes obey the code
styling guide in Client fullscreen functionality.

No functional changes.

Test Plan: Manually, autotests pass.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: zzag, graesslin, kwin

Tags: #kwin

Maniphest Tasks: T11098

Differential Revision: https://phabricator.kde.org/D18153
2019-07-08 12:51:57 +02:00
Vlad Zagorodniy 3e1b616642 Merge branch 'Plasma/5.16' 2019-07-08 12:45:56 +03:00
Vlad Zagorodniy 0a9c254769 Fix maximize Apply Now rule
Summary:
AbstractClient applies maximize rules by running

    maximize(maximizeMode());

but because window rules are checked only in changeMaximize
implementation, the if statement prevents us from applying maximize
rules (m and maximizeMode() are equal).

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22255
2019-07-08 12:44:26 +03:00
Roman Gilg 787c22ec4c Split up fullscreen able check into AbstractClient subclasses
Summary:
Most parts of this function are only relevant for X clients, in particular
the "fullscreen hack". Therefore split up the function into the AbstractClient
subclasses.

Test Plan: Manually and autotests still pass.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: graesslin, zzag, kwin

Tags: #kwin

Maniphest Tasks: T11098

Differential Revision: https://phabricator.kde.org/D18128
2019-07-06 16:00:32 +02:00
Vlad Zagorodniy 67b2746ecd Compute correct boundaries in checkWorkspacePosition
Summary:
When a client sets a strut, checkWorkspacePosition will be called to
bump clients that touch corresponding screen edge.

In order to do that, checkWorkspacePosition needs to calculate client
boundaries before and after the restricted move area was changed. As it
turns out, if the client reserves space "between" screens, calculated
boundaries can be incorrect, which may lead to some funky results, e.g.
shrunken clients.

For example, let's say that there is a dual-monitor setup. If a client
reserves some amount of space at the right border of the left screen,
then clients on the right monitor will have rightMax which is equal to
the x coordinate of screenArea.

To fix that, this change ensures that only restricted areas belonging
to the same screen as the client are taken into account when computing
the boundaries.

BUG: 404837
BUG: 406573

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D20987
2019-05-15 11:07:14 +03:00
Vlad Zagorodniy b37743d8b1 Delete noop code
Summary:
checkWorkspacePosition has a guard again desktop clients right at the
top, so the for loop is basically a no-op.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D20777
2019-04-25 11:14:48 +03:00
Vlad Zagorodniy 32863aac9b Use AbstractClient::Position instead of Client::Position
Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D20778
2019-04-24 02:26:56 +03:00
Vlad Zagorodniy abe128818c Use more accurate name for Workspace::getMovingClient method
Summary:
The name of Workspace::getMovingClient() method implies that the
returned value is a client that is currently being moved around
by the user, but this is of course incorrect.

Reviewers: #kwin, apol

Reviewed By: apol

Subscribers: apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D20663
2019-04-22 11:12:22 +03:00
Volker Krause 008143c9db Update URLs to use https
Summary: Largely done automatically using the tools from D19996.

Reviewers: yurchor, zzag

Reviewed By: yurchor, zzag

Subscribers: zzag, yurchor, kwin, kde-doc-english

Tags: #kwin, #documentation

Differential Revision: https://phabricator.kde.org/D20017
2019-03-25 19:26:23 +01:00
Vlad Zagorodniy 7b20e1f66f Overhaul doxygen comments
Summary:
We have a mix of different doxygen comment styles, e.g.

    /*!
      Foo bar.
     */

    /**
     * Foo bar.
     */

    /** Foo bar.
     */

    /**
     * Foo bar.
     */

    /**
     * Foo bar.
     **/

To make the code more consistent, this change updates the style of all
doxygen comments to the last one.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18683
2019-02-12 19:29:33 +02:00
Yuri Chornoivan bf58da3e9a Fix minor EBN issues 2018-08-29 21:02:16 +03:00
Martin Flöser aefa11f11a Block geometry updates on move resize finish and don't configure xdg shell surfaces while blocked
Summary:
We send out too many configure requests when finishing move resize which
also triggers quick tiling. This change addresses the problem of the too
many configure requests by making the configure method check whether
geometry updates are blocked. And to make this work properly for the end
of finish move resize the complete method is wrapped in a geometry
update blocker.

BUG: 388072
FIXED-IN: 5.12.1

Test Plan:
Quick tiling test passes, both Wayland and X11 windows are
quick tiled correctly.

Reviewers: #kwin, #plasma, jgrulich

Subscribers: plasma-devel, kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10156
2018-02-04 14:59:56 +01:00
Martin Flöser 8a2796d280 Fix regression from KWin 5.9 regarding quick tiling
Summary:
The regression got introduced with 9934f5b575.
The order when setMaximize(false, false) was called changed in regard to
when the quick tiling mode was adjusted. But just changing the ordering
back was no solution as that would cause regressions in other areas
(unit tests fail).

This change builds up on the support for geometry update blocker on
Wayland to be able to better support this situation without causing
further regressions.

Also this change rethinks the code area. There is an idea behind
temporarily setting the quick tile mode to none and that is even
documented in a comment: it should not confuse maximize. So let's do
exactly that: call the maximize in the block where the quick tile
mode is temporarily wrong. As that is only one branch the else branch
performs the same steps.

BUG: 376104
FIXED-IN: 5.12.0

Test Plan: Confirmation in bug report that patch fixes issue

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D9178
2017-12-04 17:25:40 +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 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
Martin Gräßlin 1e13deaa1d Port some displayWidth/displayHeight usages to Screens::size()
Summary:
KWin::displayWidth and KWin::displayHeight are bound to X11 which
doesn't make much sense on X11. In addition KWin internally knows
the overall display dimensions through the Screens singleton class.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D1798
2017-09-01 17:11:10 +02:00
Martin Flöser 8794fe548a Guard every remaining access to rootInfo
Summary:
For a future XFree KWin. Only remaining not guarded usages are in
Workspace::init, but that one needs to be refactored anyway for
becoming X free.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7173
2017-08-07 21:19:04 +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 8e2805ce9d Merge branch 'Plasma/5.10' 2017-07-17 16:53:08 +02:00
Martin Flöser 139b4dc82a Properly swap the quick tile side when pressing the shortcut again
Summary:
The quick tile shortcuts have a feature of moving the window to the next
screen if one presses the same shortcut again.
E.g. if a window is quick tiled to the left on the right most screen,
quick tile again to left should move it to the left screen and quick tile
right. Thus it swaps the borders.

This wasn't handled correctly, especially not for modes like top and
bottom. If a window is quick tiled to the top an impossible mode was
generated: Left | Right. Doesn't make sense.

This change fixes the mode swapping and extends our quick tile testing
to cover the situation.

BUG: 382313
FIXED-IN: 5.10.4

Test Plan: Extended test case

Reviewers: #plasma, #kwin

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6708
2017-07-17 16:51:31 +02:00
Martin Flöser 672cae9a7d Implement support for restricted move area on Wayland
Summary:
This change implements a missing TODO to generate the restricted move
area for windows with struts (aka panel) on Wayland.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D6611
2017-07-11 17:52:01 +02:00
Martin Flöser 14c8440f11 Restrict move resize area only on the screen the strut window is on
Summary:
By allowing panels between screens in 5.8 to have a strut we created a
"regression" in KWin. KWin always was wrong, just we didn't notice as
neither Plasma nor previously Kicker set a strut on panels between shared
screen edges.

The strut is created from the edge of the overall screen setup. This
means a panel on the left edge of a screen on the right has the strut
starting from the left screen. KWin uses the strut to restrict the move
resize area: a window decoration is not allowed to go below a strut. Thus
it becomes impossible to move the window from the right to the left
screen.

This change tries to solve this problem by only restricting the move area
on the screen the window with the strut is on. E.g. if the window is on
the right screen, the left screen is not affected. Thus it's possible
again to move a window from one screen to the other as the added test
case shows.

Unfortunately there are still corner cases where this won't work
correctly. If the window is on both screens this won't work. It is also a
rather heavy change for KWin and thus it's targeted for master and not
for the 5.10 or the 5.8 branch. If we notice that the patch works well
and doesn't create further issues, it should be considered for
backporting.

BUG: 371199
CCBUG: 370510
FIXED-IN: 5.11

Test Plan: Added test case

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6562
2017-07-11 17:51:39 +02:00
Marco Martin 8190927eaf geometry shape changes also with no resize
Summary:
the morphingpopup effect was working with notifications only
in wayland. looking at what the codepath is, the signal
geometryShapeChanged was not emitted as it was checking for
resized, but it's supposed to come at every geometry
update, not only resizes

Test Plan:
notification with D6216 are correctly animated, other
animated things liketooltips are unaffected

Reviewers: #plasma, #kwin, graesslin, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6229
2017-06-15 19:08:19 +02:00
Kai Uwe Broulik eaf41cb6c5 Animate quick tiling outline
When quick tiling animate the outline from the window geometry to the position it would have afterwards.
This provides a visual hint to from where to where the window will go.

Differential Revision: https://phabricator.kde.org/D5262
2017-04-25 16:38:52 +02: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 679e417808 Don't snap to auto-hidden panels
Summary:
When moving windows we don't want to snap against not visible windows
like auto-hidden panels.

BUG: 365892
FIXED-IN: 5.8.4

Test Plan: So far only auto-test, manual test will follow.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3225
2016-11-03 08:35:25 +01:00
Martin Gräßlin 996ee34e14 Remove the unredirect fullscreen windows functionality
Summary:
Rational: unredirect fullscreen windows is a weird beast. It's intended
to make fullscreen windows "faster" by not compositing that screen. But
that doesn't really work as KWin jumps out of that condition pretty
quickly. E.g. whenever a tooltip window is shown. KWin itself has a
better functionality by supporting to block compositing completely.
The complete code was full of hacks around it to try to ensure that
things don't break.

Overall unredirect fullscreen has always been the odd one. We had it
because a compositor needs to have it, but it never got truly integrated.
E.g. effects don't interact with it properly so that some things randomly
work, others don't. Will it trigger the screenedge, probably yes, but
will it show the highlight: properly no.

By removing the functionality we finally acknowledge that this mode is
not maintained and has not been maintained for years and that we do not
intend to support it better in future. Over the years we tried to make
it more and more hidden: it's disabled for Intel GPUs, because it used
to crash KWin. It's marked as an "expert" option, etc.

It's clearly something we tried to hide from the user that it exists.

For Wayland the whole unredirect infrastructure doesn't make sense
either. There is no such thing as "unredirecting". We might make use
of passing buffers directly to the underlying stack, but that will be
done automatically when we know it can be done, not by some magic is
this a window of specific size.

Test Plan:
Compiles, cannot really test as I am an Intel user who never
had that working.

Reviewers: #kwin, #plasma, #vdg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2180
2016-08-04 14:48:35 +02:00
Bhushan Shah 3ec8e5ce75 Remove completely useless output
This was being repeated everytime a window is created/resized/closed.

Reviewed-by: Martin Gräßlin <mgraesslin@kde.org>
2016-06-29 11:56:18 +05:30
Martin Gräßlin e5fe3137b8 Fix the ignore struts multi-screen handling
Summary:
The checks in Client::adjustedClientArea were a little bit too
agressive, excluding also valid setups.

This change addresses the regression by keeping the actual intended
improvements in place.

The check in Client::adjustedClientArea is now only done for the
special case of desktopArea == area. This ensures that a strut excluding
a complete screen won't affect the overall workarea.

In addition new checks are introduced in Workspace::updateClientArea.
When calculating the new sareas a check is performed whether the
intersection with the adjustedClientArea would result in the sarea
becoming empty (thus a screen being completely removed). If that's the
case the geometry is ignored to not exclude a complete screen.

Interestingly I should have noticed that something with the logic is
odd. As the test case had two commented geometries which we now get.

BUG: 363804

Reviewers: #plasma, apol, lbeltrame

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D1744
2016-06-15 14:48:13 +02:00
Martin Gräßlin 58db477796 Fix the strut handling for wayland clients
Summary:
The implementation was broken as it transformed the QRects into QRegions,
subtracted the geometries and took the bounding rect again. In several
setups this could result in the strut getting ignored.

This change improves the calculation of the struts by creating a QMargin
which describes the area which needs to be subtracted from a screen rect.
The QMargin is only adjusted for the edge the window borders. We can
assume that a window with a strut needs to border a screen on Wayland.

With this change we are also able to support panels between screens.
On Wayland a panel placed on the right of a left screen affects the
maximization area of the left screen, but does not affect the overall
workarea.

CCBUG: 167852

Reviewers: #plasma_on_wayland, #kwin

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D1803
2016-06-10 12:36:15 +02:00
Martin Gräßlin bc25677caf Strut sanity checking: ignore struts which would exclude a complete screen
Summary:
Mostly meant for multi-screen setups: we don't want that a strut set on
a window on screen 0 results in screen 1 completely being excluded. Even
if that's strictly seen a client bug, it's better to just ignore the
strut from KWin's side.

The sanity check is implemented in Client::adjustedClientArea.

From a pure standard point of view this change is a EWMH violation and
thus can cause regressions: struts by clients no longer working.

A test case for struts is added, including some invalid combinations
whose strut is ignored with this change.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1386
2016-04-12 16:55:19 +02:00
Martin Gräßlin 7777f0c507 Invalidate double click timer when start move resize
A press, move, release, press cycle should not trigger the double
click action.
2016-03-11 12:47:17 +01:00
Thomas Lübking 9d09cf6dc9 respect motif and rules on unmaximizing
when restoring a borderless maximized, the window shall
not suddenly be decorated

BUG: 359797
FIXED-IN: 5.6
REVIEW: 127198
2016-02-29 09:48:59 +01:00
Martin Gräßlin 4c7450a1f6 Add nullptr check in AbstractClient::checkWorkspacePosition for workspace()
If a decorated ShellClient is still around after Workspace got destroyed
this method is still invoked and can lead to a crash. As we have a
workspace initing test there already it makes sense to combine it with
a workspace being down check.
2016-02-04 11:16:55 +01:00
Martin Gräßlin ebe2989649 Move the KDecoration2::Decoration to AbstractClient
This includes the methods:
* decoration()
* decoration() const
* isDecorated() const

In addition new protected methods are added to destroy the Decoration
and to set it.

Usage of m_decoration in Client code is adjusted.
2015-12-18 16:41:49 +01:00
Thomas Lübking fab806df92 avoid pointless kbd grab on moveresize
This makes (Qt5?) clients believe they lost input, ie. are no longer
active and change their visual representation.

REVIEW: 126266
2015-12-08 20:32:32 +01:00
Martin Gräßlin f5848d9405 Move implementation of updateMoveResize to AbstractClient
No longer virtual.
2015-10-26 09:21:36 +01:00
Martin Gräßlin f4b02d5a8c Move handleMoveResize to AbstractClient
Sync related code is split out into dedicated virtual methods so that
Client can provide the X11 specific implementation. General handling,
though is completely in AbstractClient.
2015-10-26 09:21:36 +01:00