Summary:
By moving the functionality into the Platform API we can also implement
support on other platforms which support this in general (e.g. DRM once
Roman's color adjustment patches landed).
Reviewers: #kwin, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D7447
Summary:
Not needed except for X11/non-composited usage, so should be in the
plugin instead of core.
Platform API is extended to create a decoration renderer.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7444
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
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
Summary:
Creating the OutlineVisual is moved into the Platform API. The default
implementation creates the composited OutlineVisual. The X11 standalone
platform overrides it and creates the non composited outline in case no
compositing is used.
Test Plan:
Run kwin_x11 with KWIN_COMPOSE=N and KWIN_COMPOSE=X,
non composited outline and composited outline loaded
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7450
Summary:
This change splits out the X11 specific event filtering into a dedicated
X11EventFilter. It is created in the x11 standalone platform plugin when
the first Edge is being created.
Some of the X11 specific code is removed from ScreenEdges, though more
refactoring is possible in ScreenEdges to share more code between X11
specific and generic implementation.
Test Plan: Run KWin on Xephyr, screen edge approach effect still shows
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7406
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
Summary:
Based on the work of 3f4995fb9b this change
introduces a GlxContextAttributeBuilder to make the requesting of context
attributes cleaner, more verbose and less error prone copy and paste.
Test Plan:
Switched between Core and legacy and verified the output;
extended auto test
Reviewers: #kwin, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D6411
Summary:
The OverlayWindowX11 also inherits from X11EventFilter and performs
the filtering itself.
Test Plan: Compiles, not yet tested as I'm on Wayland
Reviewers: #kwin, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D7197
Summary:
The overlay window is only needed for the X11 based compositors. Given
that it is better suited in the X11 platform. Unfortunately it is not
possible to completely move it into the platform plugin as it is still
referenced in KWin core (e.g. SceneXRender). Due to that the
OverlayWindow in KWin core is turned into a pure virtual class with the
implementation being moved into the plugin.
The platform API gains a new virtual factory method which is only
implemented in the X11 platform.
Test Plan: Compiles
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7193
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
Summary:
Weird NVIDIA behavior fixup part 2. Now that we do no longer freeze when
NVIDIA decides to create an OpenGL error on startup
(aefb5f4dd9), we experience a new issue.
KWin is terminating (no idea why, [1]) and at the same time the OpenGL freeze
protection thread is still running. So far we did not terminate the
thread on shutdown and thus we hit an abort in Qt.
This change ensures that we properly terminate the thread on shutdown.
[1] My current theory is that games terminate KWin, common pattern of
bug reports is "steam".
BUG: 382283
FIXED-IN: 5.10.4
Test Plan:
Tortured KWin by making sure I go through the code path,
saw the abort without the patch, no more abort with the patch
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6735
Summary:
There is a regression in WindowBasedEdge::soStopApproaching. Due to
only operate when the edge activates for pointer it is possible that
the cursor polling stays active. Explaining the situation:
1. Activate switch desktop when moving window
2. Start moving a window
3. Move mouse into the approach geometry
-> doStartApproaching activates as we are moving a window
4. stop moving window
-> doStopApproaching early exits as the position does not activate for
pointer any more - we are not moving a window
-> cursor polling is still connected and whenever mouse enters edge
approaching is started
The analysis shows that the check whether activates for pointer is wrong
in the case of stop approaching. If the edge started to approach, we also
need to stop approaching.
This change addresses the problem by turning the check into whether the
connection for cursor position update is set.
This is the third bug fix to the X11 screen edge handling after
introducing touch screen edges. This needs more manual testing by
everybody in the Plasma team who is still using X11.
BUG: 381849
FIXED-IN: 5.10.4
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6467
Summary:
Mismatch in the major/minor version. Requesting 1.2 doesn't make any
sense given that KWin requires 2.1.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6401
Summary:
There was a regression introduced with bug fix eec6afe6 which added
a for pointer events only check also to doUpdateBlocking. Do to that
the edge blocking mechanism didn't work for touch edges.
BUG: 380476
FIXED-IN: 5.10.3
Test Plan:
verified with xwininfo that there is no longer a window when
in full screen. Activated edges through touch and pointer
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6304
Summary:
Based on earlier phab-request D2079. Adds the nvidia memory purge
extension to the robust context creation.
BUG: 344326
FIXED-IN: 5.10.3
Test Plan: Only compile tested as I don't have an NVIDIA card.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6344
Summary:
To have touch events working we need to do memory layout changes on the
xcb events. This is fine for identifying the touch events which should
trigger the screen edge. But when passed on to Qt to have QtQuick windows
(e.g. Alt+Tab) handle the touch events, this results in a problem:
Qt itself does also the memory movement and then the movement is double
and touch events break.
To prevent this problem an RAII class is added which moves the memory in
the ctor and moves it back in the dtor. So during KWin's processing it
has the right memory layout and later on in Qt's processing it has the
proper "wrong" layout which Qt can fix again.
Test Plan: Touch events in Alt+Tab work
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5549
Summary:
Another regression from enabling touch support on X11.
The approach window for pointer input gets unmapped as soon as the mouse
enters the window. This ensures that mouse motion events are not stolen
from other applications. But with the touch events we did not even react
on the enter event if it's not activated for pointer. The result was an
area around the screenedge being blocked for pointer input.
This change only creates and maps the approach window if the edge is
activated for pointer input.
BUG: 378951
Test Plan:
Activated edges through pointer and touch, reconfigured and tested
motion events
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5528
Summary:
Grabbing the touch events seems to cause issues. It seems to also grab
pointer events from touchpad and breaks touch input on other events.
Also testing shows that we don't need it and get touch ownership events
for our screenedge windows reported.
BUG: 378951
Test Plan: Triggered touch screen edge, normal system usage on X11
Reviewers: #plasma, #kwin
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5520
Summary:
In theory we shouldn't need to scale input, however when in windowed
mode
we need to convert the host into output normal.
Reviewers: #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3496
Summary:
Provides a virtual method in Screens where backends can supply the scale
of each screen, this is then set on each output.
For the X windowed backend this value is taken from a command line
parameter.
Test Plan:
Ran windowed mode with --scale 1 and 2
then kate --platform=wayland from another screen.
On the latter case UI elements were scaled up correctly
Reviewers: #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3159
Summary:
This change extends the XInputEventFilter to also listen for all touch
events on the root window.
The touch points are passed to the new gesture recognizer in screenedges.
Please note that I'm not using X11 and have hardly tested this change in
real world. To our X11 users with touch screen support: please test!
Test Plan: Can activate and deactivate the screenedge.
Reviewers: #plasma, #kwin
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5137
Summary:
Each Edge creates a SwipeGesture for touch activation. The swipe needs to
be a single finger starting from the edge into the screen for at least
20 %. The SwipeGesture and GestureRecognizer is extended to support the
use cases of the touch screen edge swipe.
New features supported by the gesture system are:
* minimum and maximum position
* a minimum delta for the swipe
* progress signal based on the minimum delta
* starting a swipe with a start point
The Edge has the progress signal connected to its approach signal, thus
visual feedback is provided through the screen edge effect.
The screen edge system supports touch only for the edges (corners are
too difficult to activate on touch screens). At the moment the following
features are supported:
* screen edge show/raise of windows (e.g. auto hidden panels)
* trigger the configured action
* trigger the configured callback function (e.g. script)
In future it might make sense to add a touch specific configuration
action to support different actions for screen edges activated by mouse
and touch.
BUG: 370323
Test Plan:
configured a screen edge and triggered through touch,
added an auto-hiding panel and triggered through touch
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D5106
Summary:
The functionality regarding triggering modifier only shortcuts is moved
out of Xkb - where it doesn't belong to - and is turned into an input
event spy listening for the changes it is interested in. Previously
the state got queried by asking e.g. for the pressed buttons, now it's
tracked directly.
The X11 side needs a larger change due to that as now pushing the events
into Xkb does not trigger modifier only shortcuts any more. Instead the
"normal" way through the platform API needs to be used which triggers the
processing of filters and spies.
The problem here is that our redirections only process events if they are
inited and that only happens on Wayland. We cannot call init on them as
that would create all the Wayland filters and spies and processing would
probably break. As an intermediate solution the spies are now processed
and there we know that it won't matter. A future solution would be to
remove the init checks completely and just send through both filters and
spies and ensure that on X11 only the supported ones are loaded.
Closes T5220
Test Plan: Tested on Wayland and X11
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Maniphest Tasks: T5220
Differential Revision: https://phabricator.kde.org/D4578
Summary:
InputRedirection has a workaround to add a connect on a QAction which
is used for a global shortcut. This is specific to the X11 platform as
the xtime needs to be updated.
This change adds a new virtual method to the Platform and moves the
implementation into the X11 standalone platform. Thus it does no longer
gets called on Wayland.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D4168
Summary:
It's only needed by the GLX backend, so only find if we have GLX at all
and only link where needed. As it was handled incorrectly before, it's
now using proper ifdef.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3448