Commit graph

3614 commits

Author SHA1 Message Date
l10n daemon script
08d140982d 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-23 01:43:29 +00:00
David Edmundson
be5b23628f [effects] Fix QML after recent refactor
fd25e96969 looks like it attempted to
rename an alias and got out of sync.
2022-06-22 19:59:22 +01:00
Marco Martin
0534110eed Fix the math of the down gesture 2022-06-22 17:54:54 +02:00
Aleix Pol
9208a8eb0e screencasting: Properly disable the cursor when it exits the viewport
Otherwise it would glitch
2022-06-22 15:42:50 +02:00
Aleix Pol
ed9e1e57b3 screencasting: No need to adjust the scale on the cursor
Otherwise we get some vertical padding when there's scaling
2022-06-22 15:42:50 +02:00
Marco Martin
fd25e96969 Move WindowHeap delegate to own file
This makes easier for individual effects to personalize it
without adding ad-hoc api in the main WindowHeap class.
WindowHeap and WindowHEapDelegate are still quite coupled and thing can probably still be improved, but the code should be more readable already
2022-06-22 11:24:17 +00:00
Xaver Hugl
6d9d4c190a backends/drm: fix enabled+inactive check
When dpms disabled outputs get set active, they require a modeset. If after
that they are set inactive again without resetting the pipelines first,
they no longer require a modeset but still have the pending properties that
would enable a crtc - but without a framebuffer set.

To prevent this, first test the current setup as it is, and only then see
if the pipelines would work if enabled again.
2022-06-22 10:22:30 +02:00
Aleix Pol
9dbd0c4b36 backends/wayland: Offer the connector name as the model
It's more useful than ""
2022-06-22 01:54:19 +02:00
Xaver Hugl
3ea14d6e36 backends: use std::unique_ptr for RenderLoop 2022-06-21 17:50:49 +00:00
Xaver Hugl
a38a44cb2a libinput: use std::unique_ptr for events 2022-06-21 17:50:49 +00:00
Xaver Hugl
d2f7f75d39 manage Session with std::unique_ptr 2022-06-21 17:50:49 +00:00
Xaver Hugl
13d079cdd7 backends/x11: do less manual memory management 2022-06-21 17:50:49 +00:00
Xaver Hugl
e745577b4c backends: port vsync helpers to std::unique_ptr 2022-06-21 17:50:49 +00:00
Xaver Hugl
4cab9c4fc7 backends: port from QScopedPointer to std::unique_ptr 2022-06-21 17:50:49 +00:00
Aleix Pol
1112c29eb4 drm: Drop wrong assert
It blows out on nvidia proving my assumption was wrong back then
2022-06-21 14:16:46 +00:00
Aleix Pol
7b933abc0f backends/wayland: Don't rearrange outputs every time the window is resized
It makes it very hard to debug any use-case that isn't a strip of
outputs and even then, we should have other mechanisms to arrange
outputs properly (i.e. through kscreen).
2022-06-21 10:33:12 +00:00
Aleix Pol
5490b00117 backends/wayland: Allow outputs to have a name
As expected in many parts of our codebase
2022-06-21 10:33:12 +00:00
Vlad Zahorodnii
d40aec0853 effects/desktopgrid: Allow switching between desktops using digit and function keys
C++ version allowed switching between virtual desktops by pressing
function keys (Fn) or digit keys.

BUG: 455292
2022-06-21 10:43:13 +03:00
Vlad Zahorodnii
48f69146d3 Unvirtualize Scene::paintWindow() 2022-06-20 17:59:02 +03:00
Vlad Zahorodnii
a85960833b effects/screentransform: Do proper cross-fading
At the moment, the effect that animates the screen works as follows:

* render the screen before it's rotated in an offscreen texture
* after screen rotated, paint the offscreen texture in the first half of
  the animation but not the screen contents after rotation and in the
  second half of the animation, paint the live screen contents

This works but it doesn't take into account things such as blur (I can
see that the region around where the panel should be doesn't look as
expected).

This change makes the screen transform effect do proper cross-fading,
i.e. save the screen before it's rotated in an offscreen texture, render
the current screen in an offscreen texture, and produce the final result
by cross-fading between two offscreen textures in a shader.

Besides fixing the visuals of the effect, another motivation behind this
change is to reduce the number of ScreenPaintData transforms, which can
be very handy in simplifying item painting code.
2022-06-20 13:56:04 +00:00
Vlad Zahorodnii
35a3184ea3 Fix computation of effective opaque region of SurfaceItemX11
The value of _NET_WM_OPAQUE_REGION can be out of sync with the geometry
of the window. The NETWM spec suggests to compute the effective opaque
region by taking intersection of _NET_WM_OPAQUE_REGION and the bounding
region set by the shape extension.

SurfaceItemX11::opaque() got broken after refactoring opaque region
handling in wayland surfaces so SurfaceInterface::opaque() always
returns a sane value, the computation of effective opaque region is done
in SurfaceInterface at commit time.

BUG: 455617
2022-06-20 10:18:18 +00:00
Marco Martin
c1a536a527 Fix dragging especially by touch
The drag manager of a window now can take over from anything, so that
the events to initiate a drag are not stolen by the tap handlers
(fixes the drag starts only the second time is tried issue)

On wayland drag by touch was completely broken by the supportsclosewindows check,
now the touch drag handler is always active and the check of the property is done only
when the drag is over

BUG:455268
2022-06-20 10:11:04 +00:00
l10n daemon script
4699f8c0e2 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-20 01:54:30 +00:00
Méven Car
4082fdf960 WaylandServer: Add a setting to disable PrimarySelection
CCBUG: 441668
2022-06-19 05:49:20 +00:00
l10n daemon script
d86563a836 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-19 01:42:58 +00:00
Aleix Pol i Gonzalez
5338d1a2b0 backends: We need to make current before calling importDmaBufAsTexture
Calls it for the WaylandBackend, ensures the declaration of the pointer
to the EglBackend in the drm case is done in the correct scope.
2022-06-18 20:00:32 +02:00
Weng Xuetian
e25a86bcd1
Fix typo in qml margin
top -> right
2022-06-17 13:58:05 -07:00
Nate Graham
5021464f4b kcmkwin/kwinscreenedges: Add missing colon for "Behavior" label 2022-06-17 13:37:47 -06:00
Xaver Hugl
1966638017 backends/drm: do cross-gpu imports again for test commits
Otherwise all commits will fail without a clear visible reason.

BUG: 454086
2022-06-17 17:45:18 +02:00
Marco Martin
13e3630127 effects/windowview: Search on all screens
use a property of the effect itself to store the search text
so all the views will search for the same thing at the same time.

BUG: 455353
FIXED-IN: 5.25.1
2022-06-17 14:55:39 +00:00
Vlad Zahorodnii
a6b5efd43d effects: Improve gesture handling in some effects
At the moment, it's possible to activate a qtquick effect while another
qtquick effect is already active, we have code that prevents fullscreen
effects overriding each other, yet that still happens.

The reason for that behavior is that the gesture recognizer will mark
all gestures as started when user starts swiping on touchpad and cancel
gestures as more swiping occurs. This can mistrigger toggling logic in
the window view effect and the desktop grid effect, etc.

In order to make handling of gesture cancellation correct, we could
check whether user has swiped enough to deactivate window view, or
desktop grid. This change tries to implement exactly that.

As a side-effect, it also allows toggling the effect with the same
gesture. However, we should make cancellation gestures opposite of
activation gestures, i.e. if 4 swipe up gesture is used to activate an
effect, then 4 swipe down gesture should be used to deactivate the
effect.
2022-06-17 11:30:56 +00:00
Marco Martin
32e6632d13 Make gbm_bo_create_with_modifiers2 inline
needed to link some tests

APPROVED-BY: vlad.zahorodnii@kde.org
2022-06-17 11:16:19 +02:00
Vlad Zahorodnii
24bc3fed6c qpa: Fix a crash in EGLPlatformContext::swapBuffers()
After internalWindow->present() is called, we cannot guarantee that the
current opengl context hasn't changed. If kwin changes the current opengl
context, bindContextFBO() can crash because there may not be current
QOpenGLContext.

BUG: 455435
2022-06-17 08:27:02 +00:00
Xaver Hugl
34ce3dde87 backends/drm: use GBM_BO_USE_SCANOUT when importing buffers for multi gpu
The gbm surface may not have the scanout use flag, and if the buffer is imported
without it, creating the framebuffer may fail

CCBUG: 454086
2022-06-16 17:02:16 +02:00
Marco Martin
c61f0ad158 Don't use the plasma theme for icons in overview
don't attempt to use icons meant for the systray

BUG:455368
2022-06-16 13:55:25 +00:00
Aleix Pol
cd2567a838 drm & wayland: Remove unnecessary close() 2022-06-16 13:18:32 +00:00
Aleix Pol
1d5c803ce0 drm: Change where we call makeCurrent when creating dmabufs
We only need to call it before issuing opengl calls, so it's not
necessary when testing or when gbm fails to create the Buffer Object.
2022-06-16 13:18:32 +00:00
Aleix Pol
538b848f80 backends: Split out a DmaBufParams class
Instead of using a DmaBufAttributes instance to communicate the settings
to create a new dmabuf, use a smaller DmaBufParams class that only
contains the information we need after destroying the BO.
2022-06-16 13:18:32 +00:00
Aleix Pol
56ab74a143 backends: Share gbm create implementations between drm and wayland 2022-06-16 13:18:32 +00:00
Aleix Pol
f50f519370 EglDmaBuf: reuse implementation in AbstractEglBackend to import an EGLImage 2022-06-16 13:18:32 +00:00
Aleix Pol
aa59344be7 Platform: Improve our infrastructure to support dmabufs in backends
Allows creating buffers with modifiers.
Lets the windowed wayland backend support it, which makes testing
everything else much simpler.
2022-06-16 13:18:32 +00:00
Marco Martin
e04542995e fix windows dragging in desktop grid
Don't disable the main drag handler when canclosewindows is disabled,
that one is not used to close windows but to drag them on other desktops or screens

BUG: 455268
2022-06-16 09:50:01 +00:00
Vlad Zahorodnii
c7ba0a2567 effects/blur: Make shader code readable
At the moment, blur shader code is barely readable because the code is
constructed at runtime.

Since ShaderManager handles opengl context profiles when loading shaders
from files, we can improve code readability by splitting shader code in
the corresponding files.

Note that ShaderManager adds "precision highp float;" for convenience
(whether using "highp" is okay is up for debate).
2022-06-16 08:26:28 +00:00
Vlad Zahorodnii
a4b41c84e1 effects/windowview: Redirect key events to search field
Redirect key events to search field so user can search for windows
without manually focusing the search field. It matches the behavior of
the overview effect.

BUG: 455100
2022-06-16 10:26:36 +03:00
l10n daemon script
62b9d03784 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-16 01:55:02 +00:00
David Edmundson
a74694f6ff [xwl] Restart xwayland regardless of exit value
In the case of an assert, for example a wayland error Xwayland will
exit, but with an exitStatus of "normal exit".

We also trigger a shutdown should kwin encounter an error on the X11
side, this would be a clean exit from an XwaylandLauncher point of view.
It makes sense to try to restart.

Deliberate shutdown is handled by destroying the XwaylandLauncher. This
means it's not an issue for final kwin teardown.
2022-06-15 09:25:32 +00:00
Vlad Zahorodnii
1725e22483 effects/slide: Ensure that there's only one visibility ref per window
If a window is added and then the current virtual desktop changes, we
can encounter the following situation:

 * desktopChanged signal is emitted, and the slide effect starts
   animation. SlideEffect::prepareSwitching() will setup windows; note
   that the new window may be present in effects->stackingOrder()
 * windowAdded signal is emitted, and slide effect tries to ref the
   window again

In order to ensure that there's only one reference, maintain visibility
refs in a hashtable.

BUG: 455237
2022-06-15 06:48:43 +00:00
l10n daemon script
58da3aff46 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-15 01:47:02 +00:00
ivan tkachenko
053afea80c
[OSD] Update QML/JavaScript code style 2022-06-14 22:50:13 +03:00
Vlad Zahorodnii
634e032201 Remove redundant initializeX11() in Compositor
Compositor::setupStart() already calls initializeX11(). This fixes
BadAccess warning on startup.

CCBUG: 455167
2022-06-14 19:38:23 +03:00
David Edmundson
1e62fe99bd Remove superfluous area check
If area.contains(geometry.topLeft()) is false this does nothing anyway
2022-06-14 11:34:50 +00:00
Vlad Zahorodnii
411607897f core: Make screen area safer in Workspace::clientArea()
If the given output or desktop is not in m_screenAreas, [] operator can
crash.
2022-06-14 11:09:58 +00:00
Vlad Zahorodnii
ac97e282fc scripting: Handle bad output and desktop ids gracefully
Don't crash if a script has provided bad screen or desktop id to
clientArea().

CCBUG: 449957
2022-06-14 11:09:58 +00:00
Xaver Hugl
3c0ed5643b effects/windowview: do close animation after gesture ended 2022-06-14 08:47:39 +00:00
Rachel Mant
fd18401dbf Introduced a new setting for the task switcher - OrderMinimizedMode - and implemented the tabbox logic for it 2022-06-14 07:57:01 +00:00
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
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
Kai Uwe Broulik
b018dd3204 qpa: Provide a QPlatformNativeInterface
Under Gnome/Unity/XFCE, but not Plasma(!), QFontconfigDatabase queries
the platform native interface for certain font settings
(e.g. antialiasingEnabled). Without a QPNI this would crash KWin
as soon as it tried to query for fonts.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2468>
2022-05-25 16:37:32 +00:00
Vlad Zahorodnii
f2be602266 kcms/touch: Fix crash
"effects" is a typo, we need to populate "m_scripts"

BUG: 454360
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2465>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2465>
2022-05-25 10:26:03 +00:00
Vlad Zahorodnii
e57be93108 backends/drm: Specify clear color for cursor plane
Otherwise the results are undefined.

BUG: 454068
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2466>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2466>
2022-05-25 09:45:18 +00:00
Vlad Zahorodnii
7c849ee05a Use font metrics to compute corner offset
The problem with the current approach is that it doesn't work reliably
on wayland. Outputs can have different pixel density, etc.

Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2461>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2461>
2022-05-25 06:29:28 +00:00
l10n daemon script
68f6734d5c 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-25 01:46:45 +00:00
Kai Uwe Broulik
f013dc410e Don't block screen edge for fullscreen effects
Otherwise in overview effect you cannot go back out the way you came.

Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2416>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2416>
2022-05-24 23:58:33 +00:00
Kai Uwe Broulik
d143f6e3c4 backends/x11: Arm vsync monitor in EglX11Backend
This was originally on `EglX11Backend::endFrame` and got lost
as part of refactoring in 7358daa9, breaking nested `kwin_wayland`
rendering with GL.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2458>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2458>
2022-05-24 14:44:59 +00:00
Aleix Pol
cad5ddbab3 xdg_activation_v1: Do not bounce icon if the desktop file was not found
It's annoying and doesn't buy us much.
Additionally, take X-KDE-StartupNotify into account as we are meant to.

BUG: 453940
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2415>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2415>
2022-05-24 13:14:43 +00:00
Vlad Zahorodnii
221f114d80 effects/zoom: Render scene in an offscreen texture
This fixes integration of the zoom effect with the blur effect and qtquick
effects such as overview or window view.

The main con of the proposed solution is that offscreen rendering can be
a bit overkill. But on the other hand, it's the most robust way to
ensure that fullscreen effects integrate correctly with the zoom effect.
For example, without it, the quick scene effect would need to figure out
what screen views to paint for the given screen. There are also more
finicky cases, e.g. the screen transform effect.

BUG: 447002
BUG: 447670
BUG: 453467
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2451>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2451>
2022-05-24 12:29:11 +00:00
Vlad Zahorodnii
cc487d4292 effects/zoom: Specify effect chain position
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2451>
2022-05-24 12:29:11 +00:00
Vlad Zahorodnii
80b9617bad effects/fallapart: Fix glitch
The WindowItem visibility reference must be dropped after, not before
starting painting. It also makes the fall apart effect code consistent
with other effects.

BUG: 454243
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2455>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2455>
2022-05-24 12:06:09 +00:00
Kai Uwe Broulik
cfd3676e96 backends/x11: Restore dedicated XRenderUtils::init function
Under kwin_wayland `kwinApp()->connection()` is for communicating with
XWayland, but in X11Windowed backend we need to talk to the host XServer.

Restore `XRenderUtils::init` and set it accordingly based on
whether we're running standalone or windowed, so that `kwin_wayland`
works running nested in an X session again.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2457>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2457>
2022-05-24 11:45:52 +00:00
Vlad Zahorodnii
8b644fee58 backends/x11: Ensure that Output::geometryChanged is emitted when modes change
BUG: 453696
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2454>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2454>
2022-05-24 09:51:44 +00:00
Alexander Lohnau
38eef5e2b7 Adjust name of KCM desktop files
The name should match the KCM plugin id, otherwise the entry can not be fond when the KCM should get pinned in the task manager
2022-05-23 19:40:26 +02:00
Vlad Zahorodnii
e6a2cbc345 wayland: Simplify keystate protocol implementation
Access input machinery directly to monitor modifiers.

Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2447>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2447>
2022-05-23 07:06:29 +00:00
Volker Krause
f64214e8b3 Add missing include
This is no longer indirectly included with KF deprecation level 5.94.
2022-05-22 15:13:40 +02:00
Vlad Zahorodnii
d91bdee3c7 Allow fullscreen effects to override latency policy
With some effects, latency policy doesn't matter and it's preferred if
kwin uses the smoothest animation latency policy in order to minimize
the number of frame drops, e.g. slide.
2022-05-21 17:21:20 +00:00
Vlad Zahorodnii
773384b59f Remove unused includes in scene.cpp
QQuickWindow and QVector2D are unused.
2022-05-21 15:27:42 +03:00
Vlad Zahorodnii
e3da5fc76e Remove EffectFrame leftovers in Scene 2022-05-21 14:20:33 +03:00
Ismael Asensio
329ddf5789 kcm/rules: Use the new KCM namespace for standalone launch
After commit c1d0aa18, the namespace where the KCM is installed
changed to `plasma/kcms/systemsettings/`.

We need to point to this new plugin location when the KCM is
launched via Alt-F3 > "Window Specific Properties"

Also let's set the full plugin location from CMake instead of
harcoded in C++ so it is easier to keep it in sync.

BUG: 454066
FIXED-IN: 5.25.0
2022-05-21 04:31:10 +00:00
Aleix Pol
14aefcb373 xkb: Explain mystery constant
While looking at xkb code I found what this + 8 meant, figured we better
include it in our code so it feels less magical.
2022-05-20 23:10:57 +00:00
Aleix Pol
da8ad3201b xdg_activation_v1: Improve internal API
Be explicit about how we only request privileged tokens internally in
KWin.
2022-05-20 16:36:55 +00:00
Xaver Hugl
13dd31d98a effects/windowview: allow closing windows with touch 2022-05-20 12:50:15 +00:00
David Edmundson
e23c3a69d9 [Effects/blend] Let fullscreen effects take priority
The Blendchanges effect works by showing a snapshot of the current
screen for a few ms. Any other active full screen effect will look
broken, so it should take priority.

This is pre-empting an issue with a new Plasma feature that syncs
colours to wallpapers. Once we animate activity switches / have per
desktop wallpapers it'll glitch out.
2022-05-20 08:15:22 +00:00
Alexander Lohnau
af18335a0d Add missing NoDisplay=true to KCM desktop files
We want those to be shown when they are explicitly pinned, but
not in the normal app search/overview.

Fixes https://invent.kde.org/teams/plasma-mobile/issues/-/issues/154#note_452861
2022-05-19 18:23:06 +02:00
Vlad Zahorodnii
efece0a300 effects/windowview: Add ability to deactivate the effect by hitting the same screen edge
In present windows, you could hit the same screen edge that you use to
activate the effect in order to deactivate it.
2022-05-19 15:14:28 +00:00
Vlad Zahorodnii
843b3cfb2a effects/screenedge: Move it forward in the effect chain
Move the screen edge effect earlier in the effect chain so QML effects
can render their contents first, then draw screen edge glow.
2022-05-19 14:11:05 +00:00
Kai Uwe Broulik
a2c91f9434 backends/x11: Cleanup KWinXRenderUtils and move it to eglx11common
The XRender backend has been removed, leaving most of KWinXRenderUtils unused.

The few features that are still used, notable `XRenderPicture` and pict format
are moved into the x11/common directory.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-05-19 12:10:18 +00:00
Xaver Hugl
0bbd4445f2 backends/drm: fix offset cursor
For some reason with legacy the cursor gets an offset when changing the
image. In order to work around this, directly issue a cursor move with the
corrected position when changing the buffer
2022-05-19 09:43:27 +00:00