Commit graph

22794 commits

Author SHA1 Message Date
Rachel Mant
9e9e05f865 Cleaned up the definition of the stickyClient local 2022-06-14 07:57:01 +00:00
Rachel Mant
0f2fe33ed7 Refactored out the StackingOrderSwitching logic for the tabbox client model 2022-06-14 07:57:01 +00:00
Rachel Mant
93f322d262 Refactored out the FocusChainSwitching logic for the tabbox client model 2022-06-14 07:57:01 +00:00
Emilio Cobos Álvarez
7e1617c280 [x11] Implement _GTK_SHOW_WINDOW_MENU.
BUG: 454756
2022-06-14 06:55:07 +00:00
l10n daemon script
fefd730273 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-06-14 01:52:48 +00:00
ivan tkachenko
ecc0131829
Port away from Kirigami.Units.devicePixelRatio
It's deprecated and always 1
2022-06-14 01:25:53 +03:00
ivan tkachenko
8b412aa721
Fix QML/JavaScript code style & bump imports 2022-06-13 16:58:53 +03:00
ivan tkachenko
2434ff10a2
Use JavaScript strict equality === 2022-06-13 16:58:53 +03:00
Vlad Zahorodnii
4e32ea20d6 Disable screen edge approach area if the edge is blocked
Currently, if the screen edge is blocked and the cursor is inside its
approach geometry, kwin is going to paint screen edge glow.

It doesn't look good and it can have some performance penalties with
fullscreen video games because the direct scanout path will be blocked.

BUG: 454503
2022-06-13 12:35:46 +00:00
Aleix Pol
29946be29f backends/wayland: Fix window title 2022-06-13 14:33:43 +02:00
Vlad Zahorodnii
9d916fa60d wayland: Use shared DmaBufAttributes type 2022-06-13 10:22:29 +00:00
Vlad Zahorodnii
7ecdbad4f1 wayland: Sync DmaBufAttributes 2022-06-13 10:22:29 +00:00
Vlad Zahorodnii
2761df727d wayland: Refactor dmabuf attributes in linux-dmabuf-v1
At the moment, dmabuf importing is scattered all over the place in kwin.
It would be great if we had one function that takes dma-buf attributes
and returns an EGLImage if successful.

As the first step, make linux-dmabuf-v1 implementation provide dmabuf
attrs compatible with KWin::DmaBufAttributes.
2022-06-13 10:22:29 +00:00
Vlad Zahorodnii
00df0a7019 wayland: Explicitly initialize surface size to 0
QSize() will construct an invalid size. An invalid size has width and
height set to -1. In other words, QSize() != QSize(0, 0). This can create
issues when computing the bounding rect of a surface that has invisible
subsurfaces.

For example, if the subsurface rect is QRect(0,0 -1x-1), the top-left
corner of the bounding rect will be affected.

In order to make computation of the bounding rect robust, initialize the
surface size to 0 explicitly.

BUG: 454535
2022-06-13 12:25:28 +03:00
Vlad Zahorodnii
f9c20bb83e Rename DeformEffect to OffscreenEffect
Originally, DeformEffect was meant to be used in effect that deform
windows, but its usage has become wider than anticipated. This change
renames the DeformEffect to OffscreenEffect to accommodate for that.
2022-06-13 07:06:09 +00:00
l10n daemon script
ef1d97ac86 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-06-13 02:35:40 +00:00
l10n daemon script
9bb1a4401a 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-06-12 01:44:59 +00:00
Weng Xuetian
a74c436156 Always send a done after commit for text input v3.
In Gtk's text-input-v3 implementation it expect done to update the
client serial after every commit. Though it is unclear whether this is a
protocol requirements, do the same thing like mutter for more
compatiblity, especially Gtk3 is in EOL not likely to be patched any
time soon.

To do so, we will need to keep track of the last active preedit,
otherwise only send_done() will clear the preedit.
2022-06-11 20:24:35 +00:00
Aleix Pol
dc9c431fe3 xwayland: Listen to changes in the Xwayland.Scale setting 2022-06-11 13:58:04 +00:00
Aleix Pol i Gonzalez
5bea508590 drm: Readability, no need to copy the modifiers vector 2022-06-10 20:54:17 +02:00
David Edmundson
52900dc2d6 [wayland] Fix surface unit test
Behaviour was fixed in c3f5f8ce01. If an
item starts at 0,0 and is 100 pixels wide in normal geometry the 100th
pixel is not inside the rectangle.

SubSurface::testSurfaceAt was adjusted correctly but this was missed as
we test the same thing twice!
2022-06-10 14:00:58 +00:00
Alexander Lohnau
9419acc1ff Fix KWin scripts KCM not writing it's pending states to config
BUG: 455015
2022-06-10 06:55:55 +02:00
l10n daemon script
095c7fd3a4 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-06-10 01:42:11 +00:00
Xaver Hugl
baf0f7b8d2 backends/drm: add fallback for systems without gbm modifier support
It was missing for lease outputs, which causes all atomic tests to fail

BUG: 454961
2022-06-09 14:31:15 +02:00
David Edmundson
c3f5f8ce01 [wayland] Fix SurfaceInterface::surfaceItemAt
QRectF::contains includes all edges. If two subsurfaces are next to each
other ::contains will treat it as having a singularity where a value is
on 2 subsurfaces rather than either one of the other, which isn't what
we want for our purposes.

The unit test is extended but also featured some wrong values, the
biggest clue that it was wrong was that we used different test
co-ordiantes for surfaceContains and inputContains.
2022-06-09 09:43:13 +00:00
l10n daemon script
c8b4937f81 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-06-09 02:08:35 +00:00
David Edmundson
419c0b81fd Support an alternative harcoded scale for X
Anything in xcb_ structs are always in X local, all member variables
aside from buffers are in kwin local space.

This patch ignores a few paths that are not relevant on wayland.
2022-06-07 11:58:26 +01:00
David Edmundson
d70bd2435b Introduce client level scale overrides
This allows for compositor managed different co-ordinate space between kwin's
logical co-ordinate space and a client's logical co-ordinate space.

When combined with a modified kwin!1959 this allows us to set a DPI in xrdb and
mark all xwayland windows as being 2x (or other) and avoid upscales for xwayland
clients in a way that doesn't impact other wayland clients or require
third-party changes. Any use of fractional values is in layers we control
instead of over the wire. kwayland-server is the right place for this
abstraction as we need Outputs to differ on a per resource basis. Something we
can't control from within kwin.

Right now only protocols used by Xwayland are covered. If we covered
remaining protocols we can offer user-control on all remaining clients which
could open up other possibilities such as a user controlled dynamic resizing,
or adapt to possible future protocol changes with wayland scaling.
2022-06-07 08:33:55 +01:00
l10n daemon script
51999deadb 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-06-07 02:21:00 +00:00
Alexander Volkov
00379da3d3 Ignore fake input devices when detecting tablet mode
Otherwise launching firefox, which in turn leads to launching of
xdg-desktop-portal-kde, disables auto-rotation.
2022-06-06 17:25:37 +00:00
Marco Martin
3d0beae828 Drag windows between screens in WindowHeap
Allow dragging windows between screens, using a placeholder thumbnail item to
render part of the thumbnail on the other screen.

BUG: 283333
BUG: 453996
BUG: 448566
2022-06-06 13:48:59 +00:00
Marco Martin
6abce1529a Put the hostpot as the press position
we should drop the window on the desktop under the cursor,
not under the center of the thumbnail

BUG:454584
2022-06-06 11:39:28 +00:00
Xaver Hugl
4874066423 port many Qt shared pointers to standard smart pointers
There are a few benefits to using smart pointers from the standard library:
- std::unique_ptr has move semantics. With move semantics, transfer of ownership
can be properly expressed
- std::shared_ptr is more efficient than QSharedPointer
- more developers are used to them, making contributions for newcomers easier

We're also already using a mix of both; because Qt shared pointers provide
no benefits, porting to standard smart pointers improves consistency in
the code base. Because of that, this commit ports most of the uses of QSharedPointer
to std::shared_ptr, and some uses of QScopedPointer to std::unique_ptr
2022-06-04 16:57:29 +00:00
l10n daemon script
138000020f 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-06-04 01:44:31 +00:00
Nate Graham
701fc52a4a effects/desktopgrid: re-add shortcuts to add and remove desktops
This got lost in the QML port.

BUG: 451848
2022-06-03 15:34:27 +00:00
Nate Graham
529c3c29d3 Change global shortcuts to use the Meta key by default
The current shortcuts could conceivably override app shortcuts, since
they don't use the Meta key. The following changes are made:

Switch keyboard layout:               Ctrl+Alt+K   -> Meta+Alt+K
Activate window that wants attention: Ctrl+Alt+A   -> Meta+Ctrl+A
Kill Window:                          Ctrl+Alt+Esc -> Meta+Ctrl+Esc

These are safe to change in the code rather than adding new ones and
keeping the old ones around for compatibility's sake because
KGlobalAccel::setDefaultShortcuts by default preserves old shortcuts
when they are changed, and we aren't overriding that behavior here. So
only new installs will get the new shortcuts and existing user installs
will be untouched.
2022-06-02 07:20:54 -06:00
Aleix Pol
9db4fd1a17 DmaBufTexture: The modifier is a global dmabuf attribute
We don't get one per plane, but one per allocation.
2022-06-02 03:42:13 +02:00
Aleix Pol
51bfadab63 backends/wayland: Fix behaviour when disabling outputs
Makes sure disabled outputs are reported as such, leaving behind the
assumption that all outputs are always enabled.
Ensures the corresponding outputEnabled/Disabled signals are emitted.
Updates the window title to reflect the output state.
2022-06-01 10:53:03 +00:00
l10n daemon script
465aa7edee 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-06-01 01:57:49 +00:00
Xaver Hugl
e7365bf43f backends/drm: don't do direct scanout if transformations don't match
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2128>
2022-05-31 07:10:08 +00:00
l10n daemon script
0a7ae31e4c 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-05-31 02:02:56 +00:00
David Edmundson
cd234c96f7 [tabletmodemanager] Avoid unnecessary signalling
oldEffectiveTabletMode was currently unused
2022-05-30 19:38:26 +01:00
David Edmundson
87fbdd04fe [xdgshell] Remove unused captured variable 2022-05-30 19:37:46 +01:00
David Edmundson
bc4d1cf129 [libkwineffects] Fix minor compiler warnings 2022-05-30 19:37:24 +01:00
David Edmundson
2662d20da1 [input] Remove unused local variables 2022-05-30 19:36:46 +01:00
Xaver Hugl
671672871b LogindSession: adjust warning when openRestricted fails
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2482>
2022-05-30 12:44:22 +00:00
Luca Carlon
2d563dc63f AppletPopup window type should accept focus.
AppletPopup window type should accept focus, behaving like other window types like
Dock. At the moment it is instead behaving like notification, which seems wrong.
This should also fix a failing unit test.
2022-05-30 09:41:01 +00:00
Luca Carlon
7865a9b355 AppletPopup window type should be shown on all desktops.
AppletPopup's are typically supposed to be attached to the panel and
should remain visible when the virtual desktop is changed. If the
AppletPopup is pinned and the virtual desktop is changed, without
this patch, the window does not remain attached to the panel. This is
how AppletPopup was supposed to work even according to the unit test
which currently fails.
2022-05-30 08:36:52 +00:00
Malte Dronskowski
d8da0c7708 Fix typo in latency policy
The lowest latency setting wasn't applied because the internal 
implementation contained an excess 'e' in comparison to the setting 
exposed to the user

BUG: 453694
2022-05-29 18:07:37 +00:00
l10n daemon script
450d8e286a 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-05-29 01:45:37 +00:00