Summary:
When one uses:
* breeze as of 5.12
* wobbly windows
* shaded window
* a distribution building with assert enabled
and starts to move a shaded window, KWin asserts. The root cause for
this is that WindowQuad::makeSubQuad has an assert for y1 being smaller
than y2. With the combination listed above this is not guaranteed. For
the left shadow quad the y1 and y2 are identical and thus trying to
split it, results in the assert condition.
The problem of the shadow quad having an invalid size might be addressed
as well with D10811. Due to that the generation of the quads is not
touched. Instead a sanity check is introduced to not try to split
already invalid sized quads.
BUG: 390953
FIXED-IN: 5.12.3
Test Plan: Added unit test hit the assert, now doesn't hit it any more
Reviewers: #kwin, #plasma
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D11015
Summary:
The renderer string does not contain "Gallium 0.4 on" anymore,
instead it directly contains the gallium driver's name.
So assume that every unknown renderer is a gallium driver.
Test Plan: Added a testcase, it succeeds only with this patch.
Reviewers: #plasma, graesslin
Subscribers: kwin, plasma-devel, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D9495
This code path is executed a lot during animations (e.g. maximize, minimize).
Saves creating a temporary QVector.
Differential Revision: https://phabricator.kde.org/D9082
Summary: Fixes the build with D8705
Test Plan: Just adds includes, I wonder if it should go into Plasma/5.8 and /5.11 too
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: graesslin, plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D8706
Summary: D8479 fixes viewport for real hardware, but there is still problem with screenshots. This patch fixes that.
Test Plan:
- Have three monitors (like in bug 385655)
- Press PrtSc and then Enter
- Screenshot is ok
Before:
{F5450056}
After:
{F5450058}
Reviewers: #kwin, #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel, kwin, #kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D8485
Summary:
glScissor works on window co-ordinates. i.e not scaled by the viewport
We need to multiply by the scale there.
This fixes a minor visual glitch in animations when using hardware
clipping.
Test Plan:
Hardcoded my minimise animation to be really slow.
Now every frame looks perfect
Reviewers: #kwin
Subscribers: kpiwowarski, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D8490
The FreeBSD build is currently failing with:
kwingltexture_p.h:83:23: error: no function named 'cleanupGL' with type
'void ()' was found in the specified scope
friend void KWin::cleanupGL();
This change hopefully addresses the problem.
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
Summary:
Several effects announce a support property atom on the root window. This
change forwards the KWin::Application's signal that the xcbConnection
changed to the EffectsHandler so that the effects can respond to it.
All effects which announce a support property connect to this new signal
and re-announce the property. In case the xcb connection died (future
XWayland crashing case) it is set to XCB_ATOM_NONE by that. In case the
xcb connection got created (future delayed XWayland startup) the atom is
set to the proper value.
In addition all usages of the support properties are guarded, so that no
nonesense actions are performed if the support property is XCB_ATOM_NONE.
Test Plan: Only compile tested as we don't have XFree KWin yet
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7761
Actually they could go directly as nothing in KWin uses them anymore.
But there are more functions in kwinglobal which need to go as they
don't support restarting XWayland. So instead of breaking internal ABI
several times, just deprecate till everything is prepared.
Summary:
The GL_CONTEXT_LOST flag is not reset when calling glGetError. This of
course bites with: "Thus, glGetError should always be called in a loop,
until it returns GL_NO_ERROR, if all error flags are to be reset."
(see https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetError.xhtml)
As KWin calls checkGLError from init call it can result in a freeze of
KWin. This is a regression reported multiple times since the release of
5.10.3 which enabled GLX_NV_robustness_video_memory_purge extension.
Please note that I am not able to test this change. I do not have an
NVIDIA card and are not hiting the problem. I have no way to simulate
the code. I do not know whether the change will fix the problem, it is
based on what others do. Inspiration for this change is mostly from
mutter: https://git.gnome.org/browse/mutter/commit/?id=d4d2bf0f6c1737256b921c4f1dedd3a95138cab9
BUG: 381870
FIXED-IN: 5.10.3.1
Test Plan: See above, I can only compile check the change
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6464
Summary:
We are getting reports about the shader self test failing in a false
positive way on Mesa 17. We already have such false positve results
for NVIDIA quadro and went with disabling the self test.
Most likely our self test has a problem or the rendering of the first
frame has a problem. But disabling compositing because our rendering of
the first frame is broken, is too much.
Let's better be pro user here and disable the shader self test till we
fixed the root problem.
BUG: 376801
FIXED-IN: 5.10.4
Test Plan: It compiles.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6426
Summary:
The backend is responsible for setting the viewport, the GLRenderTarget
should save and restore the viewport actually set by the backend.
Test Plan:
Ran Blur effect which uses this method, under scaling the viewport "restored"
differed from the one set by the backend.
Reviewers: #plasma
Subscribers: plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D4952
Summary:
This method already translates to s_virtualScreenGeometry as the source
co-ordinates are in compostior space we should take scaling into account here too.
This method already supports resizing if source and target sizes do not match.
Calling funcitons can either double the size of the target if they want native resolution
or leave as-is if they want the result in standard DPI.
This implements scaling in the screenshot, magnifier and simple blur effect.
Test Plan:
Tested screenshot effect using spectacle.
I hit an (unrelated, was reproducible on master) crash whilst using this, so it is not fully tested
Ran magnifier effect manually
Reviewers: #plasma
Subscribers: plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D4951
Summary:
GLRenderTarget already stores the translation from global compositor
space to the render target co-ordinates, we also need a scale factor for
the exact same reasons.
Test Plan: Used in various effects after this patch and it works there.
Reviewers: #plasma
Subscribers: plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D4948
Summary:
There are a few places where KWin needs to read values from kcminputrc.
As I need to add yet another one it makes more sense to properly
structure it like in other cases and have only one kcminputrc hold in
the application. This also allows to better mock the config values in
the integration tests.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5540
Summary:
By changing all kcfg to have arg="true" we can pass in the same
KSharedConfigPtr into all effects. This allows to have fake config in
the tests and in the planned effect demo mode.
Also it means that we don't have to hardcode the name kwinrc into the
files. In the configs - where we cannot access the effectshandler - we
use the define KWIN_CONFIG which gets generated based on the compile
time arguments.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3571
Summary:
This is implemented through QActions following the general approach
inside KWin and not the older approach used by ScreenEdges for pointer
callback activation.
Test Plan: Extended auto test
Reviewers: #kwin, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5263
When an application is not responding, its window is desaturated to communicate this.
Also "(Not Responding)" is added to the title bar.
Differential Revision: https://phabricator.kde.org/D5245
Summary:
WindowVertex contains the x position and also the relative texture x position
Our textures are scaled bigger than kwin's resolution, so this makes sure we set the right
texture position.
Otherwise our final array ends up using 0 to 0.5 of the texture, not 0 to 1.
Test Plan:
Opened some 2x windows, on a 1x output.
It looked how it should do, instead of it being double the size and cropped
Tested some things that use quads, like wobbly windows
Reviewers: #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3502
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
Summary:
This change adds support for marking the OnScreenMessage as it should
skip close animation. The screenshot effect is adjusted to use the
on screen message instead of the custom effect frame.
Test Plan: Message window is not captured when taking screenshot
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D4091
Summary:
This adds support for the new on-screen-message support to the
kwineffects API and makes use of it in the colorpicker effect.
Not yet added to screenshot effect as for that we need support for
skip close animation on the on-screen-message window.
Reviewers: #plasma, #kwin
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3803
Summary:
The default constructor shouldn't have been used anyway, but better safe
than sorry.
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3453
Summary:
A second interactive selection mode gets added to select a position on
the screen. This is handled by the same input event filter as for the
window selection. Just that instead of returning a window, it returns a
QPoint.
This allows to pick a point on the screen which we need to screenshot
the screen under the mouse cursor and in future for color picking.
The screenshot effect provides two new dbus methods to (interactively)
select a screen or fullscreen. This allows spectacle to screenshot the
(full) screen with still having the user in control.
Reviewers: #kwin, #plasma_on_wayland, bgupta
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D3475
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
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
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
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
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
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
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
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
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
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
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
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