Commit Graph

18465 Commits (master)

Author SHA1 Message Date
Aleix Pol b2f30e7d7d testScreenEdges: no need to wait twice for Screens::changed
Now ::init does it and we don't need to account for it from test cases
2020-09-03 11:23:06 +02:00
Bhushan Shah 9fc09b9a32 virtualkeyboard: update the input panel state when textinput requests it
v1, v2 and v3 protocols supports the update/commit state methods for the
text-input protocol, use it to commit the input method state
2020-09-03 09:08:54 +00:00
Bhushan Shah f93af91327 virtualkeyboard: remove unused event overrides
Previously qtvirtualkeyboard was integrated weirdly so that it was
acting as the focus object and proxy for input methods, however now that
we support proper input methods, this code is totally unused and it is
confusing to have it here, so just drop it

See: f26f2fe181 for the reference of the
code deleted.
2020-09-03 09:08:54 +00:00
Bhushan Shah 97c0270cd3 Send surroundingText and content hints/purpose to inputmethod
Previously we were either sending out this information to InputMethod of
the QApp (i.e kwin itself) which is no longer case since we switched to
using the proper wayland protocol instead of the qtvirtualkeyboard
inside the kwin.

This fixes the issue with the weston-keyboard at least that in field
which accepts digits it shows the keyboard with digit layout. I still
have some issues with maliit-keyboard but that might be bug on the
maliit-keyboard side.
2020-09-03 09:08:54 +00:00
l10n daemon script 3c756a44d1 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"
2020-09-03 06:07:27 +02:00
Vlad Zahorodnii 848f7f3177 Revert "plugins/drm: Link against Wayland::Server"
This reverts commit efb9e0edb2.

libwayland-server is now in the link interface of kwayland-server.
2020-09-02 19:31:29 +03:00
Vlad Zahorodnii efb9e0edb2 plugins/drm: Link against Wayland::Server
We need to link against Wayland::Server because the EGL Streams protocol
wrapper uses wl_array in its public API.
2020-09-02 16:10:25 +00:00
Aleix Pol 5903c5be09 Fix testScreenEdges for good
Don't call kwinApp, because we are not on one.
The correct way to mock the geometries is by using the MockScreens,
which is already used in this test.
2020-09-02 18:05:53 +02:00
Aleix Pol 6d59c0b4e5 Small TestScreenEdges simplification 2020-09-02 15:15:03 +02:00
Aleix Pol b92b0b0a7c Fix testScreenEdges test with ASAN
Removes unnecessary check
2020-09-02 15:15:03 +02:00
Vlad Zahorodnii f55ae15788 Remove unused wayland-cursor.h includes 2020-09-02 15:59:36 +03:00
Vlad Zahorodnii b8a16d4abf xwayland: Properly handle xcb_connect_to_fd() failures
xcb_connect_to_fd() will never return a NULL pointer, even if an error
has occurred.

Right after creating an xcb connection, xcb_connection_has_error() needs
to be called in order to determine if the connection has an error.
2020-09-02 12:49:44 +00:00
Vlad Zahorodnii bfcf312e37 Drop unused libwayland-cursor dependency
KWin doesn't need libwayland-cursor since cb7a9456c0.
2020-09-02 14:37:27 +03:00
Aleix Pol f5a75e70dc Fix ASAN warning
Don't leak the MockWorkspace, no other test does.
2020-09-02 13:13:33 +02:00
Aleix Pol 2d1f276c2c Fix warning
Don't include the moc of a file without Q_OBJECT
2020-09-02 13:13:33 +02:00
Vlad Zahorodnii 12e428bd33 plugins/windowsystem: Adjust installation path
${PLUGIN_INSTALL_DIR}/kf5/org.kde.kwindowsystem.platforms/ is now an
obsolete installation destination for KWindowSystem platform plugins.
2020-09-01 22:44:11 +03:00
Vlad Zahorodnii 889814a8cc Fix a typo 2020-09-01 20:21:17 +03:00
Aleix Pol 9750a38069 test: add test for edges on mostly overlapping outputs
Inspired in commit b2a44fb08aa140646c879226ee82509aa201ec11 by Roman
Gilg <subdiff@gmail.com> in kwinft.
2020-09-01 14:39:36 +00:00
Roman Gilg 001761cea2 fix(space): check edges for nearly complete screen overlap
When two outputs are positioned on top of each other in a way that one covers
most of the height or width of the onter one with exception of a small gap this
gap might be too small to later on substract the orner offset and stay
positive. In this case do not create the edge at all.

The screen edges test passes again.
2020-09-01 14:39:36 +00:00
David Edmundson 8303a4cdf8 Make GL Context current when deleting lanczos textures in timer hander.
A timer could have fired at any time. We process mulitple QtQuickViews
on timers which change the GL context.

Deleting a kwin GLTexture calls glDeleteTextures/glDeleteFramebuffers.

Surprisingly I haven't seen a crash report from this, but it doesn't
look right.
2020-09-01 09:13:00 +00:00
Nicolas Fella 0f588c256c Drop empty X-KDE-PluginInfo-Depends
The whole concept is almost unused and there's no point in having it there but empty

See also https://phabricator.kde.org/T13553
2020-09-01 09:11:48 +00:00
Marco Martin 97f4712f29 Fix size restore upon keyboard close in XdgSurfaceClient
in XdgSurfaceClient setFrameGeometry is async,
so we can't rely on it having the final value immediately.
make setVirtualKeyboardGeometry a virtual.
in the implementation on setVirtualKeyboardGeometry
use requestedFrameGeometry() instead of frameGeometry()
2020-09-01 08:58:46 +00:00
Vlad Zahorodnii f894976e2e xwayland: Don't start Xwayland if it's already running
If the Xwayland server is being started or has already been started, do
nothing in the start() function. Normally, we would never encounter such
situation, but if we do, this check will be very useful in preventing
hitting undefined behavior in the compositor.
2020-09-01 09:39:00 +03:00
Vlad Zahorodnii a6ff3001c8 xwayland: Send a notification when Xwayland crashes
Send a notification when Xwayland crashes to provide the user some
feedback regarding why all X11 clients have disappeared.
2020-09-01 06:16:02 +00:00
Vlad Zahorodnii 432cfb44c0 xwayland: Restart the Xwayland server after it has crashed
If the Xwayland process has crashed due to some bug, the user should
still be able to start applications in Xwayland mode. There is no reason
to restart the whole session just to be able to launch some application
that doesn't have native support for Wayland.
2020-09-01 06:16:02 +00:00
Vlad Zahorodnii b2792ae3cd effects/slidingpopups: Properly clip windows
The region that we pass to the next paintWindow() cannot be larger than
the one that we've received. If an effect passes a larger region, the
tracked buffer damage will be messed up and user will see all sorts of
visual artifacts.
2020-09-01 06:12:39 +00:00
Vlad Zahorodnii ed113171f3 effects: Disable blur and contrast effect when screen is locked
The results of the blur and the background contrast effect will never
be seen if the screen locker is active.

In order to avoid wasting computational resources, we could temporarily
disable the blur effect until the screen is unlocked.

Furthermore, given that the blur effect shrinks the clip region, it is
guaranteed that the compositor will have to render the desktop window
behind the lockscreen window. With this change, all windows behind the
screen locker will be properly clipped away.
2020-09-01 06:12:01 +00:00
Laurent Montel 87ff6e4b44 Port away from deprecated Qt::MidButton 2020-09-01 07:14:58 +02:00
Vlad Zahorodnii afdd5b84c7 effects/blur: Remove leftovers after blur cache
The original purpose of m_damageArea was to indicate which region of the
blur cache became dirty and needs to be updated. However, we no longer
need to keep track of damaged area since the blur cache was removed.
2020-08-31 23:14:14 +03:00
Alexander Lohnau 0d3c20d386 Clear plugins after changing KNS entires
BUG: 382136
FIXED-IN: 5.20
2020-08-31 06:35:42 +00:00
Nate Graham 5ba3793cf9 [kcmkwin/kwinoptions] Add option to disable window position memory for KDE apps
This adds a setting to the window options KCM to disable KDE apps
remembering their own window positions on X11, and instead always use
the KWin placement modes.

The setting sets an option in `kdeglobals`, rather than kwinrc, as it is not
a KWin-specific option *per se*. The UI is also hidden on Wayland, as it it
not relevant there because the functionality it disables does not work on
Wayland. Instead, remembering window positions will eventually be implemented
in a different way and affect all windows, not just KDE windows.

See https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/14 for
more details.

CCBUG: 415150
2020-08-28 16:43:51 +00:00
Alexander Lohnau 4e481d0e66 Add uninstall button for kwin scripts
BUG: 315829
FIXED-IN: 5.20
2020-08-28 15:32:44 +00:00
Alexander Lohnau bde274eb70 Fix KNS deprecations 2020-08-28 15:22:17 +02:00
Vlad Zahorodnii 472b5e7f9e autotests: Fix the license header in a test 2020-08-28 11:11:09 +03:00
Alexander Lohnau b73db9fd6b Port knsrc file to explicit syntax for kpackage 2020-08-27 08:41:10 +00:00
Adrien Faveraux 788c65d260 Fix Build Warning 2020-08-26 19:24:02 +02:00
Vlad Zahorodnii d97f12c1c6 wayland: Expose tiled state to xdg-shell clients
A client-side decorated window could use this information to improve
management of edges, for example by providing inset resize handles, etc.
2020-08-24 20:49:40 +03:00
Vlad Zahorodnii 0dda9dc7d0 Use namespace kwin only in autotests
In kwin core, we prefer not to put `using namespace KWin` because it
makes defining forward declared classes more trickier.
2020-08-21 22:06:36 +00:00
Méven Car 571ca776c3 Screenshot effect: Convert a couple foreach loops 2020-08-21 16:33:32 +00:00
Nicolas Fella fb118a9343 Expose the toplevel's pid in the scripting API
This allows scripts to obtain the process behind a window, which can be useful for doing app-specific things in a script.
2020-08-21 15:44:52 +02:00
Vlad Zahorodnii 90b53f416c Use universal helper for writing toplevels to QDebug streams
Toplevel::debug() is one of annoyances that you need to deal with when
implementing a new client type. It can be tempting to just write "this"
to the stream, but it will result in a crash.

In order to make implementing new client types easier, this change
introduces a debug stream insertion operator overload that works for all
kinds of the Toplevel class.
2020-08-21 11:42:53 +00:00
Vlad Zahorodnii 29afd62e9c Evaluate window rules only if they are supported
There is no point for evaluating window rules for popups and internal
clients.
2020-08-21 11:42:17 +00:00
l10n daemon script 72eb1153db 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"
2020-08-21 06:15:23 +02:00
Vlad Zahorodnii 3e9b722f8c Explicitly indicate support for window rules
This way it's more difficult to overlook the case where a new client
type unexpectedly advertises that it supports window rules.
2020-08-20 16:18:59 +00:00
Andrey Butirsky cba895e723 fix: keyboard layout applet doesn't show actual layout
BUG: 425343
2020-08-20 16:09:43 +00:00
Vlad Zahorodnii 925bb4eea3 Adapt to XdgOutputManagerV1 changes 2020-08-20 17:53:10 +03:00
Vlad Zahorodnii 05e62f5559 Don't override irrelevant methods in InputPanelV1Client 2020-08-20 13:56:42 +03:00
Vlad Zahorodnii 9a04442781 Add default handler for screen edge based activation
This change adds a default handle for screen edge based activation in
order to reduce the amount of boilerplate in client sub-classes that do
not support features such as auto-hiding, e.g. popups.
2020-08-20 12:49:59 +03:00
Vlad Zahorodnii b36b3c67d1 Provide default implementation for noborder functionality
This change adds a default implementation for no border functionality
in order to reduce the amount of boilerplate code in client sub-classes
that have no support for server-side decorations.
2020-08-20 12:49:57 +03:00
Vlad Zahorodnii 74da0bb701 Provide default implementation for AbstractClient::updateDecoration()
Not all client types support server-side decorations, for example it's
typically the case for popup windows. This change provides a default
implementation for the updateDecoration() method in order to reduce the
amount of boilerplate code in client types that have no support for ssd.
2020-08-20 12:48:00 +03:00