16701 Commits (204a05fef82eede2fb2d79ec051668a1f42886cc)
 

Author SHA1 Message Date
Bhushan Shah 533f43ad02 Make it easier to debug the virtualkeyboard
Summary:
Provide the important debug messages which can be used to debug why
virtualkeyboard is not starting.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17454
6 years ago
Shubham Jangra 16e904592a Remove comparison between signed and unsigned integer expressions warning 6 years ago
l10n daemon script da6b89dda0 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"
6 years ago
l10n daemon script 982d7cc438 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"
6 years ago
Vlad Zagorodniy 3956d6ab4a [autotests] Fix failing of testDontCrashReinitializeCompositor
Summary:
Currently, testDontCrashReinitializeCompositor is unstable because it
doesn't take into account that effects can be loaded asynchronously.

In general, we don't need all default effects in this test, so let's
disable them.

Test Plan: This should fix ASan issues.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17386
6 years ago
David Edmundson 576c667124 Avoid deleting ourselves midway through updateShadow
Summary:
If updating a shadow means that there should be no shadow, shadow ends
up deleting itself midway through the method.

It's cleaner and safer to leave that to the caller.

This new change matches the existing documentation for
Shadow::updateShadow which states

> In case the Property has been withdrawn the method returns @c false.
> In that case the owner should delete the Shadow.

Test Plan:
Created an ASAN of kwin
Relevant testMaximised no longer fails

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17380
6 years ago
Vlad Zagorodniy 90a26e2e8d Try to invalidate quad cache when shadow is changed
Summary:
213239a0ea tried to address the case when
a wayland client gets shadow after it was mapped, but because of poor
testing from my side, another bug was introduced. If a decoration tooltip
or the user actions popup is shown, then in some cases it can be blank.

Usually, SurfaceInterface::shadowChanged proceeds SurfaceInterface::sizeChanged,
so when the shadow is installed, window quads cache is rebuilt. But
because shell client already knows the geometry of the internal client,
goemetryShapeChanged is not emitted, thus the cache is not updated.

It would be better just to invalidate the cache when the shadow is
installed, uninstalled, or updated. This reduces the number of
unnecessary invocations of Scene::Window::buildQuads and also moves
handling of the window quads cache away from the Shadow class.

BUG: 399490
FIXED-IN: 5.15.0

Test Plan: Decoration tooltips are no longer blank.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17215
6 years ago
Yuri Chornoivan 6f982e88a0 Fix minor EBN issues in the Doxygen code 6 years ago
Shubham Jangra 2a1a0e4280 Use override 6 years ago
Vlad Zagorodniy 05c9b1adc2 Update about data
Summary:
Currently, --about doesn't have any effect. In addition to that, the about
data contains outdated information.

This change hopefully addresses all previously mentioned issues.

Test Plan: Ran kwin_wayland --author.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17319
6 years ago
l10n daemon script bec589fedc 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"
6 years ago
Roman Gilg a23368d638 Add Wayland touch drag and drop support
Summary:
Use the new functionality in KWayland to support drag and drop via touch
screens.

Either a drag and drop session with pointer or touch is possible, but not
both at the same time. Pointer/touch gets deactivated if a touch/pointer
drag and drop session is active.

Test Plan: Manually.

Reviewers: #kwin, davidedmundson

Subscribers: davidedmundson, alexde, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15466
6 years ago
Roman Gilg 2e29711323 Rework InputDeviceHandler focus tracking
Summary:
This patch aims at improving the Toplevel, internal window and decoration
focus tracking.

In detail the goals are:
* Clean tracking of beneath and focus Toplevel as well as decoration and
internal windows. Splitting this up in well defined sub routines.
* Minimal find Toplevel operations on window stack.
* Reduce code duplication in pointer and touch child classes.
* Reuse tracking in drag operations.
* Allow direct usage of Wayland input interfaces for decoration and internal
windows in the future.
* Update touch focus on external events like VD switches correctly.

Test Plan: Manually and existing autotests.

Reviewers: #kwin

Subscribers: kwin, zzag

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15595
6 years ago
Roman Gilg eab71a8a19 Privatize variables in InputDeviceHandler
Summary:
Some members were declared protected. Better style is to have them private
with public or protected getters and setters.

This also removes the unnecessary m_input variable.

Test Plan: Builds and runs.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15519
6 years ago
Roman Gilg b5a91cdfe0 Float position values in drag input filter
Summary:
We lost information when using QMouseEvent::globalPos, since
it is integer. Use instead InputRedirection::globalPointer,
which is updated before the filters are processed and is
float.

Test Plan: Manually.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: anthonyfieroni, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15502
6 years ago
Vlad Zagorodniy 295138145c Make sure that effect windows outlive effects
Summary:
Compositing is suspended/finished in a very hard way fashion, effect
windows are destroyed without notifying effects about it.

AnimationEffect tries gracefully release deleted windows, but because
in some cases(like when suspending compositing) a deleted window can
be already destroyed, a segmentation fault can happen.

This change adjusts the order in which effect windows and effects are
destroyed, so AnimationEffect (and other effects) cannot access dangling
pointers.

BUG: 400788
FIXED-IN: 5.15.0

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17311
6 years ago
Vlad Zagorodniy 3ad5604580 [scenes/opengl] Cleanup cached decoration shadow textures when suspending compositing
Summary:
When suspending compositing, SceneOpenGLShadow cannot cleanup cached
decoration shadow textures because the effects handler is already gone.

This sometimes can result in a crash when running kwin_x11 --replace
(we're hitting an assert statement).

To fix that, let's use the scene instead of the effects handler for
making the OpenGL context current.

Test Plan:
No longer hit the assert statement:

    ASSERT: "m_cache.isEmpty()" in file /home/vlad/Workspace/KDE/src/kde/workspace/kwin/plugins/scenes/opengl/scene_opengl.cpp, line 2025
    Application::crashHandler() called with signal 6; recent crashes: 1
    QCoreApplication::applicationFilePath: Please instantiate the QApplication object first
    KCrash: crashing... crashRecursionCounter = 2
    KCrash: Application Name = kwin_x11 path = /home/vlad/Workspace/KDE/usr/bin pid = 5407
    KCrash: Arguments: /home/vlad/Workspace/KDE/usr/bin/kwin_x11 --replace

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17306
6 years ago
l10n daemon script 64cf1afa9f 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"
6 years ago
Martin Flöser 37060a6dd9 Add command line option no-lockscreen to disable lock screen integration
Summary:
WaylandServer provides the initialization flag to disable lock screen
integration. This couldn't be used yet as there is no command line flag
for it. This change adds a new command line argument and hooks up the
functionality.

The no lock screen integration is useful for the embedded use case where
KWin is just used to render one application.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17279
6 years ago
Vlad Zagorodniy 8c70600f13 [effects] Clean up effect_order in unloadAllEffects
Summary:
EffectsHandlerImpl::unloadAllEffects can be very useful when writing
tests, e.g.:

    auto effectsImpl = qobect_cast<EffectsHandlerImpl *>(effects);
    QVERIFY(effectsImpl);

    effectsImpl->unloadAllEffects();
    QVERIFY(effectsImpl->loadEffect(QStringLiteral("kwin5_effect_foobar")));

but because unloadAllEffects doesn't clean up effect_order, the old
effects can be re-added back into loaded_effects when a new effect is
loaded. Such behavior can result in a segfault.

Test Plan: Existing tests pass.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17283
6 years ago
Martin Flöser 3ad9ac7229 Introduce the concept of an internal window system independent id
Summary:
For supporting Wayland windows in the kwin_rules_dialog we need a way to
pass a window id for Wayland windows to the dialog. This id needs to be
sent to the dbus interface to query window information just like the
interactive query. For Wayland windows we don't really have a window id
and it would require to also pass the windowing system to
kwin_rules_dialog and back through the dbus interface.

To not complicate things this change introduces a windowing system
independent id based on UUID. This could in future also be used
internally for areas where it's window id based and used in both
windowing systems.

Test Plan: Adjusted test cases to verify the uuid is generated and passed to Deleted

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16986
6 years ago
Martin Flöser f8459a71cc Switch lockscreen test to OpenGL
Summary:
Main reason for using QPainter was the fact that build.kde.org did not
support OpenGL back when the test got introduced. As we have vgem
support nowadays we can switch back to OpenGL.

Test Plan:
100% tests passed, 0 tests failed out of 130,
but the test is flaky with and without this change

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16940
6 years ago
Martin Flöser 98ddb93dfe Unset all env variables related to KDE session in integration tests
Summary:
When running ctest in my session a few OpenGL/waylandonly tests crashed
on tear down. This does neither happen on build.kde.org nor when running
ctest in a tty. Comparing the env variables of tty and session pointed
to the session variables. Unsetting those makes the test not crash. This
makes sense as e.g. plasma-integration no longer gets loaded.

As our test suite is intended to test KWin and not plasma-integration or
gnome integration we should have a clean and reproducable environment,
so the variables are unset.

Test Plan: 100% tests passed, 0 tests failed out of 130

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16939
6 years ago
Martin Flöser 260646ed62 Delete kglobalshortcutsrc before executing a test
Summary:
When running the complete test suite the ScriptedEffectsTest::testShortcuts
registers the shortcut meta+shift+y. But GlobalShortcutsTest::testX11ClientShortcut
also tries to use this shortcut for a window shortcut which fails if it
is already registered. So when running the complete test suite it
depends on the order of execution whether the GlobalShortcutsTest passes
or not.

Test should be clean - also the globalshortcuts. As the config is read
from test directory anyway, we can delete the file prior to init of
kglobalaccel.

Test Plan: Run ctest, test did not fail anymore

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16932
6 years ago
Martin Flöser fa4f123fba Add button to dynamically resize virtual keyboard
Summary:
One of the things I dislike most about our virtual keyboard integration
is it's size. It's at least on my system covering too much vertical
space. Unfortuantely the keyboard API does not offer a way to control
the vertical space - one can only control the width. Thus it's also not
possible to just provide the keyboard in the optimal size.

This change tries to address the problem by adding a resize button. When
pressed one can dynamically decrease and increase the width of the
keyboard and thus also the height.

The button is added to the top/right corner. Ideally it would be added
to the symbol button row, but either I couldn't find the appropriate API
hooks or it's not possible.

Test Plan: Started KWin with the change and tested with touch input

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16485
6 years ago
Martin Flöser 46eceef299 [opengl] Drop functionality to start kcmshell compositing
Summary:
The idea of opening the compositing kcm was to show a warning. But that
broke quite some time ago without noticing. We had two ways:
 * pass through --args command line argument
 * use dbus call to already open kcm

Neither of the two ways is working. The kwincompositing doesn't parse
the arguments and the dbus interface doesn't exist any more.

Following the advice to remove functionality nobody noticed that it is
broken, this is removed with this change. This probably broke with
introducing the new KCM which happened IIRC for Plasma 5.0.

BUG: 393845
FIXED-IN: 5.14.0

Reviewers: #kwin, #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13235
6 years ago
David Edmundson 69c7146a73 [autotests] Stabilise colorcorrect test
Summary:
It crashes occasionally as the connection thread is still processing events
when the app is tearing down. These changes bring it in line with the
other tests using WAYLANDTEST_MAIN.

Test Plan:
Relevant test now passes.
Ran repeatedl without a crash

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17254
6 years ago
David Edmundson 7834bec52a [libkwineffects] Replace property name lookup with calling the virtual methods
Summary:
EffectWindow proxies its properties from the client/deleted's
properties.

QObject::property(char*) is a slow string search. It's a loop
of string comparisons not a hash lookup!

QML's use of properties is different, there's a property cache.

It's fetched multiple times for every window in every paint of some
effects (such as blur). Hotspot shows this as a significant amount of
the render pass (X11) with nothing in kwin animating.

This patch replaces the macro that does
parent()->property("propertyName")
with a macro calling the relevant function directly without metaobjects.

This also improves type safety for future changes.

Test Plan:
Existing unit tests
Ran it for a bit

Reviewers: #kwin, graesslin

Subscribers: graesslin, zzag, broulik, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16602
6 years ago
l10n daemon script 4985cf2da9 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"
6 years ago
Vlad Zagorodniy 437d35eee2 [wayland] Check presence of the inhibitor object when a client is registered in IdleInhibition
Summary:
Some applications are not able to inhibit the idle behavior because
each of them creates an inhibitor object before the corresponding
ShellClient object becomes ready for painting.

BUG: 401499
FIXED-IN: 5.15.0

Test Plan: idle-inhibit client (from wlroots/examples) works.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17227
6 years ago
Vlad Zagorodniy 3d57324ed2 [effects/fadingpopups] Don't animate KDE Plasma splash screen
Summary:
In order to be compatible with the monolithic Fade effect, this effect
animates special windows (e.g. notifications, etc) as well, but some
of those special windows shouldn't be animated by this effect (e.g.
KDE Plasma splash screen).

Test Plan:
Started new Plasma on Wayland session, the KDE Plasma splash screen
smoothly faded out without flickering/blinking, etc.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17209
6 years ago
l10n daemon script bb810bd717 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"
6 years ago
Jonathan Riddell 732dc07b87 Update version number for 5.14.4
GIT_SILENT
6 years ago
Vlad Zagorodniy 4dc49d496c [kconf_update] Use scripted dim screen effect
Summary:
I forgot to add a kconf update that moves existing users of the builtin
Dim Screen effect to the scripted version of the effect, sorry.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16957
6 years ago
Vlad Zagorodniy 8af6d4f5dc [x11] Emit clientRemoved after client was removed
Summary:
Currently, there is a guarantee that a client, which is about to be removed,
is no longer in the stacking order(both in constrained and unconstrained)
when Workspace::removeClient is called. However, because the client gets
removed from m_allClients after clientRemoved is emitted, it can be
re-inserted back into the stacking order.

In general, the pattern is to do some work and then notify others about
what you've done by emitting a signal. In the case of Workspace::removeClient,
we emit clientRemoved way before the client actually gets removed.

CCBUG: 392412
CCBUG: 400854

Test Plan:
* Enable the following script:

```lang=js
workspace.clientAdded.connect(function (client) {
    if (client.skipTaskbar || client.modal || client.transient) {
        return;
    }
    workspace.desktops = workspace.desktops + 1;
    workspace.currentDesktop = workspace.desktops;
    client.desktop = workspace.currentDesktop;
});

workspace.clientRemoved.connect(function (client) {
    if (client.skipTaskbar || client.modal || client.transient) {
        return;
    }
    workspace.desktops = workspace.desktops - 1;
});
```

* Open an app, close the app.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17069
6 years ago
l10n daemon script a28410d80a 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"
6 years ago
Vlad Zagorodniy 1e73ae4c47 Copy effective window type in Deleted
Summary:
The window type can be adjusted by rules, so we probably would like to have
effective window type instead of direct.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17087
6 years ago
Laurent Montel 24f57310ba Use new syntax 6 years ago
l10n daemon script ba0b34c755 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"
6 years ago
Vlad Zagorodniy e0eceed2e4 [autotests] Test all scripted effects
Summary:
TestPluginEffectLoader and TestScriptedEffectLoader don't check some
scripted effects (eye on screen, morphing popups, and window aperture).

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17072
6 years ago
l10n daemon script 7d5a009aec 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"
6 years ago
Vlad Zagorodniy 3aa3321048 Fix -Wunused-variable
Summary:
Compiler warning message:
    [524/1591] Building CXX object CMakeFiles/kwin.dir/workspace.cpp.o
    /home/vlad/Workspace/KDE/src/kde/workspace/kwin/workspace.cpp: In lambda function:
    /home/vlad/Workspace/KDE/src/kde/workspace/kwin/workspace.cpp:233:47: warning: unused variable ‘otherDesktop’ [-Wunused-variable]
                             const VirtualDesktop *otherDesktop = VirtualDesktopManager::self()->desktops().first();
                                                   ^~~~~~~~~~~~

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17060
6 years ago
l10n daemon script 1f645b4bc5 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"
6 years ago
l10n daemon script 8d005caaae 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"
6 years ago
l10n daemon script b854fd462c 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"
6 years ago
l10n daemon script 0d5cb36b50 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"
6 years ago
l10n daemon script d5638fd898 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"
6 years ago
David Edmundson 6c71403281 [autotests] Hopefully stabilise TestShellClient
Summary:
Apparently this test is flaky, based on the output I recieved we had
processed the un-fullscreen but not the un-maximise.

It seems possible the wayland thread could process when there's only one
request in the queue.

Test Plan:
Couldn't reproduce the original issue, it's a blind patch but the
current tests still pass.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16955
6 years ago
Vlad Zagorodniy 01b75b39bb [effects/fadedesktop] Rewrite it
Summary:
The primary reason for rewriting this effect was to clean up code and
fix spawning of multiple animations for a single window when user cycles
through virtual desktops very quickly.

Visually, the rewritten version doesn't deviate from the old version.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16454
6 years ago
Vlad Zagorodniy 0c71f39f19 [effects/dialogparent] React to active full screen effect changes
If a full screen effect has been activated, we need to brighten main
windows because the full screen effect can dim windows on its own
(one such effect is the Present Windows, for example).

If the full screen effect is no longer active, we need to dim main
windows back.
6 years ago