Commit graph

24040 commits

Author SHA1 Message Date
Arjen Hiemstra
8242584b6e windowview: Use asynchronous instantiators instead of repeaters
We don't need the features of Repeater here and can instead just use an
Instantiator, which allows us to use asynchronous creation for the
window delegates, reducing the time needed to activate the effect.
2023-01-17 10:03:37 +00:00
Vlad Zahorodnii
cf583aa367 Change default latency policy to "Force smoothest animations"
There are some performance differences between X11 and Wayland. Desktop
systems are mostly unaffected by them, but laptops suffer a bit.

On Wayland, kwin always does double buffering. This is great for
reducing latency and avoiding tearing, but if the gpu can't keep up with
the work, you're going to see stuttering.

Another issue is that in order to reduce latency, we need to have very
good frame stats. At the moment, kwin records only cpu render time, but
we also need to record the gpu time. We've already done some work in
this area, but it's most likely Plasma 6 material. (plasma/kwin!1163)

In the meantime, let's change the default latency policy to "Force
smoother animations." It's going to improve frame rate. If people care
about latency, they can change latency policy in system settings; the
option is still there.

CCBUG: 452119
2023-01-17 04:10:30 +00:00
l10n daemon script
5dc6ea454e GIT_SILENT Sync po/docbooks with svn 2023-01-17 02:41:25 +00:00
l10n daemon script
03c407cb7d 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"
2023-01-17 02:03:45 +00:00
Vlad Zahorodnii
d42442b424 effects: Fix a typo in RenderGeometry::appendWindowVertex()
Only the y coord is scaled, but both x and y coords have to be scaled.
2023-01-16 18:52:50 +00:00
Weng Xuetian
ff092b12b0
Add text-input-v1 support
Main reason to support this old interface is because this is the only
protocol chromium (and effectively all electron app) that supports.

The protocol itself very similar to text-input-v2 with some minor difference.
So not hard to support by just duplicate some existing code. There might be
some unclear protocol design issue if kwin need to support multiple SeatInterface,
but for now it should be ok to assume there is only one seat.

Tested using fcitx5 against weston-editor and chromium with flag
--enable-features=UseOzonePlatform --ozone-platform=wayland
--enable-wayland-ime
2023-01-16 10:34:37 -08:00
Vlad Zahorodnii
5963790b21 kcms/rules: Use window class and role with original casing
The window rules kcm uses lower-case window class and role, but kwin can
use window class and role with other casing, which will break the ExactMatch
match rule.

BUG: 464190
2023-01-16 16:52:02 +00:00
Kai Uwe Broulik
ecf3fa9f10 backends/x11: Remove dependency on GLTexture::toImage
It is being phased out. Instead, read the pixels from the
cursor's framebuffer using `glReadPixels`.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2023-01-16 15:06:20 +00:00
Vlad Zahorodnii
dedae9e667 effects/morphingpopups: Fix glitch
There's a visual glitch that looks like a random rectangle in the top
left corner of morphing popup. It appears like it's caused by the blur
effect, it produces wrong results when the window is captured in
CrossFadeEffect::redirect().

Make CrossFadeEffect::redirect() unset blur and contrast force roles, so
the backdrop effects are not included in the captured frame.
2023-01-16 13:43:18 +02:00
Vlad Zahorodnii
d32f8df7c8 effects/{blur,contrast}: Move to the front in the effect chain pos
Backdrop effects such as blur and background contrast have to be in the
front of the effect chain because they need to work with background
before the window is painted on top.

Hopefully it's going to fix panel popup blinking visual artifacts.
2023-01-16 10:23:28 +00:00
Arjen Hiemstra
f95eb71173 Remove WindowQuad::makeArrays and WindowQuad::makeInterleavedArrays
RenderGeometry can do all that these methods do and offers some extra
functionality, in addition to having a more explicit API.
2023-01-16 09:51:28 +00:00
Arjen Hiemstra
3118b48650 Disable vertex snapping for Wobbly Windows and Magic Lamp
The subdivided grid used by these effects doesn't account for pixel
alignment. If we force the generated WindowQuads to be rounded, the
quad's sizes no longer match the texture sizes, which results in blurry
rendering.

BUG: 461283

eeffects
2023-01-16 09:51:28 +00:00
Arjen Hiemstra
3ee51e3f21 Allow overriding the vertex snapping mode for OffscreenEffect
Certain effects need vertices that aren't being rounded to device
coordinates. So allow those to explicitly request that.
2023-01-16 09:51:28 +00:00
Arjen Hiemstra
2bff7c5c71 Port OffscreenEffect to use RenderGeometry for geometry
This makes the code more explicit and allows using some of the new
features of RenderGeometry in OffscreenEffect.
2023-01-16 09:51:28 +00:00
Arjen Hiemstra
622114dfb5 Move texture coordinate post processing into a method of RenderGeometry
This allows us to reuse the code in other places.
2023-01-16 09:51:28 +00:00
Arjen Hiemstra
db7283ee5c Add default global vertex attribute layouts for GLVertex{2,3}D
This avoid some duplication when using GLVertex2D for geometry.
2023-01-16 09:51:28 +00:00
Arjen Hiemstra
c9b32afb1c Add a property to RenderGeometry that determines what vertex snapping mode to use
Currently, only two modes are provided, rounding or not rounding, which
allows explicitly disabling snapping. However, should we have a reason
to add more modes it is now fairly simple to change.
2023-01-16 09:51:28 +00:00
l10n daemon script
e473fb721c GIT_SILENT Sync po/docbooks with svn 2023-01-16 02:26:39 +00:00
l10n daemon script
60d41538b7 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"
2023-01-16 02:00:47 +00:00
l10n daemon script
fb8585a53e GIT_SILENT Sync po/docbooks with svn 2023-01-15 02:12:43 +00:00
l10n daemon script
3b5ea6e798 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"
2023-01-15 01:55:25 +00:00
l10n daemon script
7d2239fc17 GIT_SILENT Sync po/docbooks with svn 2023-01-14 17:48:02 +00:00
l10n daemon script
e12d9c1c6b 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"
2023-01-14 17:31:49 +00:00
Xaver Hugl
9cd52b4060 backends/libinput: don't multiply v120 value by scroll speed
The value is a representation of the discrete steps a mouse wheel can take.
Multiplying that with a scroll speed destroys the whole purpose of the value.
2023-01-14 13:12:22 +00:00
l10n daemon script
99ed8365bb GIT_SILENT Sync po/docbooks with svn 2023-01-14 12:46:19 +00:00
l10n daemon script
4f7de0495e GIT_SILENT Sync po/docbooks with svn 2023-01-14 02:21:17 +00:00
l10n daemon script
31d20fab92 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"
2023-01-14 02:02:24 +00:00
Aleix Pol
a5aaa9e3c4 org.kde.KWin: Expose a window's UUID
Exposes a Window's UUID so that it can be used with other APIs like
window management or screencasting.
2023-01-13 17:51:36 +01:00
Ismael Asensio
fdd585e44c kcms/tabbox: Fix Reset not disabling Apply
Fix the code to get the actual saved shortcuts on KGlobalAccel
when discerning if they have changed.

Amends commit: 76ac4be316
2023-01-13 09:49:15 +00:00
Nicolas Fella
c9691b5855 kcms/tabbox: Don't offer switcher from global themes that don't actually ship a switcher
Some global themes, e.g. Breeze Dark, don't ship a switcher and instead point to the one from the Beeze global theme

They do show up in the selection though, which is confusing and doesn't actually work
2023-01-13 08:49:04 +00:00
l10n daemon script
dbf50d3af5 GIT_SILENT Sync po/docbooks with svn 2023-01-13 03:12:37 +00:00
l10n daemon script
392379163a 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"
2023-01-13 02:03:45 +00:00
Ismael Asensio
b11416c396 kcms/tabbox: Highlight non-default shortcuts
This sets the property on the shortcut widgets when they
should get highlighted: the option is selected in System
Settings and the shortcut is not the default.

It requires a change in `KXMLGui/KKeyShortcutWidget` to
actually paint the highlihgt ring.
(commit 47572c26, KF103)

CCBUG: 459318
2023-01-12 19:58:08 +01:00
Vlad Zahorodnii
73005fcd72 kcms/compositing: Improve wording of "allow tearing" option
When reading "allow tearing in fullscreen", I expect something after the
word "fullscreen". Either "windows" or "mode".
2023-01-12 13:30:58 +00:00
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
2023-01-12 12:15:48 +00:00
Vlad Zahorodnii
9b0758ea71 autotests: Remove weird qwait in pointer input test 2023-01-12 11:40:26 +00:00
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.
2023-01-12 10:44:31 +00:00
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
2023-01-12 10:08:43 +00:00
Vlad Zahorodnii
9751aca548 autotests: Make testNoGlobalShortcuts quicker 2023-01-12 09:49:40 +00:00
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
2023-01-12 09:23:43 +00:00
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
2023-01-12 07:48:54 +00:00
l10n daemon script
3a6986b855 GIT_SILENT Sync po/docbooks with svn 2023-01-12 02:21:59 +00:00
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"
2023-01-12 02:01:58 +00:00
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
2023-01-11 21:39:30 +00:00
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.
2023-01-11 20:34:27 +00:00
Xaver Hugl
b4e8d44967 remove some macros with questionable usefulness 2023-01-11 19:22:23 +00:00
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
2023-01-11 12:03:51 -07:00
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
2023-01-11 14:37:10 +00:00
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.
2023-01-11 14:35:20 +03:00
ivan tkachenko
f4c3ae7c20
effects/magiclamp: Fix code style (add {braces} about if body) 2023-01-11 14:32:54 +03:00