The anonymous variant of qmlRegisterType() is deprecated in Qt5 and
gone in Qt6.
This however now requires us to specify a module URI and major version
number. I used the names and (lowest) versions used already for other
types nearby where available, and fell back to "org.kde.kwin" and 0
otherwise.
In conjunction with a buffer format with alpha channel this allows
to have KWin's backdrop transparent to see through to a display
layer below.
Signed-off-by: Eike Hein <eike.hein@mbition.io>
The tablet mode code checks whether we are currently in tablet mode
based on whether or not we have a touch screen and a pointer. For some
devices, a touch screen or pointer device may be detected but we would
like to ignore it, since it incorrectly influences the tablet mode.
This reads the udev tag "kwin_ignore_tabletmode" from libinput devices
and will skip devices with that tag when trying to determine whether we
are in tablet mode or not.
ScreenLockerWatcher was written whislt overthinking DBus.
An interface does not have to have the same lifespan as the service the
other end. DBus connections works in terms of established "match rules",
these can be set up before a service is created the other side and they
remain if a service closes. The only part that needs doing is re-fetch
any cached properties.
There's also need to check the intial service names at startup. We can
just let our call to GetActive fail. It's far faster.
This class was getting convoluted in both ifdefs and Qt6 porting all to
solve something that isn't real.
There should be no behavioural differences.
It was added to work around Xwayland crashing at startup due to a mesa
issue, see commit 58fa92e40b.
It's been almost 6 years since that change. No other major wayland
compositor forces EGL_PLATFORM, so lets remove the workaround.
The main motivation behind this change is to get rid of code that's not
straightforward and should be unnecessary in general.
These are two conceptually different tasks that were intertwined.
On it's own it doesn't accomplish anything but is an important refactor
for longer term goals, namely:
- moving xwayland into kwin_wayland_wrapper with our wayland restart
handling support
- having multiple X connections
Behaviour should be the same.
support realtime activation for screenedges gestures, making it possible
for effects to show half-triggered states while dragging from
the edge with a finger, making them much more usable
In 52bc46069e, some code was shuffled
around to improve code readability. However, it was overlooked that
spa_meta_bitmap->offset is initialized too late, after QImage dest is
constructed. That's the reason why the left edge of the cursor is
wrapped around horizontally.
This change fixes the cursor glitch by ensuring that
spa_meta_bitmap->offset is initialized to proper value before getting
pointer to bitmap data. While on this, this change also moves
spa_meta_bitmap initialization code around to make spa_meta_bitmap setup
look less like a bowl of spaghetti, i.e. spa_meta_bitmap is initialized
first, and QImage dest is created with spa_meta_bitmap's values.
Virtual machines aren't properly supporting atomic mode setting yet, which
causes the cursor to be offset, and will cause more issues with overlay
planes. In order to prevent that from impacting users, fall back to legacy,
unless KWIN_DRM_NO_AMS is set.
BUG: 427060
FIXED-IN: 5.24.4
Some effects (AnimationEffect) transform windows without setting
PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS flag. Make the scene disable
render optimizations if that's the case.
Whether AnimationEffect does a right thing is up to debate.
Window painting is no longer split in two phases - PAINT_WINDOW_OPAQUE
and PAINT_WINDOW_TRANSLUCENT.
PAINT_WINDOW_TRANSLUCENT is used as a hint to the occlusion culling
logic to ignore the opaque region.
Given that, the handling of the opaque region can be simplified. If no
effect sets the PAINT_WINDOW_TRANSLUCENT flag, then the opaque region
can be used as is.
It's not possible to get the surface damage before calling
Scene::paint(), which is a big problem because it blocks proper surface
damage and buffer damage calculation when walking render layer tree.
This change reworks the scene compositing stages to allow getting the
next surface damage before calling Scene::paint().
The main challenge is that the effects can expand the surface damage. We
have to call prePaintWindow() and prePaintScreen() before actually
starting painting. However, prePaintWindow() is called after starting
rendering.
This change makes Scene call prePaintWindow() and prePaintScreen() so
it's possible to know the surface damage beforehand. Unfortunately, it's
also a breaking change. Some fullscreen effects will have to adapt to
the new Scene paint order. Paint hooks will be invoked in the following
order:
* prePaintScreen() once per frame
* prePaintWindow() once per frame
* paintScreen() can be called multiple times
* paintWindow() can be called as many times as paintScreen()
* postPaintWindow() once per frame
* postPaintScreen() once per frame
After walking the render layer tree, the Compositor will poke the render
backend for the back buffer repair region and combine it with the
surface damage to get the buffer damage, which can be passed to the
render backend (in order to optimize performance with tiled gpus) and
Scene::paint(), which will determine what parts of the scene have to
repainted based on the buffer damage.
They still aren't realtime animated, but by making them respond to the
realtimeGesture() call, they can use callbacks to determine if they should be shown
or not. This allows you to swipe up, have it trigger, then swipe down in the same
motion and get it to untrigger without ever having to release.
Fixed a bunch of bugs and polished the slide effect.
Plugged the slide effect into the new VirtualDesktopManager interface desktopChanging() to allow for mac os style desktop switching.
BUG: 448419 BUG: 401479
Hard to avoid as long as we don't have CI coverage yet, but that will take
a bit more time, we need KWin (and all its dependencies) to fully build
first.
The raspberry pi exposes opaque formats for the cursor plane, and interprets
them as being opaque as well... Considering that we effectively don't support
anything else with the QPainter anyways, just hardcode ARGB8888 until we paint
the cursor with OpenGl.
This reverts commit ca7fc44814.
Reverting work with no explanation is unacceptable, especially when
you've already been asked to stop multiple times.
CWG has already been contacted regarding this conduct, which is
starting to seem like vandalism of KDE's codebase. I am CCing sysadmins
and officially recommending an emergency recovation of commit access
for uhhadd@gmail.com to prevent further abusive behavior.
CCMAIL: uhhadd@gmail.com
CCMAIL: sysadmin@kde.org
This reverts commit 154528cdef.
This commit was reverted with no explanation, context, or discussion. In
the future, please discuss things like this before doing them. KWin is a
community project, not a personal playground.
CCMAIL: uhhadd@gmail.com
KColorScheme::createApplicationPalette is quite expensive and DecorationPalette::palette is called quite a lot
Cache the result and only update when needed
This fixes a bug introduced in https://invent.kde.org/plasma/kwin/-/merge_requests/2045 where it would no longer check if it should redraw the whole region unless the data clip intersected. This would lead to flickering in certain cases
BUG: 421135