652 Commits (204a05fef82eede2fb2d79ec051668a1f42886cc)

Author SHA1 Message Date
Jonathan Riddell c308565424 Update version number for 5.14.90
GIT_SILENT
6 years ago
Jonathan Riddell 05109e4b39 bump KF5 dependency to required 5.54 as agreed at start of Plasma 5.15 cycle 6 years ago
Volker Krause 3bb07ef12d Bring FindFontconfig.cmake up to ECM standards
Summary:
This is a preparation step to move this to ECM (or possibly CMake),
which makes sense now that qtbase is using this too (for Qt6).

Reviewers: #build_system, cgiboudeaux

Reviewed By: cgiboudeaux

Subscribers: cgiboudeaux, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17547
6 years ago
Martin Flöser 070b46f455 Hide mouse cursor when interacting with touch screen
Summary:
On touch events the mouse cursor gets hidden, on next mouse event the
mouse cursor is shown again. This IMHO significantly improves the system
interaction if touch is the primary user interface.

Test Plan: Test case added and ctest passes

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17280
6 years ago
David Edmundson 5da8b4c78a Explicitly link and disable kcrash on kwin_wayland
Summary:
Kwin tried to not use kcrash by not linking against it.

KIO now links against KCrash as we link against KIO we indirectly link
against KCrash and thus now link and launch kcrash on wayland. This
breaks coredump.

Arguably it should be fixed in KIO, but it's non-trivial.

The advantage of this approach is it allows us to enable drkonqi for
nested mode in the future, or make a non-gui drkonqi that just saves
logs.

Test Plan: Compiles

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: zzag, romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16834
6 years ago
Frederik Gladhorn 66986d4afd Make QPA think the tabbox is the active window
Summary:
Without pretendingn to activate the Window, Qt will not send
the right signals for accessibility, thus screen readers not working.

Reviewers: kwin, davidedmundson

Reviewed By: davidedmundson

Subscribers: graesslin, davidedmundson

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16664
6 years ago
David Edmundson 7e8facc3fd [wayland] Use the new plasma virtual desktop protocol
Summary:
implement virtual desktop support for Wayland.
use the new virtual desktop protocol from D12820
The VirtualDesktopManager class needed some big change in order
to accomodate it, which is where most changes are.
Other than that, it's mostly connections to wire up
VirtualDesktopsManager and VirtualDesktopsManagement(the wayland protocol impl)

Depends on D12820
Other notable detail, is the client visibility updated to reflect the presence
of the client in the plasmavirtualdesktop.
(and the unSetDesktop concept)

Test Plan: used a bit a plasma session together with D12820, D13748 and D13746

Reviewers: #plasma, #kwin, graesslin, davidedmundson

Reviewed By: #plasma, #kwin, davidedmundson

Subscribers: hein, zzag, davidedmundson, kwin

Tags: #kwin

Maniphest Tasks: T4457

Differential Revision: https://phabricator.kde.org/D13887
6 years ago
Jonathan Riddell 263100b0c2 Update version number for 5.14.80
GIT_SILENT
6 years ago
Jonathan Riddell 232d2ae24d Update version number for 5.14.0
GIT_SILENT
6 years ago
Jonathan Riddell 9ebb7978de Update version number for 5.14.80
GIT_SILENT
6 years ago
Jonathan Riddell 84cd9cfc43 Update version number for 5.13.90
GIT_SILENT
6 years ago
Jonathan Riddell f92d806343 QT_MIN_VERSIONS is Qt 5.11 for Plasma 5.14. Agreed at kickoff meeting. Set everywhere for clearity and consistency. 6 years ago
Roman Gilg 3482378278 Introduce OutputScreens class
Summary:
Lift high-level properties into new Screens child class for platform plugins
using the Output class.

Directly make DrmScreens a child class of OutputScreens.

Test Plan: Manually and auto tests with 94%.

Reviewers: #kwin

Differential Revision: https://phabricator.kde.org/D11782
6 years ago
Roman Gilg fe63e21f80 Introduce generic Output class
Summary:
In order to separate high-level properties of individual outputs from
hardware-specific ones and access these, introduce a new generic class Output.

Also make the DrmOutput class directly a child class of this generic class.

The long-term goal is to get rid of the Screens global object on Wayland and
instead directly work with Output objects on compositing level.

This should enable us long-term to do direct scanout to hardware planes, what
I predict needs this generic output representation at one point.

Test Plan: Manually.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D11781
6 years ago
Yuri Chornoivan bf58da3e9a Fix minor EBN issues 6 years ago
Vlad Zagorodniy 4299b81f65 [effects] Drop the Scale in effect
Summary:
It's superseded by the new scale effect(D13461).

Existing users of this effect will be migrated to the new scale effect.

Depends on D13461

Reviewers: #kwin, #plasma, #vdg, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13462
6 years ago
René J.V. Bertin df802d49a1 Require KDecoration >= 5.13.0 .
Differential Revision: https://phabricator.kde.org/D14320
6 years ago
Vlad Zagorodniy 54b69bec44 Honor BUILD_TESTING
Test Plan:
* Passed `BUILD_TESTING=OFF` option to cmake, no tests have been built;
* Didn't pass `BUILD_TESTING` option, all tests have been built.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13163
6 years ago
Jonathan Riddell e868f9c50e Update version number for 5.13.80
GIT_SILENT
6 years ago
Jonathan Riddell 0550fc383c Update version number for 5.13.90
GIT_SILENT
6 years ago
Jonathan Riddell d4a825a9cc Update version number for 5.14.80
GIT_SILENT
6 years ago
Jonathan Riddell 57178b2b98 Update version number for 5.12.90
GIT_SILENT
6 years ago
Martin Flöser bbf00fdd98 Require libinput and udev
Summary:
The main reason for not having it as a mandatory dependency was that BSD
doesn't support it. But as I learned recently it is available on our CI
system. So BSDs have support now.

Even more it showed that the code doesn't compile if the dependency is
missing. And there's one thing I hate: broken build configuration
options.

So let's make UDEV and libinput a required dependency and get rid of the
problems.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10057
7 years ago
Martin Flöser 4cc1d7a245 Require libinput version 1.9
Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D9930
7 years ago
Jonathan Riddell a3d43459ec Update version number for 5.12.80
GIT_SILENT
7 years ago
Jonathan Riddell 9b74583565 Update version number for 5.11.95
GIT_SILENT
7 years ago
Martin Flöser 0d0a9ebe9a Require frameworks 5.42 7 years ago
Marco Martin 1be5256b1b A basic TabletModeManager
Summary:
depends from D9521

listens to switch events and updates the tablet mode status
which is exposed to dbus in the org.kde.KWin.TabletModeManager
interface

Test Plan:
as hardware support is limited, testing of clients
so far is done by the setter in the dbus property,
which should be removed from the final version.
It has been tested to successfully work on a Thinkpad.

Reviewers: #plasma, #kwin, graesslin

Reviewed By: #plasma, #kwin, graesslin

Subscribers: graesslin, davidedmundson, plasma-devel, kwin, #kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D9764
7 years ago
Bhushan Shah 913d6cca47 Fix cmake call
VERSION_GREATER_EQUAL is not available for cmake version we depend on
7 years ago
Martin Flöser ac2f41c86d [libinput] Add support for switch devices and events
Summary:
This change adds support for the switch devices introduces with libinput
1.7 (lid) and 1.9 (tablet mode). So far it's not yet used internally in
KWin, but only exposed through the Device and Events.

As KWin currently only requires libinput 1.5 and we are rather late in
the release cycle the new functionality is ifdef'ed. The requirement
will be raised once master is 5.13. It is already available on
build.kde.org, but e.g. Neon only has 1.6.

The switch events are interesting as they report whether the lid is
closed (might be interesting for e.g. powerdevil) and whether a
convertible is in tablet mode (supported for e.g. Lenovo Yogas with
recent kernel). This can be used by KWin internally to enable/disable
the virtual keyboard. And can be exposed globally to switch to Plasma
Mobile shell in future.

Test Plan:
Only through test case as my Lenovo Yoga uses Neon which has a
too old libinput

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D9516
7 years ago
Martin Flöser e0b1a5715b Add DBus interface to OrientationSensor and a persistent configuration
Summary:
The initial state for user enabled is now read from config. In addition
a DBus interface is provided exporting this property. This allows
KScreen to determine whether automatic screen rotation is available and
whether the user has it enabled or not.

Furthermore KScreen can change the property and this gets stored into
the configuration. Thus KScreen can offer a user interface to
enable/disable automatic screen rotation as well as enabling/disabling
the manual rotation based on the current user settings.

Test Plan:
Not yet tested, coded on the system which doesn't have an
orientation sensor

Reviewers: #kwin, #plasma, sebas, davidedmundson

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8738
7 years ago
Roman Gilg 82d2860469 [colorcorrection] Night Color - blue light filter at nighttime
With Wayland KWin needs to provide certain services, which were provided
before that by the Xserver. One of these is gamma correction, which includes
the - by many people beloved - functionality to reduce the blue light at
nighttime. This patch provides the KWin part of that. It is self contained,
but in the end will work in tandem with a lib in Plasma Workspace and a KCM
in Plasma Desktop, which can be used to configure Night Color.

* Three modi:
** Automatic: The location and sun timings are determined automatically
   (location data updates will be provided by the workspace)
** Location: The sun timings are determined by fixed location data
** Timings: The sun timings are set manually by the user
* Color temperature value changes are smoothly applied:
** Configuration changes, which lead to other current values are changed
   in a quick way over a few seconds
** Changes on sunrise and sunset are applied slowly over the course of few
   minutes till several hours depending on the configuration
* The current color value is set immediately at startup or after suspend
  phases and VT switches. There is no flickering.
* All configuration is done via a DBus interface, changed values are tested
  on correctness and applied atomically
* Self contained mechanism, speaks directly to the hardware by setting the
  gamma ramps on the CRTC
* Currently working on DRM backend, extensible to other platform backends in
  the future
* The code is written in a way to make the classes later easily extendable to
  also provide normal color correction, as it's currently done by KGamma on X

Test Plan:
Manually with the workspace parts and added integration tests in KWin using
the virtual backend.

BUG:371494

Reviewers: #kwin, graesslin

Subscribers: kwin, plasma-devel, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5928
7 years ago
Martin Flöser fe9664fd84 Use the new ECMQMLModules to specify all of KWin's runtime dependencies
Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7273
7 years ago
Martin Flöser ff2e883469 Add support for new IdleInhibition protocol
Summary:
A small helper class is added which manages inhibiting idle for the
ShellClients. So far only very basic functionality is added. That is
only the inhibition on the Surface is followed. It is not yet checked
whether the ShellClient is visible at all. That needs some changes in
ShellClient.

BUG: 385956
FIXED-IN: 5.12

Test Plan: New test case passes

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8856
7 years ago
Martin Flöser 1c61e61119 [autotests] Support new way to run the tests without need to install
Summary:
KWin was quite good in ensuring that you don't need to install by
passing paths to the tests. The new way is much nicer, so code is
adjusted for the new way. Also if we require a newer ECM in future we
need to support the new way.

No guarantee that the tests don't pick something up from the system env,
that needs more testing.

References: https://community.kde.org/Guidelines_and_HOWTOs/Making_apps_run_uninstalled

Test Plan: The tests which loaded helpers pass

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7543
7 years ago
Martin Flöser 9df1744830 Support automatic screen rotation based on orientation sensor
Summary:
This change introduces an OrientationSensor class which wraps a
QOrientationSensor. The OrientationSensor is hold by Screens and gets
enabled if Screens knows about an internal (e.g. LVDS) display which
supports rotation. In addition the OrientationSensor holds an KSni to
enable/disable the automatic rotation support.

The drm platform plugin is adjusted to make use of the OrientationSensor.
The API is defined in a way that this can also be implemented on other
platforms supporting rotation. Most important are hwcomposer and X11
standalone. The latter should be straight forward as rotation is provided
through XRandR. The former needs addition for rotation support first.

Test Plan: Rotated my Yoga 12

Reviewers: #kwin, #plasma, sebas

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D8699
7 years ago
David Edmundson e7b183f886 Load QtQuick settings
Summary:
Loads settings on whether QtQuick uses GL or software rendering

Aurorae needed a fix. The rest "just works" with up-to-date plasma framework.

Test Plan:
Alt tabbed
Showed an OSD
Grepped kwin's QML for any custom shaders.
(which is the only part that doesn't work here)

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: graesslin, plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8040
7 years ago
Martin Flöser a5b17b2228 Require Qt 5.9
Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8331
7 years ago
Martin Flöser 8c2b2faf9d Add DBus protocol to virtual keyboard
Summary:
This change adds a DBus API to query whether the virtual keyboard is
currently enabled and provides DBus methods to request that the virtual
keyboard gets enabled/disabled. This is useful for e.g. providing a
Plasmoid or for convertables where the tablet mode needs to be enabled.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8166
7 years ago
Martin Flöser 7ef8409157 Move X11-only specific part of EffectsHandlerImpl to x11 platform plugin
Summary:
The Platform API is extended by a call to create the EffectsHandler. In
X11 standalone Platform a new EffectsHandlerImplX11 is added which
contains the X11 only parts of the EffectsHandler, such as grabbing the
X keyboard and the X11 mouse interception window.

The EffectsHandlerImpl gains some virtual methods for the parts which
are now done in the X11 specific implementation. In return we get rid of
lots of if-else structures checking for the operation mode.

Test Plan: Only compile tested.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7955
7 years ago
Martin Flöser f448691f54 Correct installation of kwin_wayland when DESTDIR and libcap are used together
Based on patch for kinit: D8064.
7 years ago
Martin Flöser 65fcde7426 Honor DESTDIR env variable in setcap command 7 years ago
Martin Flöser 8ae37c420b Move SceneOpenGL into a dedicated plugin
Summary:
Unfortunately a rather large change which required more refactoring than
initially expected. The main problem was that some parts needed to go
into platformsupport so that the platform plugins can link them. Due to
the rather monolithic nature of scene_opengl.h a few changes were
required:
* SceneOpenGL::Texture -> SceneOpenGLTexture
* SceneOpenGL::TexturePrivate -> SceneOpenGLTexturePrivate
* texture based code into dedicated files
* SwapProfiler code into dedicated files
* SwapProfiler only used in x11 variants
* Safety checks for OpenGL scene moved into the new plugin
* signal declared in SceneOpenGL moved to Scene, so that we don't need
to include SceneOpenGL in composite

Test Plan: Nested OpenGL compositor works

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7740
7 years ago
Martin Flöser cea7a189c8 Create a dedicated X11EventFilter for the events used by RootInfo
Summary:
Splitting out the handling from events.cpp and moves it into a
dedicated class created together with RootInfo.

Test Plan:
Test case for NET window move which goes through this
code path still passes.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7808
7 years ago
Martin Flöser 7c8003f7f6 Use real-time scheduling policy for kwin_wayland
Summary:
The base idea behind this change is to keep the system responsive no
matter what other processes do. All input and rendering needs to go
through the windowing system, so keeping it responsive is important.

Currently KWin competes with all other processes for resources and this
can render the system unusable. Consider some processes running amok. In
this case the user might not be able to easily close the applications as
KWin does not get the cpu time to perform the input tasks requested by
the user.

Or in the case of playing a demanding game it is important that KWin
gets scheduled to forward the pointer input events. The user doesn't
want that the game (or another process) wins against the windowing
sytem.

The disadvantage is that KWin always wins against other processes with
real time scheduling. This could result in KWin running amok stalling
the system. On the other hand this is no change to the current situation
as if KWin runs amok the sytem is unusable.

The change uses libcap to set CAP_SYS_NICE on kwin_wayland executable.
KWin_wayland on start sets the scheduling policy to SCHED_RR with the
lowest possible priority. Thus any other SCHED_RR process will win
against KWin. So real time processes are not affected by this change!

After adjusting the scheduling (which requires CAP_SYS_NICE) KWin drops
this capability again.

Test Plan:
Verified that KWin adjusts the scheduler, that it is not passed
to child processes, that the capability gets dropped and not passed to
child processes.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7757
7 years ago
Martin Flöser 0ed609590b Add a dedicated X11EventFilter for forwarding property events to the effect system
Summary:
So far both Workspace and Toplevel emitted signals for every property
notify event on the root window and the respective Toplevel windows. The
signals were only used in EffectsHandlerImpl to forward to the effect
system in case the property which changed is registered by an effect.

This change introduces a dedicated event filter for this which is only
created in EffectsHandlerImpl in case an X11 connection is available. It
supports a restart of the X11 system.

The signals used so far are removed from Workspace and Toplevel.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7853
7 years ago
Martin Flöser 551a6246a8 Move XRenderUtils init/cleanup into X11 standalone platform
Summary:
Only needed for kwin_x11 variant (required for the non-composited
Outline). As that's nowadays in the x11 platform, we can move the
complete XRenderUtils support into the platform. Thus KWin core does
no longer require to link it.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7760
7 years ago
Martin Flöser 0c6fdeef2d Split out the X11 mouse event filtering for EffectsHandlerImpl
Summary:
This change introduces a dedicated X11EventFilter for the mouse
interception on X11. The filter gets created together with the start
of mouse interception and destroyed again when the mouse interception
ends. Thus we don't need to check for each event like it was the case
so far.

Unfortunately the existing methods cannot be removed (yet) as they are
still used by TabBox. Needs investigation whether this is actually
needed.

Test Plan: Xephyr+kwin_x11+Present Windows

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7842
7 years ago
Jonathan Riddell c623db087a Update version number for 5.11.90
GIT_SILENT
7 years ago
Jonathan Riddell 48b6001ec4 Update version number for 5.10.95
GIT_SILENT
7 years ago