- 30 Sep, 2017 1 commit
-
-
Martin Flöser authored
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
-
- 29 Sep, 2017 1 commit
-
-
Martin Flöser authored
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
-
- 25 Sep, 2017 1 commit
-
-
Martin Flöser authored
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
-
- 22 Sep, 2017 1 commit
-
-
Martin Flöser authored
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
-
- 16 Sep, 2017 1 commit
-
-
Martin Flöser authored
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
-
- 14 Sep, 2017 1 commit
-
-
Jonathan Riddell authored
GIT_SILENT
-
- 13 Sep, 2017 1 commit
-
-
Jonathan Riddell authored
GIT_SILENT
-
- 12 Sep, 2017 1 commit
-
-
Heiko Becker authored
Summary: CXX_STANDARD is only available since 3.1. $ git show 913394af2: cmTarget: Add CXX_STANDARD and CXX_EXTENSION... $ git tag --contains 913394af2 | head -n: v3.1.0 3.1 also has CMakePackageConfigHelpers (available since 3.0), allowing to drop ECMPackageConfigHelpers (it actually fixes a CMake warning when requiring >=3.0). Furthermore move cmake_minimum_required(VERSION 3.1 FATAL_ERROR) to the top of CMakeLists.txt like suggested by CMake's documentation. Test Plan: cmake .. & ninja Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D7784
-
- 01 Sep, 2017 4 commits
-
-
Martin Flöser authored
This change is similar to D7232 and moves the scene_qpainter into a dedicated plugin. Compared to the XRender case it's more complicated as the platform plugins need to implement a platform specific backend. The base implementation for this part used to be in scene_qpainter. As the idea is to completly move it away from KWin core it would be point less to still have the backend definition in KWin core, but it cannot be in the scene plugin as otherwise all platforms need to link the plugin. To solve this a new platformsupport subdirectory is added which contains the scene platform backend as a static library. For the OpenGL scene such a static library will also be required. Test Plan: SceneQPainter test still passes, nested compositor still works Reviewers: #kwin, #plasma Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D7259
-
Martin Flöser authored
Summary: First step for loading the compositor Scenes through plugins. The general idea is that we currently needlessly pull in all the Scenes although only one will be used. E.g. on X11 we pull in QPainter, although they are not compatible. On Wayland we pull in XRender although they are not compatible. Furthermore our current Scene creation strategy is not really fault tolerant and can create situations where we don't get a compositor. E.g on fbdev backend the default settings won't work as it does not support OpenGL. Long term I want to tackle those conceptional problems together: we try to load all plugins supported by the current platform till we have a scene which works. Thus on Wayland we don't end up in a situation where we don't have a working compositor because the configuration is bad. To make this possible the switch statement in the Scene needs to go and needs to be replaced by a for loop iterating over all the available scenes on the platform. If we go there it makes sense to replace it directly with a plugin based approach. So this is a change which tackles the problem by first introducing the plugin loading. The xrender based scene (as it's the most simple one) is moved into a plugin. It is first tried to find a scene plugin and only if there is none the existing code is used. Test Plan: Tested all scenes Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D7232
-
Martin Flöser authored
Summary: This ensures that the X11 specific events are only read on X11 but not on Wayland. Also moves quite some X11 specific code out of TabBox. Test Plan: Compile checked, currently on Wayland, so no way to test. Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D7395
-
Martin Flöser authored
Summary: Splits out the X11 specific window movement handling so that it's not used in the Wayland case at runtime. As a nice side effect it un-spaghetties the X11 event handler. Test Plan: Run nested KWin on Xephyr and nested KWin/Wayland to verify that move/resize of X11 windows is still working Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D7374
-
- 24 Aug, 2017 1 commit
-
-
Martin Flöser authored
Summary: KWin::updateXTime only delegates into the platform API where the method is a no-op. The actual implementation is moved into the X11 standalone platform as it uses QX11Info which is non functional except on the X11 standalone platform. This change exposes a problem with timestamp handling: on Wayland the X11 timestamp does not get updated at all, causing e.g. window sync not work correctly (c.f. bug 374881). We cannot implement the updating in the same way as QX11Info/Qt xcb platform does it as that would introduce a blocking roundtrip to XWayland which is dangerous. As a side-effect this change removes linking to Qt5::X11Extras in kwin core as it's no longer needed. Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D7515
-
- 21 Aug, 2017 1 commit
-
-
Martin Flöser authored
Summary: The KWindowSystem call which we used doesn't work on Wayland as it's only implemented in the xcb variant and cannot be made available for Wayland in an easy way as it is still XLib based. This change turns the optional XCB-ICCCM dependency in a required one and thus can use the functionality provided by said library to implement what KWindowSystem provided. BUG: 382789 Test Plan: New test case which failed with old code Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D7046
-
- 19 Aug, 2017 1 commit
-
-
Martin Flöser authored
Summary: Workspace monitors the X11 events to detect when the user first interacts with the system. This is only required on X11 for activating the same client from previous session. So far this was spread over many parts in the long event switch statement. To make this more contained a dedicated event filter is introduced which also gets deleted again once the first user interaction got recognized. Test Plan: Compiles Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D7371
-
- 31 Jul, 2017 1 commit
-
-
Martin Flöser authored
-
- 30 Jul, 2017 1 commit
-
-
Martin Flöser authored
Unfortunately 9ada8bac failed to compile on FreeBSD due to the header not existing. So we need to check the existance and properly guard with ifdef.
-
- 28 Jul, 2017 1 commit
-
-
Martin Flöser authored
This is a totally stupid warning for an older code base such as KWin. It generates hundreds of warnings as on legacy code no method uses override. The output is totally spammed, so it's better to disable it. This will hopefully also prevent that someone tries to fix it again by changing all of KWin - which we don't want.
-
- 24 Jul, 2017 1 commit
-
-
Tobias C. Berner authored
Summary: Only build * `virtual_terminal.cpp` in the presence of `linux/vt.h` * `fbdev`-backend in the precense of `linux/fb.h` Test Plan: Reviewers: #kwin, #freebsd, graesslin, bcooksley Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D6847
-
- 18 Jul, 2017 1 commit
-
-
Jonathan Riddell authored
GIT_SILENT
-
- 17 Jul, 2017 1 commit
-
-
Martin Flöser authored
Summary: KWin already used C++14 constructs in a conditional way. This doesn't make much sense today, it's better to just require C++14. For KWin only gcc and clang are currently compilers of relevance. Gcc supports C++14 since version 5 and defaults to C++14 since 6.1 [1]. Clang supports C++14 since version 3.4 [2]. An overview of compiler support in various distributions: * Debian stable (stretch): gcc 6.3, clang 3.8 * Debian oldstable (jessie): 4.9, clang 3.5 * Ubuntu 17.04: gcc 6.1, clang 3.8 * Ubuntu 16.04: gcc 5.3, clang 3.8 * openSUSE Tumbleweed: gcc 7.1, clang 4.0 * openSUSE Leap 42.3: gcc ?, clang ? [3] * FreeBSD: clang >= 34 in ports * Slackware 14.2: gcc 5.3 This overview shows that every distro out there has at least one supported compiler which can still compile KWin with this change. [1] https://gcc.gnu.org/projects/cxx-status.html#cxx14 [2] https://clang.llvm.org/cxx_status [3] Sorry I fail to understand openSUSE's package repository. It seems that there is gcc 7 available, but gcc package is 4.8 Test Plan: Compiles on my neon system Reviewers: #plasma Subscribers: plasma-devel, kwin, #kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D6634
-
- 27 Jun, 2017 1 commit
-
-
Jonathan Riddell authored
GIT_SILENT
-
- 26 Jun, 2017 1 commit
-
-
Martin Flöser authored
Summary: The current way to specify the OpenGL context attributes does no longer scale as can be seen in D6344. There are too many different context attribute sets and with every addition we grow lots of copied code. The chances to introduce errors in that code which is difficult to debug are very high. As can be seen in the glx backend which defines major 1, minor 2, but it should be major 2, minor 1. This change reworks this code by creating a builder class which contains only an abstract definition of what needs to be in the attributes. E.g. the version, whether it's robust and so on. Now we can just have a list of possible attributes in a well described way: auto builder; builder.setVersion(3, 1); builder.setRobust(true); All possible builders are added to a list and operated on in a for loop which tries to creat a context. Once it succeeded it breaks the list. In addition a debug statement is added which prints out the set of options which went into the context. So far this is only done for EGL, GLX can follow once D6344 is merged. Test Plan: New unit test added, kwin_wayland OpenGL tests run and verified Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D6396
-
- 13 Jun, 2017 1 commit
-
-
Jonathan Riddell authored
GIT_SILENT
-
- 12 Jun, 2017 1 commit
-
-
Jonathan Riddell authored
-
- 06 Jun, 2017 1 commit
-
-
Jonathan Riddell authored
GIT_SILENT
-
- 25 May, 2017 1 commit
-
-
Jonathan Riddell authored
GIT_SILENT
-
- 11 May, 2017 1 commit
-
-
Jonathan Riddell authored
GIT_SILENT
-
- 08 May, 2017 1 commit
-
-
David Edmundson authored
-
- 05 May, 2017 1 commit
-
-
Martin Flöser authored
Summary: Normally the xclipboardsyncer should terminate because the socket becomes unusable. But we have reports of it not really going down and running amok. In order to prevent such situations this change registers SIGTERM to be sent to xclipboardsyncer when the parent process (that is kwin_wayland) dies in whatever way. This ensures that xclipboardsyncer cannot become an orphan. BUG: 371862 Test Plan: Only compile tested, no way to get into the problematic situation Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D5589
-
- 01 May, 2017 1 commit
-
-
David Edmundson authored
-
- 25 Apr, 2017 1 commit
-
-
Jonathan Riddell authored
GIT_SILENT
-
- 22 Apr, 2017 1 commit
-
-
Martin Flöser authored
Summary: This change introduces the initial support for keyboard layout switching policies like in the X11 session. This first change only adds support for Global and Virtual Desktop policy. This means the current layout is stored in context to the current virtual desktop. Whenever one changes the virtual desktop the previous layout is restored. If the user has not yet navigated to this virtual desktop a switch to default layout is performed. This is the first code interacting with the new Virtual Desktop API which is not based on integer ids. To fully support this the API is slightly extended. Test Plan: Added test case Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D5301
-
- 07 Apr, 2017 1 commit
-
-
Martin Flöser authored
Summary: So far KWin did not properly handle popup windows. That is when a popup surface got created and a click outside the surface happened KWin did not send out the popupDone Wayland event. This change makes KWin aware of whether a surface is a popup and tracks through a new PopupInputFilter whether there are popup windows. In case there are popups the new filter waits for mouse press events and cancels the popups if the press does not happen on any surface belonging to the same client. To quote the relevant section of the Wayland documentation: The popup grab continues until the window is destroyed or a mouse button is pressed in any other client's window. A click in any of the client's surfaces is reported as normal, however, clicks in other clients' surfaces will be discarded and trigger the callback. So far the support is still incomplete. Not yet implemented are: * support xdg_shell popup windows * verifying whether the popup is allowe...
-
- 27 Mar, 2017 1 commit
-
-
Martin Flöser authored
Summary: This change adds global touchpad swipe gestures to the GlobalShortcutsManager and hooks up the swipe gestures as defined at the Plasma Affenfels sprint: * swipe up: Desktop Grid * swipe down: Present Windows * swipe left: previous virtual desktop * swipe right: next virtual desktop The main work is handled by two new classes: SwipeGesture and GestureRecognizer. This is implemented in a way that it can be extended to also recognize touch screen gestures and pinch gestures. The SwipeGesture defines what is required for the gesture to trigger. Currently this includes the minimum and maximum number of fingers participating in the gesture and the direction. The gesture gets registered in the GestureRecognizer. The events for the gesture are fed into the GestureRecognizer. It evaluates which gestures could trigger and tracks them for every update of the gesture. In the process of the gesture tracking the GestureRecognizer emits signals on the Gesture: * started: when the Gesture gets considered for a sequence * cancelled: the Gesture no longer matches the sequence * triggered: the sequence ended and the Gesture still matches The remaining changes are related to hook up the existing shortcut framework with the new touchpad gestures. The GlobalShortcutManager gained support for it, InputRedirection and EffectsHandler offer methods to register a QAction. VirtualDesktopManager, PresentWindows and DesktopGrid are adjusted to support the gesture. Reviewers: #kwin, #plasma_on_wayland Subscribers: plasma-devel Tags: #plasma_on_wayland Differential Revision: https://phabricator.kde.org/D5097
-
- 21 Mar, 2017 1 commit
-
-
Jonathan Riddell authored
GIT_SILENT
-
- 28 Feb, 2017 1 commit
-
-
Jonathan Riddell authored
GIT_SILENT
-
- 21 Feb, 2017 1 commit
-
-
Jonathan Riddell authored
GIT_SILENT
-
- 17 Feb, 2017 2 commits
-
-
Martin Flöser authored
-
Martin Flöser authored
Summary: So far KWin put a version requirement on Breeze which is the current version number of KWin. This is technically correct, but distributions seem to have problems with it. E.g. I noticed twice in Debian testing that kwin defaults to Plastik which happens when Breeze is not found. I reported it, it got fixed, now it's again broken. Thus I think that distributions have problems with the requirement of building Breeze prior to KWin. As KWin does not depend on the minor version, let's depend only on the actual required version, which is 5.8 in the 5.8 branch, 5.9 in the 5.9 branch and master. Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D4644
-