24006 Commits (3ec9414ace9cadbac001f80f19086c766928a546)
 

Author SHA1 Message Date
Ismael Asensio 76ac4be316 kcms/tabbox: Make shortcuts config save on apply
Currently, tabbox shortcuts are directly saved to KGlobalAccel
when they change, which is inconsistent with the rest of the
KCM and leads to confusion regarding Defaults and isSaveNeeded
status.

Let's instead manage the changes internally and just save them
to KGlobalAccel on Apply/Save.

m_actionsCollection is only used as a helpful way to store this
internal configuration, and doesn't really needs saving to
or restoring from config.

BUG: 459325
FIXED-IN: 5.27
2 years ago
Vlad Zahorodnii 9b0758ea71 autotests: Remove weird qwait in pointer input test 2 years ago
Vlad Zahorodnii 7a8bb01323 autotests: Make testStruts quicker
As far as I can tell, there's no reason to add an artificial delay of
50ms, which repeated 100 times accumulates to 5 seconds.
2 years ago
Vlad Zahorodnii 1c3610413d autotests: Make testPlasmaWindow quicker
Before

    Executed in   10.79 secs    fish           external
       usr time    4.85 secs  918.00 micros    4.85 secs
       sys time    0.62 secs  119.00 micros    0.62 secs

After

    Executed in    1.45 secs      fish           external
       usr time  941.63 millis  486.00 micros  941.14 millis
       sys time  578.99 millis   62.00 micros  578.93 millis
2 years ago
Vlad Zahorodnii 9751aca548 autotests: Make testNoGlobalShortcuts quicker 2 years ago
Vlad Zahorodnii f04ad754ce autotests: Make testX11Window quicker
Before

    Executed in   17.39 secs      fish           external
       usr time  422.91 millis    1.92 millis  420.99 millis
       sys time  586.41 millis    0.22 millis  586.19 millis

After

    Executed in    1.23 secs      fish           external
       usr time  395.63 millis    0.00 millis  395.63 millis
       sys time  228.55 millis    2.13 millis  226.42 millis
2 years ago
Vlad Zahorodnii e689ab5ebd autotests: Make testSlidingPopups quicker
The test waits longer than needed to determine whether effects stopped
playing animations

Before

    Executed in   22.41 secs      fish           external
       usr time  997.42 millis  722.00 micros  996.70 millis
       sys time  744.81 millis   79.00 micros  744.73 millis

After

    Executed in    9.71 secs      fish           external
       usr time  894.42 millis    1.03 millis  893.38 millis
       sys time  689.80 millis    0.11 millis  689.69 millis
2 years ago
l10n daemon script 3a6986b855 GIT_SILENT Sync po/docbooks with svn 2 years ago
l10n daemon script b3776cef5b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2 years ago
Vlad Zahorodnii 773d8c61b1 autotests: Reduce execution time of testLockScreen
testLockScreen uses !eventSpy.wait() expression to check whether the
given signal is emitted. QSignalSpy::wait()'s default timeout is 5s,
which is too much. We don't need to wait that much, in fact, even
wl_display_sync() would suffice. In either case, let's pass explicit
timeout of 10ms which should be good enough.

Before

    Executed in   60.49 secs    fish           external
       usr time    3.92 secs    1.03 millis    3.92 secs
       sys time    2.29 secs    0.16 millis    2.29 secs

After

    Executed in   19.38 secs    fish           external
       usr time    1.64 secs  347.00 micros    1.64 secs
       sys time    1.15 secs   54.00 micros    1.15 secs
2 years ago
Vlad Zahorodnii fe1054a52a autotests: Fix a typo in testKeyboardShortcutsInhibitorInterface
We need to monitor whether the inhibitorActive signal gets emitted. It
reduces the test's execution time from about 5 seconds to a couple
milliseconds.
2 years ago
Xaver Hugl b4e8d44967 remove some macros with questionable usefulness 2 years ago
Nate Graham d312ee24b8 effects: always use Title Case for user-facing effect titles
Most already did, but these three did not, creating inconsistency.

BUG: 464122
FIXED-IN: 5.27
2 years ago
Aleix Pol ddd60a0c1b backgroundcontrast: Guard against calling a nullptr
There are cases where GLVertexBuffer::map will return null (as seen in
kwinglutils.cpp:1816) which does happen (as seen in the backtrace of bug
462017)
Make sure we don't call the null map in that case.

BUG: 372305
2 years ago
ivan tkachenko ea61a6f63a
effects/magiclamp: Fix window suddenly disappearing when reversing minimize animation
In this branch a new animation is being started, so a ref-guard needs
to be the same as in the similar branch for starting minimize animation
in the slot above.
2 years ago
ivan tkachenko f4c3ae7c20
effects/magiclamp: Fix code style (add {braces} about `if` body) 2 years ago
Vlad Zahorodnii 301e57169d backends/drm: Fix surface and buffer damage order in qpainter output layers
The prototype of OutputLayer::endFrame() looks as follows

    virtual bool endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion) = 0;

On the other hand, qpainter output layers use a different order in the
header file and the cpp file.
2 years ago
Vlad Zahorodnii 91bef430bf backends/virtual: Move glFlush() to endFrame()
It makes more sense in endFrame() rather than present().
2 years ago
Vlad Zahorodnii ff53950a6d backends/virtual: Drop KWIN_WAYLAND_VIRTUAL_SCREENSHOTS
Virtual backend is used primarily by tests, there are plans to use it
for virtual outputs too. But in either case we don't need screenshots.

I also can't imagine how it can be useful as a debugging tool. It's more
convenient to spin a windowed kwin instance.

The main motivation behind this change is to get rid of custom code in
virtual output layers and simplify it a bit more.
2 years ago
l10n daemon script ae1ca8ec9d GIT_SILENT Sync po/docbooks with svn 2 years ago
Kai Uwe Broulik af99b4e98c backends/x11: Present surface even with empty damage
All the other backends present their surface regardless.
If the surface isn't presented, the scheduled frame is never
finished, and rendering gets stuck indefinitely.

This is also consistent with x11 standalone backend
which forgoes this check.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2 years ago
Vlad Zahorodnii 0bd4851326 effects: Fix projection matrix logic in OffscreenEffect
WindowPaintData contains two projection matrices -
screenProjectionMatrix and projectionMatrix. I'm not sure why we have
two.

screenProjectionMatrix is initialized by the scene. While
projectionMatrix is usually updated by the effects. The two are not in
sync.

On the other hand, OffscreenEffect takes into account only
screenProjectionMatrix. It means that if a window is transformed by two
offscreen effects, the final result is going to be broken because
an OffscreenEffect must use the projection matrix specified by another
OffscreenEffect, which it doesn't.

This change cleans up projection matrix properties in WindowPaintData,
so there's only one projection matrix property. With that, offscreen
effects can be properly nested.

BUG: 462876
2 years ago
l10n daemon script 4c738b4961 GIT_SILENT Sync po/docbooks with svn 2 years ago
Nate Graham 0075f7bd16 Use more user-friendly terminology for border actions everywhere
The window rules KCM calls this "No titlebar and frame", but different
less user-friendly terminology is used for the context menu action and
the global action. Let's unify them using the more user-friendly name.

BUG: 464007
FIXED-IN: 5.27
2 years ago
Niklas Stephanblome 1f1e67f90b effects/overview: Correct size of active virtual desktop highlight outline
The focus outline that highlights the active virtual desktop in the Overview effect, as
well as the half-transparent outlines that are around the other virtual desktops, cover
2 pixels on every side of every virtual desktop thumbnail.

This is because an invisible rectangle is used that has the same size as the thumbnail
and has a colored border, but borders are always drawn on the inside of QML rectangles,
so content in the thumbnail is covered up. Therefore, the width of the rectangle has to
be slightly adjusted to account for the thickness of the border.

BUG: 450963
FIXED-IN: 5.27
2 years ago
Han Young 612099a31d add more debugging information to CONTRIBUTING.md
Something nice to have for the first time contributors (like me). So we don't have to bug people on matrix about how to debug :)
2 years ago
l10n daemon script 3697f1afee GIT_SILENT Sync po/docbooks with svn 2 years ago
l10n daemon script 2f8e2ef689 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2 years ago
l10n daemon script 0a438a6661 GIT_SILENT Sync po/docbooks with svn 2 years ago
Xaver Hugl 2525109f1a window: use std::unique_ptr to manage the windowitem 2 years ago
Xaver Hugl 797bcb8bda window: use std::unique_ptr to manage the effectwindow 2 years ago
Xaver Hugl 3c8d2d6f18 window: use std::unique_ptr to manage the shadow 2 years ago
Weng Xuetian 6e87fae7f7 Support XKB_CONTEXT_NO_SECURE_GETENV flag
Since kwin play with CAP_SYS_NICE, secure_getenv will fail for xkbcommon
to load user level xkbmap. This allows kwin to load config under
~/.config/xkb

BUG: 447206
2 years ago
l10n daemon script d4f847574e GIT_SILENT Sync po/docbooks with svn 2 years ago
l10n daemon script 97041dab12 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2 years ago
Vlad Zahorodnii b0e452563b kcms/effects: Fix effect loading/unloading order
There are effects that are mutually exclusive, e.g. magnifier and zoom.
They both use the same global shortcuts.

When switching from zoom to magnifier, the zoom effect must be unloaded
first, then the magnifier effect can be loaded. Doing so in the opposite
order will break global shortcuts in the magnifier effect because
zooming shortcuts are still bound by the zoom effect.

BUG: 457800
2 years ago
l10n daemon script ad4d615b23 GIT_SILENT Sync po/docbooks with svn 2 years ago
Nate Graham 6a1552efb6 utils/xcbutils: reduce severity of "precision lost" message a debug
Right now this is marked as critical, but it's not a critical error.
Make it a debug to avoid spamming logs with not-very-actionable
information.

BUG: 463259
FIXED-IN: 5.27
2 years ago
David Edmundson 1651b7d1d7 Include layer postPaint in render loop timings
We need render timings in the journal to be as close as possible to the
entirity of the composite function up until the backend presenting.
2 years ago
Han Young d57495c8df Remove tablet tool when the tablet device is removed
Explicitly remove the tablet tool device when the corresponding sys event interface is removed.
2 years ago
David Edmundson 0167b7d7b0 libinput: Ignore touch events without outputs
A touch device could have no output object assigned due to the screen
being disabled, queued events or malconfiguration.

Using output would crash. Touch up is guarded so that we have matching
pairs.

BUG: 463385
2 years ago
l10n daemon script f094b3693c GIT_SILENT Sync po/docbooks with svn 2 years ago
l10n daemon script 8675ee5939 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2 years ago
Nicolas Fella 54e384e68e Enable scripted effects to load config translations from the kpackage
By default translations are loaded from /usr/share/locale. This works fine for builtin effects
since we install our translations there.

However, it doesn't work for third-party scripted effects. They only provide a kpackage and can't
install anything to /usr/share/.

This patch allows them to ship translations in contents/locale/$language/LC_MESSAGES/$domain.mo,
where $domain is the X-KWin-Config-TranslationDomain metadata value

This matches what Plasma does for applets since https://phabricator.kde.org/D5209

CCBUG: 317338
2 years ago
Nicolas Fella a40dd9a158 Only make startup notification change the virtual desktop if requested
Startup notifications optionally contain the target desktop the app should be launched to.

If present the window is sent to that desktop, if not it is sent to the current desktop.

Later in Workspace::activateWindow we check if the window is on the current desktop, and if not
we either move it to the current desktop or switch to the window's desktop depending on user preference.

However, this is broken because the window was already moved to the current desktop. To avoid this
only move the window if specifically requested by the startup id.

BUG: 462996
2 years ago
Vlad Zahorodnii b549776b68 scene: Avoid creating SurfaceItem for Xwayland's cursor surfaces
SurfaceInterface::scaleOverride() doesn't scale the bufferScale, so if the
scale override is 2, but the buffer scale specified by the client is 1,
bufferScale() will return 1.

Xwayland cursor surface implicitly relied on this behavior.

Porting cursor to SurfaceItem changed that. Now cursor surfaces honor
the scale override, which makes Xwayland cursors too small.

In order to properly fix, plasma has to scale Xcursor.size in xrdb. The
problem is that plasma also sets XCURSOR_THEME and XCURSOR_SIZE envvars
that take precedence. Plasma must stop setting those envvars, but it's
doable only with Qt 6.5, which got MouseCursorTheme and MouseCursorSize
hints in QPlatformTheme.
2 years ago
Vlad Zahorodnii c10b35facb backends/wayland: Pass linux-dmabuf buffers for cursor layer
This lets us avoid reading fbo data back.
2 years ago
Vlad Zahorodnii 9f100e8292 core: Make Output::setCursor() take CursorSource
It decouples the contents of the cursor from QImage.
2 years ago
Vlad Zahorodnii d8e6992512 tiling: Fix invalid sender object in connect()
RootTile is a CustomTile and it has no parent because it's the root.
Therefore the sender object in connect() will be null and it's going to
produce a warning.
2 years ago
Oliver Beard 7b714bdecb plugins/nightcolor: Use Night Color icon for preview OSD 2 years ago