14956 Commits (42456bdf7b308f04be6425c2ca7b08df9cc6874a)
 

Author SHA1 Message Date
Martin Gräßlin 42456bdf7b Remove epoxy/egl.h from kwinglutils_func.h
Summary:
It's not needed inside libkwinglutils. The only required usage is from
abstract_egl_backend.h where the include is moved to.

This removes an fixx11h.h from a kwin lib.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3447
8 years ago
Martin Gräßlin b1e258d1e9 Remove useless branching on EGL/GLX in GLPlatform
Summary:
The code for EGL and GLX platform did the same checks, just with the
difference that the EGL check has another check for isGLES.

So let's just do the branching on whether isGLES or GL.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3446
8 years ago
Martin Gräßlin 451bbb54dd [effects] Handle windowShown and windowHidden in fade effect
Summary:
For Wayland windows we can have a sequence of window unmapped
(windowHidden signal) followed by a windowClosed way later when the
application quits. This is for example the case with menus.

The result of this was that the fade out animation triggered when the
application quit showing all the already closed menus again.

This change implements a windowShown and windowHidden handler and
triggers the fadeIn/Out animation on it. If the window gets shown
again the existing fadeOut animation gets cancelled, so that it can run
again.

If a window gets closed for which a fade out animation has been run
already, it's not triggered again, thus ensuring that we don't see
zombie windows.

CCBUG: 372622

Reviewers: #kwin, #plasma_on_wayland, hein

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3419
8 years ago
Martin Gräßlin fbab204968 [effects] Add a screenshot dbus method which takes a file descriptor
Summary:
The idea behind this mode is to support applications like spectacle
(see T4458). The calling application passes a file descriptor (created
through e.g. a pipe) and the screenshot effect writes the captured image
into that fd.

The advantage over the existing variant which writes to a file in the
/tmp directory is that this is peer-to-peer between the requesting
application and KWin. No other application can get to that image.

The change also includes setting SIGPIPE to ignore. It showed that when
the reading side already cancelled the read prior to KWin writing out
the image we get a SIGPIPE which results in application termination,
which is not what we want in case of a Wayland compositor. The sigpipe
can be ignored as Qt (and libpng) handles that error just fine at
runtime.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3412
8 years ago
Martin Gräßlin cfdc1acbd3 [effects] Show info message in interactive window screenshot mode
Summary:
While taking an interactive screenshot we should inform the user about
what's going on, how to take the screenshot and how to cancel it.

For this the effect creates an EffectFrame with the required
information.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3403
8 years ago
Martin Gräßlin 17e0bad922 Drop OpenGL based color correction from KWin
Summary:
The feature has always been considered experimental. Unfortunately it is
completely unmaintained and hasn't seen any commits in years. It
requires kolor-manager to function, but that has not seen a release
based on frameworks yet. This makes it difficult to maintain. In fact I
have never been able from the introduction till now to setup a color
corrected system. One needs kolor-manager and oyranos and especially the
latter is hardly available on any linux distribution (e.g. not on the
Debian/Ubuntu systems).

Due to being unmaintained color correction in KWin did not keep up with
recent changes. Neither did it see any updates during the xlib->xcb
port, nor during the Wayland port. Especially the Wayland port with the
rendering changes make it unlikely to function correctly. E.g. Wayland
introduced a proper per-screen rendering, while color correction did a
"fake" per screen rendering. How that is going to work in combination is
something nobody ever tried. Now after the introduction of proper
per-screen rendering the solution would be to port color correction to
the new api, but that never happened.

Color correction also modified the shaders, but a newer shader API got
introduced some time ago. Whether the color correction shader support
that or not, is unknown to me. Also which shader language versions are
supported. I know it was based on 3d texture support, which back on
introduction was partially lacking in OpenGL ES. Nowadays that changed,
but color correction didn't update.

Last but not least it is completely X11 based and there is no work on
how to make it work with Wayland.

Given all the problems, especially the fact that it is unmaintained and
cannot be setup on my system, means to me that the only solution is to
remove it.

I'm open to having it reintroduced in future, but only if the
availability on Linux distributions gets addressed before. As long as
major linux distributions do not ship this feature, it should not be in
KWin. Given that I must say that it was a mistake to add it in the first
place and I need to point out that I was against the merge back then.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3402
8 years ago
Martin Gräßlin 2619ddf02e Merge branch 'Plasma/5.8' 8 years ago
Martin Gräßlin 16c7650d76 Fix AbstractClient::sizeForClientSize
Summary:
The method is supposed to return the AbstractClient's size for a given
client size. That is the size including the window decoration.

The default implementation returned the passed in client size without
adjusting for the decoration. This resulted in ShellClient getting a
wrong size especially when AbstractClient::adjustedClientSize (which
calls sizeForClientSize) was called.

The result of the incorrect size was for example a shrinking of the
window when starting to resize a window.

BUG: 370345
FIXED-IN: 5.8.4

Reviewers: #kwin, #plasma_on_wayland, broulik, subdiff

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3414
8 years ago
Martin Gräßlin 32422fd8cc Drop kwinconfig.h include from kwinglutils_funcs.h
Not used.
8 years ago
Martin Gräßlin 9d8833afdc Remove kwinglobal.h include from kwinglutils_funcs.h
Not used.
8 years ago
Martin Gräßlin cb3b0232dd [kwinglutils] Drop unused macro MAKE_GL_VERSION
No longer needed, as replacement there would be kVersionNumber
8 years ago
Martin Gräßlin 6bee7f4aac KillWindow support for Wayland windows
Summary:
AbstractClient gains a new pure virtual killWindow method and this gets
implemented in ShellClient.

ShellClient performs the killing by sending a term signal to the
process. This can only work if the client connected through the socket
and didn't get a socketpair fd passed. In that case the pid is KWin's
and KWin doesn't want to terminate. Thus this is special handled to
destroy the connection instead.

In case terminating the process has no effect, the connection gets
destroyed after five seconds.

The KillWindow is adjusted to operate on AbstractClient instead of
Client.

This implements T4463.

Test Plan: Killed windows and auto test

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3370
8 years ago
Martin Gräßlin af56c6b050 Implement interactive window selection for Wayland platforms
Summary:
The interactive window selection is implemented in InputRedirection
through a dedicated InputEventFilter. The InputEventFilter so far takes
care of pointer input and keyboard input. In addition it ensures that
keyboard and pointer focus is reset on start and on end.

With this change KillWindow now also works on Wayland, but only for X11
windows, as the Wayland variant is not yet implemented.

Test Plan: Tested in nested setup, auto-tests still needed

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3365
8 years ago
Martin Gräßlin 27376e39ef [effects] Add interactive window selection mode to ScreenshotEffect
Summary:
EffectsHandler gains a new method to startInteractiveWindowSelection
which just delegates to the one in Platform. That way a window can be
selected and returned to an Effect.

The screenshot effect makes use of this new functionality and provides
an interactive window screenshot mode which saves to a temporary file.
Note that this is not yet the variant intended for use in spectacle.

Test Plan: Took a screenshot on Wayland

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3367
8 years ago
Martin Gräßlin e5f02e822d [kwinglutils] Remove unused s_eglExtensions variable
Left over from incomplete removal.
8 years ago
Martin Gräßlin b9884672f4 [kwinglutils] Drop variable glTextureUnitsCount
Summary: Unused and even potentially not set.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3399
8 years ago
Martin Gräßlin 00c9560519 [kwinglutils] Drop functions related to (nearest) power of two
Summary:
Not used anywhere in KWin and annotated that they should be removed. As
we have an ABI break in 5.9 we can remove them now.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3398
8 years ago
Martin Gräßlin 56d9f90546 Clean up egl/glx extensions in debug console
Summary:
As there is no difference between egl and glx extensions anymore inside
KWin (both are provided through the OpenGLBackend) there is no need to
have to group boxes and do a manual hide/show based on which platform is
used.

Instead there is now just one group box and it's called "Platform
Extensions".

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3400
8 years ago
Martin Gräßlin d1de6899fd Move querying the egl extensions into the AbstractEglBackend
Summary:
Instead of having the egl extensions in the global kwinglutils lib it
becomes private to the AbstractEglBackend. Just like on glx the
glxextensions are moved into the platform.

The extensions are queried from initEglAPI, that is as early as possible
after initializing the EGLDisplay. This ensures that any implementing
subclass can access the extensions early enough.

As a note: the EglOnXBackend had a potentially wrong sequence for
initializing the buffer age extension. It is now moved to the correct
place where the result is needed for the first time.

From the global API eglExtensions are removed from hasGLExtension and
the eglExtensions function is dropped. As by that initEGL did not do
anything it is also dropped.

Test Plan:
Tested nested kwin on Wayland, still works, extensions shown
in debug console

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3396
8 years ago
Martin Gräßlin dcf7f40c18 [kwinglutils] Drop eglResolveFunctions
Summary:
Method doesn't do anything. If at some point we want to resolve egl
functions again, it should be done in the Platform, just like
glxResolveFunctions is nowadays done in the platform.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3391
8 years ago
Martin Gräßlin 5d3e15ff3a [kwinglutils] Drop hasEGLVersion function
Summary:
It's unused in KWin and absolutely not needed as the call to
eglInitialize, which every platform does, also gives the version for
free. So no need to do any caching in a global method.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3390
8 years ago
Martin Gräßlin fd83366e31 Implement interactive window selection for Wayland platforms
Summary:
The interactive window selection is implemented in InputRedirection
through a dedicated InputEventFilter. The InputEventFilter so far takes
care of pointer input and keyboard input. In addition it ensures that
keyboard and pointer focus is reset on start and on end.

With this change KillWindow now also works on Wayland, but only for X11
windows, as the Wayland variant is not yet implemented.

Test Plan: Tested in nested setup, auto-tests still needed

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3365
8 years ago
Martin Gräßlin 7b464cf284 Support interactive window selection through the Platform
Summary:
A new virtual method is added to Platform:
startInteractiveWindowSelection

The interactive window selection enters a mode where the user can select
a window through the pointer or keyboard device. The cursor is turned
into a crosshair cursor, unless another cursor name is provided (e.g.
pirate for kill window).

Once a window is selected the provided callback method is invoked with
the selected Toplevel as argument. In case the user cancelled the
selection a nullptr argument is passed in.

Currently it's only implemented by the X11 standalone platform using the
logic from KillWindow. Just instead of killing the window the callback
is invoked.

KillWindow loses the X11 implementation and interacts with the new
functionality in Platform by providing a lambda function for the
killing.

Test Plan: Killing of X11 windows is still possible

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3363
8 years ago
Martin Gräßlin 327ccffcf4 Add a keyboard tab to the debug console
Summary:
A little bit debug information about the current keyboard state is
useful. Thus a new tab is added to show information about xkbcommon.

It shows:
* layouts in the keymap
* currently active layout
* supported modifiers in key map
* currently active modifiers in state
* supported leds in key map
* currently active leds in state

Whenever a key is pressed/released the complete ui is updated to reflect
the latest state. That is pressing/releasing a modifier is directly
reflected in the ui.

This UI can extended as needed for further debug information about the
keymap state.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3379
8 years ago
Martin Gräßlin 346619aa36 Remove KWin::display from kwinglobals
Summary:
And finally nothing inside libkwineffects, libkwinglutils,
libkwinxrenderutils and kwineffect and kwin core uses KWin::display.
We are finally XLib free!

This change drops KWin::display and removes the include to QX11Info from
kwinglobals.h. And the libraries no longer need to link X11Extras.  Due
to that removal a few seeming unrelated changes are required to add the
include where needed and linkage to X11Extras.

The biggest change is to x11 platform plugin which still needs the
display and caches it in the Platform and passes it to various places in
a way that the code doesn't need to be adjusted.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3337
8 years ago
Martin Gräßlin d7fa827644 Pass function ptr to resolve glFunctions to initGL
Summary:
KWin still resolves some OpenGL function pointers. For that it needs to
use either eglGetProcAddress or glxGetProcAddress. With other words the
method to resolve needs to know whether it is egl or glx and needs both
a dependency to egl and glx. Especially the dependency to glx is ugly as
that pulls in XLib into our library.

The way so far was to pass an enum value to the initGL method to know
whether it's EGL or GLX. With this change the enum value is removed and
replaced by a function pointer to resolve the methods.

This simplifies the resolve code and allows to completely remove the glx
variant we still had in the library. Thus kwinglutils library is now glx
and XLib free.

Test Plan: nested KWin with OpenGL/EGL still works

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3336
8 years ago
Martin Gräßlin 6184278bec Fix for failing testScriptedEffectsLoader
By changing the loading of scripted effect config to interact with
kwinApp we broke the tests which do not use a kwinApp.

This change turns the access to the KSharedConfigPtr go through the
property system, so that the tests can also install a dummy
KSharedConfigPtr. With that scripted effects loader test passes and no
longer crashes and the integration/effects tests also still pass.
8 years ago
Martin Gräßlin 1c819c5e86 Drop EffectsHandler::effectsConfig
Summary:
The effectsConfig is no longer used by any Effect. ScriptedEffects use
KWin's KSharedConfigPtr and the builtin effects all have a kcfg with
kwinrc being hard coded.

The effectsConfig had the big disadvantage that it hardcoded kwinrc
while the rest of kwin uses a KSharedConfigPtr which might not point to
kwinrc.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3384
8 years ago
Martin Gräßlin af83401b83 Use KWin's KSharedConfigPtr in ScriptedEffect
Summary:
So far ScriptedEffect used EffectsHandler::effectConfig to get the
KConfigGroup for the ScriptedEffect. This has the disadvantage that the
config file name is hardcoded to kwinrc in EffectsHandler::effectConfig.

Inside KWin a KSharedConfigPtr is used which can point to somwhere else
than kwinrc. If that was the case the ScriptedEffects were not able to
pick up this customized config and instead continued to read values from
kwinrc.

With this change the ScriptedEffects use the KSharedConfigPtr provided
by KWin. Thus in e.g. autotests we can use the general way to configure
the effects and don't need to write to the config.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3383
8 years ago
David Edmundson 9a582f6dbe Remove unused method
Summary:
This isn't used and if it was would give the wrong value.
Actual correct size can be determined via Screens object.

Test Plan:
Grepped it's not overriding anything
Compiles

Reviewers: #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3385
8 years ago
Martin Gräßlin adfaac4d60 [effects] Show a notification when a screenshot got saved to file
Summary:
Inform the user about the path to where a screenshot got saved through a
notification. This is helpful on the one hand that the user sees that
the screenshot got saved and from a security perspective that the user
is informed when a screenshot is taken through the dbus interface. It
doesn't prevent non-authorized screenshot taking, but at least the user
is informed about it.

Reviewers: #kwin, #plasma, #vdg

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3376
8 years ago
Martin Gräßlin 620663cb28 [effects] Introduce kcfg for SlidingPopups
Summary: Uses the normal animationTime kcfg settings.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3375
8 years ago
Martin Gräßlin 10f641d5d9 [effects] Introduce kcfg for FallApart effect
Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3374
8 years ago
Martin Gräßlin feac312ee0 Move resolving glxSwapIntervalMesa into platform plugin
Summary:
No need to resolve glx methods through the shared lib. At the moment
this duplicates some code, but will be cleaned up with a follow up
change.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3335
8 years ago
Martin Gräßlin 4783e45ab7 [libkwineffects] Remove EffectsHandler::registerPropertyType
Summary:
There is no effect using this method. As it's X11 specific it should be
removed.

Internally the EffectsHandlerImpl still requires the method. Thus it's
moved into the private part.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3297
8 years ago
Martin Gräßlin 40ad7ef4e9 [effects] Improve interaction between Glide and SlidingPopups effect
Summary:
The glide effect tried to not animate any window the SlidingPopups
effect animates. But it detected that in a very crude way. It announced
the KDE_SLIDE atom and checked for windows having that property set.

This has a few disadvantages:
* KWindowEffects::isEffectAvailable gets confused as an effect announces
  support for SlidingPopups which doesn't provide SlidingPopups
* The approach can only work for X11 windows
* The approach causes X11 usage in the ctor

With this change the GlideEffect implements a slot for
EffectsHandler::windowDataChanged to detect that the SlidingPopupsEffect
grabbed the window. The X11 atom interaction is removed.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3296
8 years ago
Martin Gräßlin 9e4a858285 Fix DebugConsole::initGLTab
The initGLTab used GLPlatform::instance to determine whether OpenGL is
used. It assumed a nullptr would mean no GL. But GLPlatform is a
singleton which does not follow KWin's internal semantics. If there is
no instance it will be created. Thus it's never null.

This caused a heap-buffer-overflow as recorded by build.kde.org in case
one just casts the scene pointer to SceneOpenGL.

With this change this is fixed and inited correctly by verifying through
the EffectsHandler whether opengl is used.
8 years ago
Martin Gräßlin 52cf47ff53 Port KillWindow to X11EventFilter
Summary:
Removes the special handling from events.cpp for KillWindow. The same
functionality can be provided through the X11EventFilter.

This is a preparation step for moving the interactive window selection
into the Platform and to support KillWindow also for Wayland.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3362
8 years ago
Martin Gräßlin 9f976a4b8d Support multiple event types in X11EventFilter
Summary:
So far the X11EventFilter only supported one event type. But most
usecases for an X11EventFilter require to support multiple event types.
E.g. a filter listens for both key press and key release.

This change extends the internal X11EventFilter to support multiple
types and Workspace::workspaceEvent makes use of that.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3361
8 years ago
Martin Gräßlin 730fd05f58 Move querying glx extensions into the platform plugin
Summary:
Glx extensions are only interesting to the glxbackend. Given that
querying can be moved there.

In order to simplify the extensions can be stored in the OpenGLBackend
which also provides the convenience check as before.

The egl platforms should also be adjusted to query in that way and
remove it from the kwinglutils.

There is still a usage of the glxextensions inside kwinglutils to
resolve one function. That should also be moved into the platform.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3332
8 years ago
Martin Gräßlin 5d39da8427 Move glx version check functionality to platform plugin
Summary:
Glx version is only required once in the standalone x11 platform. No
need to have that in the shared kwinglutils library.

Removes one xlib usage from shared kwin.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3329
8 years ago
Martin Gräßlin 3041b871ea [libkwineffects] Delete EffectsHandler::deleteRootProperty
Summary:
The method is not used by any Effect and is X11 specific, thus better
remove it for good.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3298
8 years ago
Marco Martin c304c0a69c add connector name to screen model
Summary:
to uniquely identify screens (in QScreen::name()) add the conenctor
name and id (such as HDMI-A-1) to the model identification

Test Plan: tested a full plasma session

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: graesslin, plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3341
8 years ago
Martin Gräßlin cef03c2b9e Drop dead Xlib code from KillWindow
Still had an Xevent handler.
8 years ago
Martin Gräßlin c0b2e5dc8b VirtualDesktopGrid operates on VirtualDesktop objects
Summary:
The VirtualDesktopGrid is ported to the new VirtualDesktop objects. The
grid consists now of QVector<VirtualDesktop*> rows and a QVector of
those rows.

This change requires to adjust the code using the VirtualDesktopGrid.
This mostly affects VirtualDesktopManger. The methods for toLeft, above,
next, etc are now all operating on VirtualDesktop with the uint variants
- if still present - only delegating to the new method. The Functor
objects are also adjusted, though mostly still providing the old API for
compatibility.

In KWin core only one now ambiguous call is adjusted (useractions) and
the desktop grid usage in EffectsHandlerImpl is adjusted. Other usages
are not yet adjusted and need porting to fully get rid of the old
uint-based API.

Test Plan: VD test still passes

Reviewers: #kwin, #plasma_on_wayland, hein

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3327
8 years ago
Martin Gräßlin 75ab998de8 [effects] Clean up saving of DesktopGrid config
Summary:
The DesktopNameAlignment was once set through the kcfg generated file
and once manually. We don't need the manual double save.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3340
8 years ago
Martin Gräßlin a8fa1626eb [effects] Drop loading shadow config from MagicLamp
Summary:
This has basically been dead code for ages. The Shadow effect got
dropped in an early 4.x version. We shouldn't transform the window based
on old shadow values, so completely removed.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3339
8 years ago
Martin Gräßlin 2b93939a67 [effects] Save zoom settings using kcfg generated class
Summary:
We have the kcfg generated settings object, so no need to manually write
the config save code for zoom and magnifier effect.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3338
8 years ago
David Edmundson 1776b5f927 Convert virtual backend to per screen rendering
Summary:
Output scaling can't ever work on a single buffer; especially if they're
different scales and overlapping.

This ports the virtual backend to perScreenRendering so that I can use
it for
tests.

ctest fails here, but it fails on the tests that it failed on before..

Reviewers: #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3306
8 years ago
Martin Gräßlin 4f4d9d5cfe Introduce a VirtualDesktop class
Summary:
This is the first change for a larger virtual desktop refactoring. So
far for X11 virtual desktops are just a number. The current virtual
desktop is a number between 1 and the count of virtual desktops.

Similar a Toplevel is on the virtual desktop by setting the number as a
property.

In the long run we want to change that and allow to have windows on
multiple virtual desktops and also support virtual desktops on Wayland.
On Wayland a virtual desktop will be an object.

As a first step a VirtualDesktop class is introduced which currently is
just a glorifed wrapper around the x11 desktop number. The
VirtualDesktopManager now holds a pointer to the current desktop and the
available desktops are a QVector of VirtualDesktops. The implicit
mapping to counting of desktops is removed. Though the internal API is
still completely count based. In follow up changes this will be turned
into being more and more VirtualDesktop based. At least the Core should
be completely transferred to be VirtualDesktop based instead of uint
based.

Test Plan:
virtual desktop auto test still passes (test coverage 97 % line,
83 % conditionals)

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3290
8 years ago