Commit graph

16892 commits

Author SHA1 Message Date
Vlad Zagorodniy
380c93ac19 [platforms/drm] Add DPI connector type
Reviewers: #kwin, apol, davidedmundson

Reviewed By: #kwin, apol, davidedmundson

Subscribers: apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19781
2019-03-19 18:05:15 +02:00
Aleix Pol
d8af2ee566 Rotate cursors also on portrait mode
Summary: Like we do on inverted mode

Test Plan: Not much, because we don't support portrait mode on intel hardware just yet. I can see the cursor properly rotated before drm tells us to fall back to the previous configuration.

Reviewers: #kwin, #plasma, graesslin

Reviewed By: #kwin, #plasma, graesslin

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19710
2019-03-19 16:33:05 +01:00
l10n daemon script
5cba424dc0 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"
2019-03-19 05:59:50 +01:00
Vlad Zagorodniy
56b24f959f [kcmkwin] Properly load effects
Summary:
EffectsModel has to communicate with KWin in order to receive the
actual value of SupportedRole. So, in theory the model should notify
about loaded effects after receiving response from KWin, but that's
not the case.

Test Plan: Desktop Effects KCM no longer flashes when resetting changes.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18728
2019-03-18 13:11:24 +02:00
Vlad Zagorodniy
dc0b11eea7 [kcmkwin] Rename EffectsModel::m_effectsList to EffectsModel::m_effects
Summary: "List" suffix is redundant.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18713
2019-03-18 13:11:07 +02:00
Vlad Zagorodniy
b91cfae308 [kcmkwin] Rename EffectModel to EffectsModel
Summary: Model names have plural form.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18712
2019-03-18 13:10:51 +02:00
Vlad Zagorodniy
dc3bc5f7b7 [kcmkwin] Remove some name duplication in EffectModel
Summary: `effect.effectStatus` looks very weird.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18707
2019-03-18 13:10:33 +02:00
Vlad Zagorodniy
7a28a7442e [kcmkwin] Simplify EffectModel::save
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18706
2019-03-18 13:10:09 +02:00
Vlad Zagorodniy
bc34a9d653 [kcmkwin] Don't discard unsaved changes when reloading effects model
Summary:
If an effect is installed or removed, then all not yet committed changes
will be lost. This is undesired behaviour.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18705
2019-03-18 13:09:44 +02:00
Vlad Zagorodniy
1faa861bd5 [kcmkwin] Add requestConfigure to effects model
Summary:
The main motivation for adding this method is to avoid code duplication.
Both virtual desktops kcm and desktop effects kcm have their own logic
to create configuration dialogs for effects.

On the bright side, if we add support for declarative effect kcms, we
will need to change only this method.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18704
2019-03-18 13:09:03 +02:00
Vlad Zagorodniy
2211a951e7 [kcmkwin] Split out Desktop Effects KCM
Summary:
A while ago desktop effects and compositing settings lived under the
same roof

{F6584639}

{F6584642}

but time has passed and now those two have their own kcms. This causes
some issues:

* for newcomers it's harder to find code of the Desktop Effects KCM;
* git history doesn't look good, e.g. "[kcmkwin/compositing] Add some
  bugs to Desktop Effects KCM to fix later";
* in general, the mix of two doesn't look good in the code.

This change splits out the Desktop Effects KCM. Unfortunately, in order
to have more nicer code I had to refactor EffectModel a little bit.

Before:

{F6584669}

After:

{F6587570}

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, ltoscano, mart, ngraham, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18703
2019-03-18 13:08:32 +02:00
Björn Feber
5eb28512dd Use new window decoration theme icon for the Window Decorations KCM 2019-03-15 14:18:21 +01:00
Vlad Zagorodniy
d0604f99f2 Remove unused constant 2019-03-15 12:46:52 +02:00
Kai Uwe Broulik
bc25e7c474 [kcmkwin/kwindecoration] Use new API to set cell size properly
Thanks to 5cfdbaa4b081a030a01477fd13c20f710fe58d4b in kdeclarative the implicitCellWidth
and implicitCellHeight of the GridView can be adjusted without hacks.

Differential Revision: https://phabricator.kde.org/D19729
2019-03-14 09:34:48 +01:00
Kai Uwe Broulik
50e74c5517 [kcmkwin/kwindecoration] Set implicit size
Ensures the KCM opens with a sane default size when opened standalone via kcmshell

Differential Revision: https://phabricator.kde.org/D19730
2019-03-14 09:34:27 +01:00
Vlad Zagorodniy
8f1b246396 Merge branch 'Plasma/5.15' 2019-03-13 11:46:14 +02:00
Vlad Zagorodniy
0847283793 Merge branch 'Plasma/5.12' into Plasma/5.15 2019-03-13 11:45:43 +02:00
Vlad Zagorodniy
f7af113261 Properly restore current desktop from session
Summary:
VirtualDesktopManager is initialized in two places: Workspace::init and
Workspace::initWithX11. The former method loads virtual desktops from
the config file and the latter method synchronizes VirtualDesktopManager
with RootInfo.

Both methods do

    if (!VirtualDesktopManager::self()->setCurrent(m_initialDesktop))
        VirtualDesktopManager::self()->setCurrent(1);

which makes sense in Workspace::init, but not in Workspace::initWithX11.

When Workspace::initWithX11 is called, the current virtual desktop is
the same as m_initialDesktop. So that piece of code basically makes
the first virtual desktop current no matter what.

BUG: 390295
FIXED-IN: 5.15.3

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19520
2019-03-13 11:45:24 +02:00
Vlad Zagorodniy
99f7be6ddd Merge branch 'Plasma/5.15' 2019-03-13 10:54:51 +02:00
Nerdopolis Turfwalker
93b7eea67d [platforms/fbdev] Use a better way to correct activating framebuffer devices
Summary:
My change in 304528e80b has been reported to
cause issues for PostMarketOS https://gitlab.com/postmarketOS/pmaports/issues/204
I originally submitted the change to activate Framebuffer devices
as secondary framebuffer devices are not on by default, (such as a
secondary DisplayLink device). Changing attributes usually forced
some framebuffer devices to turn on, however I have found a more
accurate way to turn on framebuffer devices, without messing with
the color layout.

Reviewers: #kwin, davidedmundson, graesslin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19663
2019-03-13 10:49:49 +02:00
Jonathan Riddell
f740aa2e4b Update version number for 5.15.3
GIT_SILENT
2019-03-12 09:45:45 +00:00
Vlad Zagorodniy
b106579d0f Move package structure plugins to plugins dir
Summary:
Package structure plugins are not that special so move them to
the corresponding directory.

Test Plan: Compiles.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18685
2019-03-11 10:57:13 +02:00
Vlad Zagorodniy
db1035fa47 Merge branch 'Plasma/5.15' 2019-03-11 09:23:51 +02:00
Vlad Zagorodniy
38e22ce6d1 [platforms/x11] Properly unload effects on X11
Summary:
When Compositor finishes compositing, it destroys EffectsHandlerImpl,
which in its turn tries to unload all effects. But there is a problem...

EffectsHandlerImpl has platform-specific hooks to ungrab keyboard and
also stop mouse interception. Given that any call made to a virtual function
in the destructor of a base class(EffectsHandlerImpl) won't go to a derived
class(EffectsHandlerImplX11), keyboard won't be ungrabbed even if effect
that grabbed it is already gone.

BUG: 399572

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19178
2019-03-11 09:23:24 +02:00
l10n daemon script
0aa9cb1f7a 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"
2019-03-09 05:50:43 +01:00
Vlad Zagorodniy
0984f6ccfd Merge branch 'Plasma/5.15' 2019-03-08 10:39:26 +02:00
Vlad Zagorodniy
a9e469bf13 Properly restore current desktop from session
Summary:
VirtualDesktopManager is initialized in two places: Workspace::init and
Workspace::initWithX11. The former method loads virtual desktops from
the config file and the latter method synchronizes VirtualDesktopManager
with RootInfo.

Both methods do

    if (!VirtualDesktopManager::self()->setCurrent(m_initialDesktop))
        VirtualDesktopManager::self()->setCurrent(1);

which makes sense in Workspace::init, but not in Workspace::initWithX11.

When Workspace::initWithX11 is called, the current virtual desktop is
the same as m_initialDesktop. So that piece of code basically makes
the first virtual desktop current no matter what.

BUG: 390295
FIXED-IN: 5.15.3

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19520
2019-03-08 10:38:46 +02:00
l10n daemon script
1d59d436a5 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"
2019-03-08 08:53:22 +01:00
l10n daemon script
54d236df37 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"
2019-03-08 06:00:16 +01:00
l10n daemon script
6230ca2e4a 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"
2019-03-07 08:45:16 +01:00
l10n daemon script
d92791af07 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"
2019-03-07 05:55:07 +01:00
Kai Uwe Broulik
aaa9c5ecb9 Merge branch 'Plasma/5.15' 2019-03-05 23:01:37 +01:00
Kai Uwe Broulik
2ea6fc2abe [effects/screenshot] Set m_windowMode in screenshotWindowUnderCursor
BUG: 374864
FIXED-IN: 5.15.3

Differential Revision: https://phabricator.kde.org/D19552
2019-03-05 22:59:44 +01:00
Vlad Zagorodniy
456c65fc19 Verify that there is no scene windows when Scene is about to be destroyed
Summary:
When ~Scene is called, it's not guaranteed that backend is still valid
or that there is current opengl context. So, generally speaking,
deleting scene windows in ~Scene is a bad idea.

It's okay not to delete scene windows in ~Scene because current
implementation of Compositor::finish ensures that they don't last longer
than the scene.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19540
2019-03-05 15:19:19 +02:00
Jonathan Riddell
054ba69581 Update version number for 5.12.8
GIT_SILENT
2019-03-05 12:04:52 +00:00
Vlad Zagorodniy
297557bde4 [wayland] Implement belongsToDesktop check
Summary:
When user asks KWin to show desktop, the compositor just raises every
desktop window, it doesn't attempt to minimize normal clients, etc.
Because desktop windows contain stuff like background and icons, the
compositor has to raise all clients that are somehow correlated with
desktop (e.g. panels, etc). Otherwise it would pretty weird to show only
desktop background.

Currently, not all plasmashell's clients are raised when the compositor
shows desktop because belongsToDesktop is not implemented for ShellClient.

BUG: 404801

Test Plan:
* Show desktop;
* Open Kickoff (without this patch Kickoff is not visible).

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19386
2019-03-05 00:54:05 +02:00
Vlad Zagorodniy
82b3e2a63a Resurrect show tooltips option
Summary:
In KDE 4, there was a very handy option to disable decoration tooltips.
Decoration tooltips were lost in transition to KDE Plasma 5, and so
the option.

Given that decoration tooltips were brought back to KDE Plasma 5, "Show
decoration button tooltips" option can be still useful for people(like me)
who may wish to disable them because of personal preference.

Reviewers: #kwin, broulik, mart

Reviewed By: #kwin, mart

Subscribers: ngraham, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19152
2019-03-05 00:38:55 +02:00
Vlad Zagorodniy
10fdf2a220 Discard Deleted before Scene is destroyed
Summary:
Deleted has lifetime bounded to effects and scene.

We can't discard Deleted before EffectsHandler is destroyed because
effects that referenced it may call unrefWindow.

On the other hand, the fact that Deleted may outlive scene doesn't
make sense because Deleted exist purely for animation purposes and
nothing more.

This change arranges lifetime of Deleted so it's more reasonable.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18914
2019-03-04 23:24:42 +02:00
l10n daemon script
d0c9f7285a 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"
2019-03-03 05:40:16 +01:00
Laurent Montel
7b4ef76de6 Remove deprecated method 2019-03-01 08:15:31 +01:00
David Edmundson
768e5fb7f4 [autotests] Fix race condition in ShellClient::testUnresponsiveWindow
Summary:
The test executable "kill" freezes itself after 1ms, supposedly after
showing a window.

However showing a window is not syncronous on wayland, it's illegal to
map a buffer before getting a configure event from the server.

This patch removes any potential for a race by having the server tell
our test executable when to freeze.

Test Plan: Test still passed

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19406
2019-02-28 02:09:33 +00:00
David Edmundson
6ddf50a77b [autotests] Fail faster on test which fails anyway
Summary:
The .wait() in this case isn't really time depdenent, we just need to
process the event loop.

Given we know this tests fails, there's no point me waiting 30s.

Test Plan: Test failed, but faster

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19351
2019-02-28 01:41:16 +00:00
David Edmundson
2bad2b48fe [wayland] Finish initialising ShellClient only when commited to the surface
Summary:
Everything on the wl_surface is double buffered.

When we create an XdgShell toplevel or popup we shouldn't treat it as
attached until it's committed to the surface.

A client should commit the surface after it's sent it's initial state of
the Xdg topLevel; minimumSize, title, app_id, etc.

By blocking sending configure events we will have flushed the correct
initial state before sending a single atomic correct event to the
client. It also adds a hook to re-evaluate rules now that all properties
are set.

Arguably this applies to WlShellSurface too, but I've left it unchanged
as it's deprecated and hard to verify real client behaviour.

Test Plan: Ran all unit tests

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18583
2019-02-26 13:51:28 +00:00
David Edmundson
dc7ea09e8d [autotests] Check the configure request sent to popups
Summary:
We currently check the final position kwin knows about.
This patch also checks the position the popup is told that
it's in as well as acking configure requests correctly.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18955
2019-02-26 13:41:00 +00:00
David Edmundson
56fb507a76 [wayland] Squash reconfigure methods
Summary:
We can handle the case of a null size inside
ShellClient::requestGeometry and that makes that method more robust.

With that we don't need to handle separate code paths in
the handler of RequestGeometryBlocker.

It's not an exact identical code path, but everything still works out.

If the geometry is unchanged, we'll save the positionAfterResize  but
when we apply it doSetGeometry will no-op.

There's also an assumption that toggling maximised will always send a
valid size, but that's true for the current state.

Test Plan: Ran unit tests

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19331
2019-02-26 13:40:54 +00:00
Vlad Zagorodniy
a039f3ba80 [wayland] Send correct current time in the frame callback
Summary:
Currently, each frame callback sent by KWin has the current time in
nanoseconds, but the protocol spec states that we have to send the time
in milliseconds. This is the reason why animations that are driven by
frame callbacks are too fast.

In addition to that, m_timeSinceStart isn't actually "time since start,"
it's rather accumulated duration of all painting cycles. If there is
something to draw and it takes quite a while to compose the scene, maybe
m_timeSinceStart will be close enough to the current time. So, it has
been replaced with QElapsedTimer, this makes the current time correct
and also simplifies code a little bit.

Test Plan: The triangle in weston-subsurfaces no longer spins very fast.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18656
2019-02-26 12:03:57 +02:00
Vlad Zagorodniy
dffd9777c7 [libkwineffects] Make AnimationEffect::AniMap protected
Summary:
We need AniMap only for test purposes so it would be better to make the
typedef protected (and mark as internal as well).

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17833
2019-02-26 11:37:44 +02:00
Jonathan Riddell
efbc95fb81 Update version number for 5.15.2
GIT_SILENT
2019-02-26 09:05:25 +00:00
l10n daemon script
10e0b28626 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"
2019-02-25 05:52:34 +01:00
David Edmundson
5e9023948e [wayland] Keep application startup flow inside main_wayland
Summary:
In a recent patch the newly added xwayland class ended up being
responsible for continuing the startup, calling back into the main app
to spawn the workspace.

It moves the flow of startup about so it's not very readable or
following class structure.

This patch moves the code back into main_wayland and removes the
duplication between xwayland and non-xwayland modes.

There was also a misnaming of methods.

Previously:
continueStartupWithScreens was called after platform screens are created
continueStartupWithScene was called after the scene was created
continueStartupWithXwayland was called before xwayland is created

This was confusing, so the names have been shuffled around to follow a
consistent pattern of what has been done so far.

Test Plan:
Started kwin_wayland in normal and xwayland mode
Ran unit tests (though some failed due to a local unrelated and as yet unindentified bug)

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19232
2019-02-23 12:18:09 +00:00