Commit graph

22678 commits

Author SHA1 Message Date
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
l10n daemon script
df7e386714 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-28 02:21:02 +00:00
Luca Carlon
da0dd1e367 Support new AppletPopup window type
See the discussion in https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/500.

BUG: 411462
BUG: 332512
FIXED-IN: 5.25
2022-05-27 21:49:37 +00:00
Xaver Hugl
615cd352fb add autotest for touchscreen gestures 2022-05-27 17:49:59 +00:00
Xaver Hugl
61efc4c2e1 input: don't fail touchscreen gestures with invalid physical size 2022-05-27 17:49:59 +00:00
Xaver Hugl
9957f8c84a input: fix touchscreen gesture detection
When a gesture is cancelled because of the distance between fingers or the
time it took to register them all, no gesture has been taken yet. In that
case, the canceling would never be ended, effectively disabling all touchscreen
gestures.
2022-05-27 17:49:59 +00:00
Vlad Zahorodnii
97a82c97df effects: Fix QQuickItem::mapToGlobal() in qtquick effects on wayland
On Wayland, we create a dummy window to fix HiDPI issues. At the moment,
the QQuickRenderControl::renderWindow() returns a fixed offset 0,0.

As it turns out, QQuickItem::mapToGlobal() will poke the
QQuickRenderControl::renderWindow() function to map the specified point
to the global coordinate space.

Since the renderWindow() function returns hardcoded offset, the
mapToGlobal() function is sort of broken in fullscreen effects.

In order to fix mapToGlobal() on Wayland, this change makes the
EffectQuickRenderControl return the position of the associated
OffscreenQuickView.
2022-05-27 15:43:00 +00:00
Xaver Hugl
f86f159fd5 backends/drm: fall back to a software cursor if drmModeAddFB2 fails
CCBUG: 453860
2022-05-27 15:24:27 +00:00
Marco Martin
f6db8b1178 Toggle all desktop on middle click
restores the behavior of the old desktop grid which toggled on all desktops on middle click

BUG:454001
2022-05-27 08:29:57 +00:00
Vlad Zahorodnii
6180a9b144 effects/zoom: Fix repainting with zoom factor of 1
When zoom factor is 1, the zoom effect will paint the scene in an
offscreen texture, but not actually paint the textures on the screen.

Zoom factor can be 1 when the effect has been just stopped.

BUG: 454407
2022-05-27 08:14:21 +00:00
Marco Martin
207c59002b Properly reset offToCornerId and apertureCorner when the effect closes
When the effect closes, all the extra data attached to the window
(offToCornerId and apertureCorner properties) are not valid anymore
and need to be reset right after the animation end.
also manage the two edge cases where a window either appeared or
got minimized while the effect was running to either show it or not

BUG: 454280
2022-05-27 08:00:32 +00:00
Vlad Zahorodnii
1f6d9d482f effects/zoom: Schedule a fullscreen repaint if stopped zooming
On Wayland, screens are repainted independent of each other. If zooming
animation stops on one screen, other screens may still be stuck in the
zoomed state and therefore result in potential flickering. Issue a full
screen repaint when zooming stops to ensure that other screens are
repainted with "unscaled" contents.

BUG: 454407
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2472>
2022-05-27 07:27:06 +00:00
Vlad Zahorodnii
f3b291bce0 Make TimeLine API ergonomic with presentation timestamps
Currently, if you want to use TimeLine, you need to track the last
presentation timestamp which boils down to carrying some boilerplate
code.

The current situation can be improved by making TimeLine work with
presentation timestamps.

Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2473>
2022-05-26 17:10:07 +00:00
Vlad Zahorodnii
6a5173b6c4 effects/zoom: Use GL_LINEAR filter
The magnification filter was changed to GL_NEAREST with the reasoning
that "pixel granularity" would be more correct. Perhaps that was not a
bright idea. Change it back to GL_LINEAR.

BUG: 454408
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2471>
2022-05-26 10:11:01 +00:00
Kai Uwe Broulik
b6001d12cc backends/x11/windowed: Don't create cursor pixmap from null image
There's no point and it results in a "QImage::scaled: Image is
a null image" warning.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2469>
2022-05-26 06:51:46 +00:00
Kai Uwe Broulik
b062d09fdc backends/x11: Support resizing the windowed output
In response to a XCB_CONFIGURE_NOTIFY on the output window, the new size
is set as mode and the output layer buffer is recreated.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2459>
2022-05-26 06:38:32 +00:00
Vlad Zahorodnii
486d229cae effects/desktopgrid: Fix config group name
The config group is formed as "Effect-" + plugin id, i.e. "desktopgrid"

Config migration from DesktopGrid to desktopgrid is already handled by
a kconf_update script.

BUG: 454102
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2464>
2022-05-25 18:11:57 +00:00