Commit graph

3505 commits

Author SHA1 Message Date
Vlad Zahorodnii
f93875535c Update my last name 2019-09-29 17:03:25 +03:00
Vlad Zagorodniy
5469558c1a [effects/slidingpopups] Don't start animation if there is no slide edge
Summary:
Given that slide in/out animation duration is not initialized when slide
location is NoEdge, assert statement will be triggered in slideIn().

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23564
2019-09-23 17:28:56 +03:00
Vlad Zahorodnii
b8a6fd7c46 Don't initialize QFlags<T> with nullptr
Summary: This looks very odd.

Test Plan: Compiles.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24086
2019-09-19 21:42:34 +03:00
Vlad Zahorodnii
62a7db7028 Use nullptr everywhere
Summary:
Because KWin is a very old project, we use three kinds of null pointer
literals: 0, NULL, and nullptr. Since C++11, it's recommended to use
nullptr keyword.

This change converts all usages of 0 and NULL literal to nullptr. Even
though it breaks git history, we need to do it in order to have consistent
code as well to ease code reviews (it's very tempting for some people to
add unrelated changes to their patches, e.g. converting NULL to nullptr).

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson, romangg

Reviewed By: #kwin, davidedmundson, romangg

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23618
2019-09-19 17:48:21 +03:00
Vlad Zahorodnii
dcf91d4321 Cleanup style in CMakeLists.txt files
We have lots of inconsistency at the moment in CMakeLists.txt files. Most
of it is due to kwin being a very old project. This change hopefully fixes
all of it.
2019-09-17 16:03:05 +03:00
l10n daemon script
fd702c3644 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-09-17 05:29:51 +02:00
l10n daemon script
da8d16deca 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-09-16 05:20:24 +02:00
Frederik Gladhorn
b64e67ce7c Remove disabled TabGroup feature
Summary:
This has been commented out since 2014, I doubt it will come back.
This is a big amount of code, maintenance will be easier without it.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: romangg, graesslin, kwin

Tags: #kwin, #documentation

Differential Revision: https://phabricator.kde.org/D23069
2019-09-14 10:58:48 +02:00
Vlad Zahorodnii
2adbcf7b1d [effects/windowgeometry] Fix -Wdeprecated-declarations 2019-09-12 22:19:34 +03:00
Vlad Zagorodniy
4d4d9990dd [effects/wobblywindows] Draw clients below opaque wobbly windows
Summary:
Given that wobbly windows effect takes optimized render path, it needs
to clear the clip region of about to be transformed opaque window.

BUG: 411092
FIXED-IN: 5.17.0

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23774
2019-09-07 23:50:12 +03:00
Vlad Zagorodniy
86b2b70458 [effects/wobblywindows] Remove traits of an open/close animation
Summary:
Wobbly Windows effect is capable of animating a window when it's shown
or hidden. However, this feature has been hidden since it was added.
One needs to know how the effect works in order to enable these animations.

Therefore there's no good reason to keep these two animations because
practically no one uses them and they only add maintenance burden.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23763
2019-09-07 13:21:38 +03:00
Vlad Zagorodniy
630006e6f7 Delete unused includes
We don't use assert().
2019-09-06 16:07:55 +03:00
Vlad Zagorodniy
7a3722b4f5 Switch to Q_ASSERT
Summary:
Switch to Q_ASSERT in order to make code a bit more consistent. We have
places where both assert and Q_ASSERT are used next to each other. Also,
distributions like Ubuntu don't strip away assert(), let's hope that
things are a bit different with Q_ASSERT.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: romangg, davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23605
2019-08-31 20:07:05 +03:00
l10n daemon script
082baf6662 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-08-30 05:26:49 +02:00
Frederik Gladhorn
12886cf442 Be consistent about touch point id type: use qint32
Summary:
There is no point in using quint32 and casting back and forth in numerous places.
Fix a bunch of compiler warnings that we implicitly cast between signed and unsigned.
This makes things consistent with what we get from libinput.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: zzag, romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23086
2019-08-11 22:15:05 +02:00
l10n daemon script
f1bbe935d3 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-08-07 05:12:10 +02:00
l10n daemon script
bb32691980 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-07-31 05:23:00 +02:00
Vlad Zagorodniy
684b4b635e Use more traditional doxygen style
Summary:
So far we were following a bit unique and rare doxygen comment style:

    /**
     * Contents of the comment.
     **/

Doxygen comments with this style look balanced and neat, but many people
that contribute to KWin don't follow this style. Instead, they prefer
more traditional doxygen comment style, i.e.

    /**
     * Contents of the comment.
     */

Reviewing such changes has been a bit frustrating for me (so selfish!)
and for other contributors.

This change switches doxygen comment style in KWin to a more traditional
style. The main reason for doing this is to make code review process easier
for new contributors as well us.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22812
2019-07-29 22:06:19 +03:00
Vlad Zagorodniy
8af2fa73dc Run clang-tidy with modernize-use-override check
Summary:
Currently code base of kwin can be viewed as two pieces. One is very
ancient, and the other one is more modern, which uses new C++ features.

The main problem with the ancient code is that it was written before
C++11 era. So, no override or final keywords, lambdas, etc.

Quite recently, KDE compiler settings were changed to show a warning if
a virtual method has missing override keyword. As you might have already
guessed, this fired back at us because of that ancient code. We had
about 500 new compiler warnings.

A "solution" was proposed to that problem - disable -Wno-suggest-override
and the other similar warning for clang. It's hard to call a solution
because those warnings are disabled not only for the old code, but also
for new. This is not what we want!

The main argument for not actually fixing the problem was that git
history will be screwed as well because of human factor. While good git
history is a very important thing, we should not go crazy about it and
block every change that somehow alters git history. git blame allows to
specify starting revision for a reason.

The other argument (human factor) can be easily solved by using tools
such as clang-tidy. clang-tidy is a clang-based linter for C++. It can
be used for various things, e.g. fixing coding style(e.g. add missing
braces to if statements, readability-braces-around-statements check),
or in our case add missing override keywords.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, apol, romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22371
2019-07-22 20:03:22 +03:00
Aleix Pol
d3253257f9 Copy the packages into the build directory so they can be found without installign
Summary: Fixes the execution of tests when not installed

Test Plan: Removed the installed effect and testTranslucency

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22490
2019-07-16 17:31:24 +02:00
Aleix Pol
6cd9b2ba25 Install KPackages with kpackage_install_package
Summary:
Removes a bunch of boilerplate CMake code and allows kpackage to do
some smart things, e.g. drops our runtime dependency on the
DesktopFileParser and we get to just use json directly.

Test Plan: Ran kwin, now it doesn't use the desktop to json translation path, everything still works.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: davidedmundson, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22474
2019-07-16 14:21:14 +02:00
l10n daemon script
9c0a71c37f 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-07-13 05:18:09 +02:00
Vlad Zagorodniy
5e0e708a76 Port away from deprecated QImage::byteCount
Summary:
QImage::byteCount() was deprecated in Qt 5.10. It is advised to use
QImage::sizeInBytes() method instead.

Reviewers: #kwin, apol

Reviewed By: apol

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22355
2019-07-10 02:02:15 +03:00
Vlad Zagorodniy
4e5d3d0010 Port away from QRegion::rects
Summary:
QRegion::rects was deprecated in Qt 5.11. It is advised to use begin()
and end() methods instead.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22353
2019-07-10 01:00:51 +03:00
Vlad Zagorodniy
927f579df9 Port away from deprecated qSort function
Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22354
2019-07-10 00:00:29 +03:00
Vlad Zagorodniy
c7639fd7ed Port away from deprecated headers
Summary: Headers like stdio.h are deprecated in C++.

Test Plan:
Compiles.

clangd no longer spews these warnings

{F6997789, size=full}

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22351
2019-07-09 23:59:07 +03:00
Kai Uwe Broulik
ea97928426 Merge branch 'Plasma/5.16' 2019-07-09 11:15:20 +02:00
Fredrik Höglund
5191311d36 [effects/blur] Disable sRGB when the framebuffer is linear
Disable sRGB rendering when the color encoding of the default
framebuffer is linear.

BUG: 408594
FIXED-IN: 5.16.3

Differential Revision: https://phabricator.kde.org/D22153

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
2019-07-09 00:43:33 +02:00
David Edmundson
3604aaf74c Close screen grabbing effect when screensaver starts
Summary:
The screenlock fails on X11 if it can't grab the keyboard.

We can't nicely solve the generic case. We can solve the common case of
a kwin effect being active.

It's not critical, arguably not even desirable to have these effects
persist after the screen is locked through an external trigger. We can
just close the effect early.

Key grabs have to be relased early before the close animation completes
so that the locker doesn't have a race based on animation times.

It's not ideal, but no worse than the current state for not much work.

BUG: 234153

Test Plan:
locked screen on a timer
opened various effects

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: ngraham, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D20890
2019-06-23 18:00:47 +02:00
Nate Graham
4dd4ca8f1c [effects/presentwindows] Allow closing windows on middle-click
Summary:
Plasma's Task manager exposes an optional  feature whereby the user
can middle-click on a window to close it, but the Present Windows effect
does not do the same.

The presence of a close button you can left-click does not replace the desirable
feature to be able to middle-click on a window to close it, because then the
whole window becomes a click target, so it can be much much faster than
having to aim for the little close button. Also it's off by default, so a user
who goes out of their way to turn it on is signaling that they want to accept the
risk of accidentally closing a window by accident.

Finally, the feature is not allowed for left-click, so people can never accidentally
wreck Present Windows for themselves by assigning it to left-click by accident
and then mistakenly closing their windows.

This reverts commit 55585514f9.

FEATURE: 321190
FIXED-IN: 5.17.0

Test Plan:
Set "Close window" in the Present windows effect, trigger effect, and middle-click on window

{F6815303}

Reviewers: #kwin, davidedmundson, broulik, zzag, #plasma, hein, mart

Reviewed By: #kwin, #plasma, mart

Subscribers: mart, abetts, apol, zzag, luebking, kossebau, graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D21083
2019-06-21 10:25:32 -06:00
Kai Uwe Broulik
8a2f2b5fb9 [effects/login] Reduce animation time
On modern machines session startup takes a few seconds where the 2s might artificially slow down the process by like 50%.
This makes the animation quicker to make the system feel ready quicker.

Differential Revision: https://phabricator.kde.org/D21904
2019-06-19 18:24:55 +02:00
Gabriel Felipe Huwe
92d482b331 [effects/screenshot] Remove outdated reference to KSnapshot
Summary:
Since KSnapshot is no longer used, I modified the text in `effect_builtins.cpp` to reflect that, changing it to a generic "screenshot tools".

BUG: 408407
FIXED-IN: 5.17.0

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: filipf, davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D21700
2019-06-10 08:48:19 -06:00
l10n daemon script
d3f1078c94 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-06-09 08:29:13 +02:00
l10n daemon script
e4ba37109f 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-06-09 05:13:32 +02:00
Vlad Zagorodniy
4ece0a9f40 Merge branch 'Plasma/5.12' into Plasma/5.16 2019-05-27 17:31:10 +03:00
Vlad Zagorodniy
67444e3659 [effects/screenshot] Upload data to xpixmap in chunks
Summary:
xcb_put_image doesn't handle big images well. Contrary to XPutImage, the
caller must manually split the data in such a way that each xcb_put_image
request doesn't exceed the maximum request length. Not doing so will result
in libxcb shutting down the connection.

CCBUG: 338489
CCBUG: 388182

Test Plan: Take a screenshot of an active fullscreen client on a 4K monitor.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D21370
2019-05-27 17:30:21 +03:00
Vlad Zagorodniy
d94eb29d07 [effects/thumbnailaside] Specify screen projection matrix
Summary:
The Lanczos filter is applied to thumbnails, so we need to specify screen
projection matrix in order to properly project window coordinates into
screen-space.

BUG: 407485

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D21224
2019-05-15 12:35:00 +03:00
l10n daemon script
ee60653640 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-05-08 05:51:51 +02:00
Vlad Zagorodniy
e8b45cce11 [effects/cubeslide] Cancel active animation when number of desktops has changed
Summary:
If a virtual desktop is removed, then desktopChanged will be followed by
numberDesktopsChanged signal. In which case, we have to cancel the
active animation because front_desktop might be no longer valid when
it's time to perform compositing.

BUG: 406452

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D21064
2019-05-07 15:13:09 +03:00
Kai Uwe Broulik
df85907de3 Support CriticalNotification type and place it in a CriticalNotificationLayer
Differential Revision: https://phabricator.kde.org/D20629
2019-05-02 10:29:38 +02:00
l10n daemon script
cc81964fce 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-05-02 05:57:21 +02:00
Friedrich W. H. Kossebau
1fb4baf365 [effects/screenedge] Support "hint-stretch-borders"
Summary:
Some old themes have the flag set and also a style which expects the
borders to be stretched. Given that the documentation on techbase
describes widgets/glowbar still as "a frame without a prefix", one also
would assume that all the optional hints (which make sense) still apply.
Even more, the Air & Oxygen themes have the hint also set, though for
their rendering it makes no difference.
The small code needed seems worth the unbreaking of old themes as well
as giving theme creators another variable of freedom for their styles.

Test Plan:
Glow bar still works on all corners and edges with all themes as before,
though rendering now as expected for themes which have the
"hint-stretch-borders" set.

Reviewers: #kwin, zzag, davidedmundson

Reviewed By: #kwin, zzag, davidedmundson

Subscribers: davidedmundson, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D20621
2019-04-17 15:22:15 +02:00
Vlad Zagorodniy
e3d1ddd2bf Merge branch 'Plasma/5.15' 2019-04-15 11:20:19 +03:00
Vlad Zagorodniy
0a8c436f7f [effects/fallapart] Don't animate popups
Summary: BUG: 405971

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D20568
2019-04-15 11:20:06 +03:00
l10n daemon script
6b769152d3 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-04-12 09:04:10 +02:00
l10n daemon script
ef3f1e57ba 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-04-12 05:58:07 +02:00
Vlad Zagorodniy
3d46801e5f [wayland] Make sure that only the fading popups effect animates outline
Summary:
Window open/close animation effects should not animate the outline
because the end result is a bit awkward.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19886
2019-04-09 14:21:22 +03:00
l10n daemon script
576efedb1a 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-04-06 09:35:59 +02:00
l10n daemon script
a32e103fe8 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-04-06 09:08:58 +02:00
l10n daemon script
8e1485b4c8 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-04-06 06:06:15 +02:00