Summary: It works for the effect
Test Plan:
kcmshell5 kcm_kwin_effects
Change some settings, the "Restore defaults" button is enabled when the state is not the default state.
Open an effect configuration, the "Restore defaults" button is enabled when the settings are not default.
Reviewers: #kwin, crossi, ervin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D26040
Summary: Same as on Windows 10, very useful when you use virtual desktops.
Test Plan: Have 2 or more virtual desktops and use the new shortcut.
Reviewers: #kwin, #plasma, #vdg, romangg, ngraham, davidedmundson
Reviewed By: #kwin, #plasma, #vdg, ngraham, davidedmundson
Subscribers: davidedmundson, thiagosueto, ngraham, romangg, zzag, #vdg, #plasma, kwin, #kwin
Tags: #kwin
Maniphest Tasks: T11520
Differential Revision: https://phabricator.kde.org/D24281
Summary:
I could never reproduce the crash, but we know from gdb that it's from
the decorationSettings object
We are setting the same QObject instance as a context property in
multiple contexts at once. This is already slightly odd especially from the POV of
Qt's internal property cache.
Given we want one object to be exposed to all contexts, we can expose it
to the parent context only once and achieve the same result in a simpler
way.
BUG: 411166
Test Plan:
Verified opening and closing system settings still worked for me.
I could never reproduce the original crash.
Reviewers: #kwin, ngraham
Reviewed By: ngraham
Subscribers: ngraham, apol, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25913
Summary: Print the Qt::Key value on the debug window
Test Plan: When I press the power button I get Key_PowerOff
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: romangg, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25896
This reverts commit 1747e497e4.
Unfortunately, this patch causes fall apart effect to override sliding
popups effect, which we really don't want to do.
Summary:
The buffer shape is in buffer-local coordinates and must be mapped to
window coordinates. After that, we are free to map it to the global screen
coordinates.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25733
Summary:
If the XRender scene has cross-faded a window, then, eventually, KWin/X11 will
crash in the destructor of the XRenderPictureData class during tear down with
the following message in the terminal
```
ASSERT: "qApp" in file /home/vlad/Workspace/KDE/src/kde/workspace/kwin/libkwineffects/kwinxrenderutils.cpp, line 163
```
The crash happens because X11StandalonePlatform attempts to clean up XRender
resources, including XRenderUtils::s_blendPicture, after the application object
has been destroyed.
In order to fix the crash, we have to destroy the platform object before the
destructor of QCoreApplication is executed.
Test Plan:
- Enable maximize effect
- Maximize a window
- Replace the current instance of KWin/X11 with another one
Without this patch, KWin/X11 crashes after the third step.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25768
Summary:
Activate intel swap events by default if available. They were hidden behind an
environmental variable because of some critical release blocking issue years
ago.
Manual testing indicates that there are no issues anymore with this extension.
Since it allows us to use swap events with MESA drivers for optimized repaints
enable swap events by default again.
For now leave a modified environment variable to switch back to using no swap
events easily.
CCBUG: 342582
Test Plan: i915
Reviewers: #kwin
Subscribers: zzag, broulik, kwin
Tags: #kwin
Maniphest Tasks: T11071
Differential Revision: https://phabricator.kde.org/D25300
Summary:
When swap events are available do not delay the next repaint by one frame
through the composite timer but directly repaint on swap event.
Test Plan: i915
Reviewers: #kwin
Subscribers: davidedmundson, zzag
Maniphest Tasks: T11071
Differential Revision: https://phabricator.kde.org/D25299
Summary:
Add a small getter to query information internally if the backend supports
swap events. Defaults to true as it is the default in the GBM Wayland backend.
Test Plan: i915
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Maniphest Tasks: T11071
Differential Revision: https://phabricator.kde.org/D25298
When initializing a property we loop through the drmModeObjectProperties
object and search for the property by its name.
Once found we create the Property object and there should be not another one
with the same name afterwards. In any case we would leak memory. Therefore just
directly return once the property was found.
This gives us the added benefit that we can put out a warning in case the
property was not found in the loop, what should not happen with the properties
we use.
This is just a code cosmetic change to have the same values internally like the
kernel for the type enum. In the logic there should not be a difference since
the enum values are mapped at runtime.
Summary:
This cleans up some of the code, moves and deletes superfluous functions,
improves in-code docs and runtime warnings.
Test Plan: On vt.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25867
Summary:
According to Gl 3.2 (page 501) and 4.5 (page 204) specs the initial state of
the default framebuffer is already BACK. Therefore we do not need to set it
explicitly.
When we draw in the future to alternative framebuffers which do not have back
buffers this call is fatal.
Test Plan: No tearing on Wayland, tearing as before on X11.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25868
Summary: Use a kcfg file to specify virtual desktops settings saved to kwinrc.
Test Plan:
kcmshell5 kcm_kwin_virtualdesktops
Change something, check apply buttons works appropriately
Save the settings and relaunch the kcm, the new settings are taken loaded correctly
Reviewers: #kwin, ervin
Reviewed By: ervin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25871
Summary:
At the moment, the state of wayland of getting such events isn't all
that clear. There's a zwp_tablet protocol that isn't stable yet and more
importantly isn't supported by Qt just yet.
Have it move and click the mouse about for now.
Depends on D25663 and D25763
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: romangg, zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25764
Summary: This way we can reverse-lookup if we ever want the opposite information.
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25763
Summary:
This includes support for them on libinput and turns it into fake
pointer actions.
This doesn't implement zwp_tablet, this will have to happen in an
iteration later.
Test Plan:
Been playing around with it, see video.
https://www.youtube.com/watch?v=GF1WbO8FVvU
Reviewers: #plasma, #kwin, romangg
Reviewed By: #plasma, #kwin, romangg
Subscribers: zzag, davidedmundson, romangg, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25663
Summary:
startupfeedback is a special case, rather than loading our own config we
load settings from klaunchrc.
In order to reload this means leaking kwin specific calls into the
launch feedback KCM. Using the new KConfigWatcher syntax, we can use a
generic solution for all this code.
Test Plan:
Changed the value in KCM
Opened dolphin
cursor did the right thing
Reviewers: zzag
Reviewed By: zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25834
Summary:
This is a small overhaul of the EglGbmBackend. Functions are restructured,
white space added and variables renamed for better readability and style
aligned with Frameworks Coding Style.
Test Plan: Session starts.
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25830
Summary:
Currently the fall apart effect doesn't work in conjuction with window
open/close animation effects, e.g. scale. The reason for that is those
effects grab windows before the fall apart effect.
Test Plan:
* Enable the fall apart effect and the scale effect;
* Close a window.
(without this patch the window doesn't fall apart)
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: ngraham, davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D19723
Summary: The new name better reflects what Toplevel::geom is.
Test Plan: Compiles, tests still pass.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25738
Summary:
The frame geometry doesn't necessarily correspond to the server-side
geometry of the toplevel window, we need to use the buffer geometry
instead.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25730
Summary:
This change makes geometry updates in the X11Client class simpler and
also fixes a bug in the move() method.
Test Plan: All tests pass.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25710
Summary:
This makes it possible to detect these changes via KConfigWatcher.
This is needed for D25670
Reviewers: #kwin, ngraham, davidedmundson
Reviewed By: #kwin, ngraham, davidedmundson
Subscribers: ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25695
This reverts commit 9151bb7b9e.
This reverts commit ac4dce1c20.
This reverts commit 754b72d155.
In order to make the fix work, we need to redirect the client window
instead of the frame window. However, we cannot to do that because
Xwayland expects the toplevel window(in our case, the frame window)
to be redirected.
Another solution to the texture bleeding issue must be found.
CCBUG: 257566
CCBUG: 360549
Summary:
Quite long time ago, window decorations were painted on real X11 windows.
The nicest thing about that approach is that we get both contents of the
client and the frame window at the same time. However, somewhere around
KDE 4.2 - 4.3 times, decoration rendering architecture had been changed
to what we have now.
I've mentioned the previous decoration rendering design because it didn't
have a problem that the new design has, namely the texture bleeding issue.
In the name of better performance, opengl scene puts all decoration parts
to an atlas. This is totally reasonable, however we must be super cautious
about things such as the GL_LINEAR filter.
The GL_LINEAR filter may need to sample a couple of neighboring texels
in order to produce the final texel value. However, since all decoration
parts now live in a single texture, we have to make sure that we don't
sample texels that belong to another decoration part.
This patch fixes the texture bleeding problem by padding each individual
decoration part in the atlas. There is another solution for this problem
though. We could render a window into an offscreen texture and then map
that texture on the transformed window geometry. This would work well and
we definitely need an offscreen rendering path in the opengl scene,
however it's not feasible at the moment since we need to break the window
quads API. Also, it would be great to have as less as possible stuff going
on between invocation of Scene::Window::performPaint() and getting the
corresponding pixel data on the screen.
There is a good chance that the new padding stuff may make you vomit. If
it does so, I'm all ears for the suggestions how to make the code more
nicer.
BUG: 257566
BUG: 360549
CCBUG: 412573
FIXED-IN: 5.18.0
Reviewers: #kwin
Subscribers: fredrik, kwin, fvogt
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25611
Summary:
Since KDE 4.2 - 4.3 times, KWin doesn't paint window decorations on real
X11 windows, except when compositing is turned off. This leaves us with
a problem. The actual client contents is inside a larger texture with no
useful pixel data around it. This and decoration texture bleeding are
the main factors that contribute to 1px gap between the server-side
decoration and client contents with effects such as wobbly windows, and
zoom.
Another problem with naming frame pixmap instead of client pixmap is
that it doesn't quite go along with wayland. It only makes more difficult
to abstract window quad generation in the scene.
Since we don't actually need the frame window when compositing is on,
there is nothing that holds us from redirecting client windows instead
of frame windows. This will help us to fix the texture bleeding issue
and also help us with the ongoing redesign of the scene.
Test Plan: X11 clients are still composited.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25610
Summary:
Small intermediate refactor. For now just do the normal rotation when a flipped
transform is requested. In the future we might want to provide the possibility
to flip the output image.
Test Plan: Compiles
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25649
Summary:
This change updates the copyright statement and adds a few folks who are
considered to be kwin maintainers.
Test Plan: Compiles.
Reviewers: davidedmundson, romangg
Reviewed By: davidedmundson, romangg
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25646
Summary:
We leak memory if we do not destroy the dmabuf implementation on EGL backend
going down.
Also this makes sure everything is cleaned up on shutdown.
FIXED-IN: 5.17.4
BUG: 413637
Test Plan: Compiles, settings change and shutdown ok.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D25577