Commit graph

23172 commits

Author SHA1 Message Date
Vlad Zahorodnii
ca6f84dad6 Rework how wl_output and kde-output-device are created
Create wl_outputs only for outputs in Workspace.
2022-08-11 17:17:47 +03:00
Vlad Zahorodnii
c7293d95e0 backends/{x11,virtual}: Allocate render data for all available outputs
This makes the behavior of virtual and x11 backend consistent
with the drm and the wayland backend and reduces the number of users of
the Platform::outputEnabled signal.
2022-08-11 12:39:51 +00:00
Mikhail Zolotukhin
f6054863e1
window: expose "output" property
This allows it to be used from QML KWin Script or via property() C++
call.

This is useful to be able to use client area function with pointers
API without falling back to VirtualDesktop X11 ids from scripts.
2022-08-11 14:42:06 +03:00
Vlad Zahorodnii
6982c506a5 wayland: Setup window management when starting to manage X11 window
We don't need to wait until the window is ready for painting in order to
create a plasma window, in fact, quite the opposite is desired. It's
better if the plasma window is created in manage() so the task manager
displays the corresponding item even if the window is not showing up for
whatever reason.
2022-08-11 07:21:12 +00:00
Natalie Clarius
979dddb4f1 Fix wrong center snap zone value
Snap to center was mistakenly using the zone size for snap to window.
2022-08-11 06:37:07 +00:00
Vlad Zahorodnii
4d1c82d111 Make ColorManager use outputs managed by Workspace
This removes one more dependency on Platform::enabledOutputs() and
Workspace knows better about what outputs are managed.
2022-08-10 10:17:30 +00:00
Vlad Zahorodnii
b9c00ba90d Create color manager after workspace 2022-08-10 10:17:30 +00:00
ivan tkachenko
3197c7892f
effects/{private,desktopgrid,overview}: Guard against function execution when component is being destroyed
Accept drop events correctly and use returned value (action) of
Drag.drop() to guard against the situation where the delegate is about
to be destroyed.

This does not fix any bugs per se, except suppressing a warning about
undefined targetScreen being printed to a console on every window dropped
onto a different virtual desktop.
2022-08-10 12:20:27 +03:00
Vlad Zahorodnii
c3f9aab329 plugins/screencast: Allow including cursor in window screencasts
BUG: 452960
2022-08-10 06:38:05 +00:00
Blake Sperling
1a475a73de effects: Improve animation durations and easing curves in Windowheap-based effects
This commit doubles the animation durations for WindowHeap-based effects
(Overview, Present Windows, and Desktop Grid) and uses the OutCubic easing
curve for their opening and closing animations. This makes them feel smoother
and more comfortable.

BUG: 455521
BUG: 448538
FIXED-IN: 5.26
2022-08-09 23:54:44 +00:00
Xaver Hugl
9f41620b77 backends/drm: don't crash if beginFrame fails
CCBUG: 455532
2022-08-09 22:18:58 +02:00
ivan tkachenko
8feaa8922a
effects/{private,desktopgrid,overview}: Clean up QML/JS code and bump imports 2022-08-09 22:02:38 +03:00
ivan tkachenko
f892c9510e
effects/colorpicker: Fix off-by-one error during coordinates conversion
Due to this bug color picker used to not only select one pixel higher
than it should (which is quite negligible), but also returned garbage
value for the topmost row of pixels (when you push the cursor against
the top edge of the screen).

FIXED-IN: 5.24.7, 5.25.5, 5.26
2022-08-09 20:23:26 +03:00
ivan tkachenko
2fa4a4c4e9
effects/colorpicker: Factor out effects->renderTargetRect() constant 2022-08-09 20:23:22 +03:00
Kai Uwe Broulik
90688b11f6 desktopbackgrounditem: Prefer desktop window with size matching output
Conky monitor's floating popup is of type desktop, too, and when it
gets picked over Plasma's desktop window, visual artifacts can be
observed behind e.g. the overview effect.
2022-08-09 15:00:51 +00:00
Vlad Zahorodnii
3934d1d0f2 wayland: Remove surface() check in Window::setupWindowManagement()
At the moment, an Xwayland window can be marked ready for painting even
though the corresponding wl_surface is missing. If that happens,
Window::setupWindowManagement() will fail to create a plasma window and
the task manager won't display the corresponding item.

As a short-term solution, remove the surface() check. It's not really
needed after all. For example, if it takes too long to start an app or
it doesn't show up at all, we still want to see a task manager item.

In long-term, kwin probably needs to take into account both xsync and
whether wl_surface has been associated, which is more complex.

BUG: 444325
2022-08-09 11:26:40 +00:00
Vlad Zahorodnii
e24ee60bb2 autotests: Remove Test::initWaylandWorkspace()
It reduces the amount of boilerplate code and makes startup sequence in
autotests similar to the one in kwin_wayland.
2022-08-09 08:17:18 +00:00
Kai Uwe Broulik
84bde36cc0 Make EGL a REQUIRED dependency
Target kwin links against EGL::EGL unconditionally.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-08-09 07:21:07 +00:00
David Edmundson
c5e40c9687 Use correct geometry in GTKShowWindowMenu 2022-08-09 06:59:13 +00:00
David Edmundson
2854d59da4 Avoid rounding on X11 configure events
As per the comment this is in kwin logical space not X11 space,
therefore results should be floating.
2022-08-09 06:59:13 +00:00
Vlad Zahorodnii
c214801a23 wayland: Simplify geometry setup code in InternalWindow
This weird setup code was needed to work around buggy geometry code a
while ago.

It fixes the debug console getting offscreen.
2022-08-08 16:43:53 +03:00
Volker Krause
b01b13353b Remove QDesktopWidget use in WorkspaceWrapper for Qt6
This is basically a continuation of 73973641.
2022-08-08 10:03:38 +00:00
Xaver Hugl
039dd96f8d xwaylandinterface: move global to Application 2022-08-08 09:16:22 +00:00
Xaver Hugl
53815e2b28 databridge: move global to Xwayland 2022-08-08 09:16:22 +00:00
Xaver Hugl
fde7d44941 tabletmodemanager: move global to Application 2022-08-08 09:16:22 +00:00
David Edmundson
49d80162c5 [effects/blend] Fix opacity value of old window
We animated from 1.0 to 0.0, however this does not take into account
that a previous effect may also have adjusted the opacity.

We should multiply accordingly.
2022-08-08 08:36:27 +00:00
David Edmundson
3b26936019 Ammend documentation for prePaintScreen wrt openGL context 2022-08-08 06:45:44 +00:00
l10n daemon script
fbec3a1f80 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"
2022-08-07 01:49:26 +00:00
Nicolas Fella
ed829eb5ad Remove unused includes 2022-08-06 19:51:13 +02:00
Xaver Hugl
41c23fa70e effects/windowview: always set the mode when activating with gestures
Otherwise the mode uses is defined by the last time the effect was used and
thus not very predictable
2022-08-06 16:01:56 +00:00
Nicolas Fella
7744a941ce Fix warning about lambda capture
C++20 doesn't like capturing 'this' via '='
2022-08-06 15:12:35 +00:00
Volker Krause
86abf8dbc3 Use a non-deprecated enum value for "no key" 2022-08-06 07:21:41 +00:00
Nicolas Fella
9a34ebbffc [x11] Refactor output updates
The current code has multiple index-based for loops iterating over items we get from XCB

Dealing with raw indices is error-prone and not pretty

By using std::span we can replace these loops with range-based for loops

Also remove some intermediate containers that aren't neccesary
2022-08-06 02:26:39 +00:00
Arjen Hiemstra
77af052f9d WindowView: Add "show windows from class on current desktop" mode
We currently have "windows from current desktop" and "windows from
class" but not one combining both. This adds that mode along with a
(default empty) shortcut and border activation.

BUG: 413342
2022-08-05 13:52:12 +00:00
Xaver Hugl
02f55e0e40 wayland: print warning about automatic backend selection
BUG: 457491
2022-08-05 00:58:37 +00:00
ivan tkachenko
aaa5e6fee3
effects/private: Fix ExpoLayout reflowing in Desktop Grid while dragging
This fixes makes ExpoLayout independent of its position on a screen,
which in turn stops it from randomly reflowing while dragging a virtual
desktop across desktop grid. It also removes an unwanted animation at
the end of activation of desktop grid: desktops move in place and then
windows proceed to adjust themselves resulting in a double animation.

FIXED-IN: 5.25.5 5.26
2022-08-04 21:04:09 +03:00
Xaver Hugl
97939ceae8 backends/drm: fix blob updating
Two things about the code were wrong:
1. m_current is used in updateBlob() but was only updated afterwards
2. the assumption that the property having the same ID means it has the
same blob contents is not always true

BUG: 449285
2022-08-04 15:48:32 +00:00
Xaver Hugl
8955a2420e replace all uses of QScopedPointer with std::unique_ptr 2022-08-04 12:30:09 +00:00
Kai Uwe Broulik
3e820f71c3 useractions: Don't offer opening KCMs if they weren't built
Otherwise this add a few "Configure" entries to the window menu
which do nothing.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-08-04 10:57:38 +00:00
Kai Uwe Broulik
62008e7b62 plugin: Use kwin_export.h instead of kwinglobals.h
It only uses the `KWIN_EXPORT` macro in plugin.h.
kwinglobals.h comes from libkwineffects and not kwin core.

(`KWIN_PLUGIN_VERSION_STRING` comes from config-kwin.h)

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-08-04 11:44:48 +02:00
ivan tkachenko
2fd4106588
effects/private: Prevent fading windows from moving downward in WindowView effect
Inheriting "active" state was meaningless, since "active" state binds
position to a ExpoCell which itself is in a disabled state.

FIXED-IN: 5.25.5 5.26
2022-08-03 23:55:06 +03:00
ivan tkachenko
b6f6e7f15a
effects/desktopgrid: Fix panel opacity animation during transition
It did fade back in, but at the beginning of animation it used to just
instantly disappear.

FIXED-IN: 5.25.5 5.26
2022-08-03 00:59:10 +03:00
Xaver Hugl
76fbffb40b screenlockerwatcher: move singleton to Application 2022-08-02 21:37:41 +00:00
Xaver Hugl
497a78b7cf tabbox: move global to Workspace 2022-08-02 21:37:41 +00:00
Xaver Hugl
43b78e40d8 screens: move singleton to Workspace 2022-08-02 21:37:41 +00:00
Xaver Hugl
9439e7719d screenedge: move singleton to Workspace 2022-08-02 21:37:41 +00:00
Xaver Hugl
719147952d rulebook: move singleton to Workspace 2022-08-02 21:37:41 +00:00
Xaver Hugl
0d704b8913 placement: move singleton to Workspace 2022-08-02 21:37:41 +00:00
Xaver Hugl
3c56bd9723 refactor Outline and move its singleton into Workspace 2022-08-02 21:37:41 +00:00
Volker Krause
f8516c1b42 Port remaining QQC1 uses 2022-08-02 18:06:54 +02:00