Commit graph

19322 commits

Author SHA1 Message Date
Aleix Pol
a3d32fa836 Ensure we start our tests with wayland already initialised
When debugging modifier_only_shortcut_test in _waylandonly mode I saw
that it was failing, among other things, because some aspects were not
initialised.

This changes every test we have to run the new
Test::initWaylandWorkspace() that calls waylandServer()->initWorkspace()
but also makes sure that WaylandServer::initialized is emitted before we
proceed.
2021-05-10 12:33:43 +00:00
Vlad Zahorodnii
7261bbb230 Fix bad QObject::connect() argument
This fixes the warning that's printed when InputMethod tries to connect
the frameGeometryChanged signal of a null toplevel.
2021-05-09 22:45:27 +00:00
l10n daemon script
213c98213a 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"
2021-05-09 01:20:52 +00:00
l10n daemon script
baf3ddea72 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"
2021-05-08 01:17:47 +00:00
Aleix Pol
c544d4f297 slide effect: remove redundant code 2021-05-08 00:37:52 +00:00
Vlad Zahorodnii
77091f7fcb Remove manual discardWindowPixmap() calls in InternalClient
SurfaceItemInternal will discard the current pixmap if the buffer size
changes. Also, one of the goal of the scene redesign is to keep things
such as this out of Toplevel subclasses.
2021-05-07 17:34:31 +00:00
Bhushan Shah
119b00f896 inputmethod: use output geometry for positioning keyboard when locked
otherwise it will take the panel strut in account when positioning
inputmethod on lockscreen and that will not be positioned correctly.
2021-05-07 14:18:57 +00:00
Vlad Zahorodnii
aeca1af4ac Propagate correct maximize mode to decorations
When the maximize mode changes from MaximizeFull to either
MaximizeHorizontal or MaximizeVertical, (max_mode & MaximizeFull) will
evaluate to true because MaximizeFull is defined as bitwise OR between
MaximizeHorizontal and MaximizeVertical.
2021-05-07 14:18:04 +00:00
Aleix Pol
b9b349caa2 Mark deprecated API as deprecated
We'll hardly port away from it if it's just on the documentation. At the
moment they're used all over the place.

If they didn't have a replacement, they should be undepreprecated.
2021-05-07 13:11:26 +00:00
l10n daemon script
64b4caae95 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"
2021-05-07 01:17:26 +00:00
Vlad Zahorodnii
018177b576 Limit VRR policy in support information only to Wayland session
Adaptive sync is only supported on Wayland.

BUG: 436623
2021-05-05 16:55:18 +03:00
Jan Grulich
caaabf84df Screencast: use dma-bufs only when client explicitly asks for it 2021-05-05 10:01:49 +02:00
Vlad Zahorodnii
5739603145 autotests: Fix kglobalaccel integration
Starting with 48c3376927e5e9c13377bf3cfc8b0c411783e7f3 in kglobalaccel,
KGlobalAccel won't work in desktop environments other than Plasma.

We need to set XDG_CURRENT_DESKTOP=KDE to ensure that global shortcuts
still work.
2021-05-05 09:16:58 +03:00
Vlad Zahorodnii
a0fc0277a7 wayland: Make fullscreen mode updates async
Currently, the fullscreen state is update synchronously, but it needs to
be done in asynchronous fashion.

This change removes some tests as they don't add any value, testFullscreen()
covers them all.
2021-05-05 06:11:42 +00:00
Vlad Zahorodnii
62500acd1a effects/fullscreen: Rewrite the effect using ES6 features
This is to keep the fullscreen effect in sync with the maximize effect.
2021-05-05 06:08:42 +00:00
Friedrich W. H. Kossebau
7b36c6443e Port away from ECMSetupVersion's deprecated *_VERSION_STRING CMake variable
GIT_SILENT
2021-05-04 23:45:34 +00:00
Aleix Pol
4aefbdd175 --warning 2021-05-04 23:07:16 +02:00
Xaver Hugl
5bd938f0f0 platforms/drm: release gbm buffers before eglDestroySurface
BUG: 436500
2021-05-04 17:36:09 +00:00
Adriaan de Groot
49fcadb185 Fix build on 32-bit systems
The added comment explains it all, really: you can't fit a 32-bit
unsigned into a 32-bit (signed) time_t, but we don't care.
2021-05-04 12:34:07 +00:00
Xaver Hugl
bd4a8be319 platforms/drm: fix DrmOutput::updateMode 2021-05-04 10:01:55 +00:00
Vlad Zahorodnii
073b6efc14 wayland: Fix focus follows mouse policy
We want to update the input focus only if the pointer is moved. Due to
that, AbstractClient::enterEvent() checks the last seen pointer position
to decide whether the window needs to be focused.

The issue is that when the pointer moves from a decoration to a surface,
the cached pointer position will be updated to the current pointer
position, and thus the check in AbstractClient::enterEvent() will fail.

We need to update the cached pointer position only if there is a focused
decoration.
2021-05-04 09:41:22 +00:00
Vlad Zahorodnii
b4987a9100 3rdparty: Synchronize xcursor.c with upstream 2021-05-04 09:40:29 +00:00
Nate Graham
85d9efcec7 [kcmkwin/kwindecoration] Make a bit more room for the decoration buttons 2021-05-03 21:42:05 -06:00
Nate Graham
2157e83bfb [kcmkwin/kwindecoration] Use clearer text for "Menu" decoration button 2021-05-03 21:35:27 -06:00
l10n daemon script
84c2e4662e 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"
2021-05-04 01:16:46 +00:00
Vlad Zahorodnii
3af5e9c8c4 effects/screenshot: Fix a typo
grabPointerImage() needs the coordinates of the top left corner of the
screen, not its size.
2021-05-03 20:54:09 +03:00
Xaver Hugl
089134d0bd platforms/drm: GPU power management
When a GPU has no outputs attached we need to release all resources and
close the fd to allow the driver to completely power down the GPU. This
is also required to allow the driver to be unloaded for VFIO.
2021-05-03 18:03:09 +02:00
Alexander Lohnau
f881170a1e
GIT_SILENT Add auto generated files to .gitignore 2021-05-03 14:58:25 +02:00
Vlad Zahorodnii
403a04fe24 wayland: Fix loading of HiDPI cursors
Xcursors don't support hidpi so if a hidpi cursor is needed, kwin will
scale the desired size by the scale factor and ask Xcursor helpers to
load a theme with the given name and the size.

However, the theme loading code doesn't take into account that Xcursor
theme loading helpers may not return cursor sprites of size size * scale
if the theme has no such a size.

For example, if the cursor theme only provides 24, 36, and 48 sizes and
kwin attempts to load cursors of size 48 with a scale factor of 2, we
will get cursors of size 48 instead of 96. Unfortunately, this will
result in the issue where the cursor shrinks when hovering decorations
because kwin doesn't know that the effective scale factor (1) is
different from the requested scale factor (2).

In order to fix loading of HiDPI cursors, we need to approximate the
effective scale factor of every cursor sprite as we load it.
2021-05-03 10:52:25 +03:00
Vlad Zahorodnii
7397364115 scripting: Deprecate WorkspaceWrapper::screenResized
The WorkspaceWrapper::screenResized() signal relies on the QDesktopWidget
class, which is deprecated. Another issue with that signal is that it
uses integers to represent screens. We need to minimize the amount of int
based screen api and prefer more QScreen or AbstractOutput APIs because
the former get completely broken if the output layout changes.

Since we gain not a lot from porting WorkspaceWrapper::screenResized()
away from QDesktopWidget to something else and we don't use this signal
in any of our scripts, this change deprecates the screenResized signal
in favor of manual tracking of QScreen::geometryChanged signal.
2021-05-03 07:50:27 +00:00
Bhushan Shah
d987b94e42 inputmethod: do not deactivate the context when key is pressed
When keyboard_grab is implemented, if we reset the inputmethod context
on any key, input method will not get keyboard input and will not be
able to use it.
2021-05-03 09:44:27 +05:30
l10n daemon script
31cdb8676d 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"
2021-05-03 01:21:56 +00:00
Vlad Zahorodnii
a503efad45 Fix a typo
There is no matching opening parenthesis but the effect still works for
some reason.
2021-05-02 14:42:48 +03:00
Vlad Zahorodnii
411443bc05 effects/fade: Add a note reminding to remove FadeWindows option 2021-05-02 11:10:19 +00:00
Vlad Zahorodnii
24a474cb6c effects/fade: Rewrite the effect using ES6 features
This cleans up the code of the effect.
2021-05-02 11:10:19 +00:00
Vlad Zahorodnii
9fb58479b7 effects/scale: Rewrite the effect using ES6 features
Since the scripted effects were ported to QJSEngine, it's possible now to
use ECMAScript 2015 perks such as classes, let and const.

This change ports the scale effect to some ES6 features to make the code
neater.
2021-05-02 11:09:27 +00:00
Vlad Zahorodnii
db020c5614 effects/maximize: Rewrite the effect using ES6 features
Since the scripted effects were ported to QJSEngine, it's possible now to
use ECMAScript 2015 perks such as classes, let and const.
2021-05-02 11:08:13 +00:00
Xaver Hugl
6a9d82eb55 don't set vrr policy on incompatible monitors 2021-05-02 00:06:39 +00:00
Ömer Fadıl Usta
a8d7e99874 [plugins/platforms/drm/drm_backend] Fix build for bsd 2021-05-01 19:43:00 +00:00
Vlad Zahorodnii
8d9e47ee22 platforms/drm: Introduce KWIN_DRM_DEVICES
This allows to instruct kwin what drm devices must be used explicitly.

BUG: 435467
2021-05-01 12:14:34 +00:00
l10n daemon script
23e3a9a86f 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"
2021-05-01 01:21:12 +00:00
Aleix Pol
904c48d563 inputmethod: properly report the text_input_v2 overlap information
Call ::updateInputPanelState when necessary (instead of a trimmed-down
refreshFrame version.
Actually provide the overlap information when it's available, there's no
need to send wrong information there.
2021-04-30 17:46:52 +02:00
Xaver Hugl
faddf0bf5f Wayland: variable refresh rate support
BUG: 405912
2021-04-30 16:18:39 +02:00
Nate Graham
2a6fe9748f [kcmkwin] Apply grid delegate KCMs on double-click
To be consistent with plasma-workspace KCMs which we applied this to in
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/606
2021-04-29 20:14:05 -06:00
Vlad Zahorodnii
706eb16b3a Remove Platform::screenGeometries and Platform::screenScales
If you need screen geometries or scales, use AbstractOutput::geometry()
and AbstractOutput::scale(), respectively.
2021-04-29 11:31:31 +00:00
Aleix Pol
cadb13de0e inputmethod: fix how we update to input method changes
Properly notify about changes from the kcm and properly integrate them.
So far it only worked between having and not having a keyboard.
2021-04-29 11:04:19 +00:00
Aleix Pol
baa246fbb7 inputmethod: improve the integration of the SNI
* Adds a context menu to choose virtual keyboards.
* Notifies when there is no virtual keyboard selected.
2021-04-29 11:04:19 +00:00
Aleix Pol
050ce24247 inputmethod: Move the input method process into the InputMethod class
Use the control this gives us for stopping the input method process when
we disable.
2021-04-29 11:04:19 +00:00
Vlad Zahorodnii
ac3c09ba75 Remove Platform::areOutputsEnabled()
This flag is redundant. If an output is disabled, the compositor won't
attempt to perform compositing on it.
2021-04-29 10:47:41 +00:00
Vlad Zahorodnii
f8c00a530f Remove Platform::prepareShutdown()
Platform::prepareShutdown() was introduced to work around the issue
where the platform accesses destroyed OutputDeviceInterface objects.

Since we no longer query OutputDeviceInterface for output info, the
Platform::prepareShutdown() function can be dropped.
2021-04-29 10:47:41 +00:00