Commit Graph

16339 Commits (95ff4a2d49d897739f58e931454edf0272798038)

Author SHA1 Message Date
Vlad Zagorodniy 95ff4a2d49 Flush kwinrulesrc in RuleBook::save
Summary:
a02797ca06 missed sync call to actually
write rules to disk.

BUG: 399778
FIXED-IN: 5.14.3

Test Plan: Changed opacity in Special Window Settings.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16580
2018-11-01 11:42:48 +02:00
l10n daemon script d0dd60f0f5 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"
2018-11-01 08:00:26 +01:00
l10n daemon script 8154ba1cdc 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"
2018-10-31 08:05:22 +01:00
Vlad Zagorodniy 558b86e9f6 [effects/desktopgrid] Don't display the close button from Present Windows
Summary:
If you activate the Present Windows effect and then the Desktop Grid,
you'll be able to see the close button from PW. The reason for that is
PW doesn't destroy the close button and DG doesn't filter it out.

This patch addesses this problem by syncing DesktopGridEffect::isRelevantWithPresentWindows
with PresentWindowsEffect::isSelectableWindow.

On X11, the close button is filtered by the isSpecialWindow check. On
Wayland, the close button is filtered by the acceptsFocus check.

The proposed solution is kinda hack-ish, but on the other hand, we have
to keep those two methods in sync anyway.

In addition to the close button, notifications won't be displayed too.

BUG: 364710
FIXED-IN: 5.14.3

Test Plan:
* Activate the Present Windows effect;
* Activate the Desktop Grid effect;
* (the close button is no longer visible)

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16513
2018-10-30 22:39:08 +02:00
Vlad Zagorodniy 8fa1537d6f Merge branch 'Plasma/5.12' into Plasma/5.14 2018-10-29 00:02:52 +02:00
Erik Kurzinger 4348cd5683 [effects/presentwindows] Avoid potential freeze during fill-gaps
Summary:
When using the natural layout algorithm with the fill-gaps option, a small
error (less than one) is introduced in windows' aspect ratio each time they are
enlarged due to floating-point roundoff.

Currently, the algorithm computes the width and height enlargement factors and
then attempts to enlarge in each of the four possible directions, repeating
until it can't enlarge any windows any further.  Hence, this aspect ratio error
can be multiplied by up to four. Especially for small, long, and narrow
windows, this can result in a total error of greater than one by the end of
that loop iteration. If this occurs, on subsequent iterations the height
enlargement factor might then be computed as negative violating some of the
core assumptions of the algorithm and resulting in the loop iterating endlessly
until one of the window dimensions overflows, freezing the program for up to
several minutes.

To fix this, the height enlargement factor should be re-computed based on the
new width each time the window is enlarged, ensuring the error introduced in
the aspect ratio never exceeds one.

BUG: 364709
BUG: 380865
BUG: 368811

FIXED-IN: 5.15.0

Test Plan:
The most reliable way to reproduce the freeze seems to be to activate the
desktop-grid effect while a tool-tip window is fading in.
Ensure desktop-grid is configured to use present windows, and that present
windows is configured to use the natural layout algorithm with the fill gaps
option selected.

The freeze is still intermittent, but using this method should be able to be
triggered within about 10 tries without this fix.
After applying the fix, the freeze has never been observed.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: graesslin, kwin, zzag

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16278
2018-10-29 00:02:21 +02:00
l10n daemon script 5d22ad68c8 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"
2018-10-28 07:03:31 +01:00
Vlad Zagorodniy 00c9b4c1c9 [effects/thumbnailaside] Save shortcuts
Summary:
If user selects a shortcut to trigger the effect, that shortcut won't
work after the KCM is closed because we don't save it.

BUG: 400351
FIXED-IN: 5.14.3

Test Plan:
* Specified custom shortcut to trigger the effect;
* Closed the KCM;
* Pressed the shortcut, a thumbnail appeared.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16456
2018-10-27 19:09:49 +03:00
Vlad Zagorodniy e4c399a635 Merge branch 'Plasma/5.12' into Plasma/5.14 2018-10-26 11:30:59 +03:00
Erik Kurzinger 408ed80604 [effects/desktopgrid] Specify screen projection matrix when drawing moving window
Summary:
Currently, when the user is moving a window in the desktop grid it is drawn from
the paintScreen function to ensure it appears above all other windows. However,
when drawing the window, the screenProjectionMatrix for the WindowPaintData structure
is never specified. Because of this, the window will not be visible if OpenGL
compositing along with Lanczos scaling are in use since its coordinates will never
be projected into screen-space (unless the window is maximized, in which case the
scaling code is bypassed).

BUG: 361371
BUG: 364509

FIXED-IN: 5.14.3

Test Plan:
Ensure OpenGL compositing is enabled and the scaling method is set to "Accurate" on
hardware supporting this option. Additionally, ensure the desktop grid effect is
active and is configured to use Present Windows. Open a window and ensure is it not
maximized. Click on the window and drag it around - its contents should remain visible
the entire time and follow the mouse.

Reviewers: #kwin, zzag, graesslin, davidedmundson

Reviewed By: #kwin, zzag, davidedmundson

Subscribers: broulik, davidedmundson, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16430
2018-10-26 11:30:39 +03:00
Erik Kurzinger 91b538105a [effects/desktopgrid] Specify screen projection matrix when drawing moving window
Summary:
Currently, when the user is moving a window in the desktop grid it is drawn from
the paintScreen function to ensure it appears above all other windows. However,
when drawing the window, the screenProjectionMatrix for the WindowPaintData structure
is never specified. Because of this, the window will not be visible if OpenGL
compositing along with Lanczos scaling are in use since its coordinates will never
be projected into screen-space (unless the window is maximized, in which case the
scaling code is bypassed).

BUG: 361371
BUG: 364509

FIXED-IN: 5.14.3

Test Plan:
Ensure OpenGL compositing is enabled and the scaling method is set to "Accurate" on
hardware supporting this option. Additionally, ensure the desktop grid effect is
active and is configured to use Present Windows. Open a window and ensure is it not
maximized. Click on the window and drag it around - its contents should remain visible
the entire time and follow the mouse.

Reviewers: #kwin, zzag, graesslin, davidedmundson

Reviewed By: #kwin, zzag, davidedmundson

Subscribers: broulik, davidedmundson, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16430
2018-10-26 11:19:13 +03:00
l10n daemon script 51b0dfbf17 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"
2018-10-25 07:53:41 +02:00
l10n daemon script c7aa721273 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"
2018-10-24 08:42:22 +02:00
l10n daemon script 26a8892d9d 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"
2018-10-24 08:15:36 +02:00
Vlad Zagorodniy 9fae2f4905 [effects/invert] Don't block blur and background contrast effect
Summary:
Background behind some windows is not blurred because the invert effect
sets PAINT_WINDOW_TRANSFORMED. This essentially "turns off" the blur and
the background contrast effect unless we set the force roles.

Because the invert effect is a "post-processing"(not really) effect we
don't have to set that flag.

BUG: 279076
BUG: 359583
FIXED-IN: 5.14.3

Test Plan: {F6341916}

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16358
2018-10-23 13:57:56 +03:00
Bhushan Shah 69af30f3fb Update version number for 5.14.2
GIT_SILENT
2018-10-23 16:06:41 +05:30
l10n daemon script bb16fe18aa 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"
2018-10-22 07:53:29 +02:00
l10n daemon script 8cd7c5e2c7 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"
2018-10-20 07:59:53 +02:00
Jonathan Riddell 87eaeb561b Update version number for 5.14.1
GIT_SILENT
2018-10-16 11:19:08 +01:00
Kai Uwe Broulik 1fe3c765cd Merge branch 'Plasma/5.12' into Plasma/5.14 2018-10-12 13:54:24 +02:00
Kai Uwe Broulik 980e390743 [kcmkwin/ruleswidget] Disable "Detect" button when countdown is running
Avoids triggering an assert and communicates that the timeout is running.
Ideally, there was a countdown label of some sort but this is better than crashing.

BUG: 399644
FIXED-IN: 5.12.8

Differential Revision: https://phabricator.kde.org/D16124
2018-10-12 13:51:25 +02:00
Vlad Zagorodniy 396f8f558c [effects/diminactive] Delete active transitions when window is deleted
Summary:
The Dim Inactive effect expects that the windowClosed signal always
proceeds the windowDeleted signal. But in some cases that's not the case.

If a window gets destroyed before becoming ready for painting, only
the windowDeleted signal will be emitted. In addition to that, KWin will
activate that window, which means we'll probably start a transition for
it.

Because this effect cannot terminate active transitions for such
windows, KWin can crash in postPaintScreen.

This change addresses the crash in postPaintScreen by adding extra clean
up stuff in the windowDeleted slot to make sure that there are no
transitions for deleted windows.

The proper fix would be to not emit windowActivated signal for windows
that are not ready for painting.

BUG: 399612
FIXED-IN: 5.14.1

Test Plan:
Ran
```
x <- seq(5, 15, length=1000)
y <- dnorm(x, mean=10, sd=3)
plot(x, y, type="l", lwd=1)
```
in RKWard multiple times.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16130
2018-10-11 17:48:37 +03:00
David Edmundson 273a3fabd0 [activities] Fix logic error in user menu blocking activity updates
Summary:
There's an attempt to block updates to activities whilst the popup menu
is showing.

In one of the two code paths for positioning the menu the block is set
but instead of releasing the block at the end of the exec locks it
again.

CCBUG: 335725

Test Plan:
On X11 changed activities with the popup menu near the bottom.
It still flickered like crazy whilst the menu is open (see bug report)
But now at least fixes itself after

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16101
2018-10-10 14:54:16 +01:00
David Edmundson 6724955a76 [qpa] Always keep a at least one screen
Summary:
Qt does not like having no screens. Both Qt XCB and Wayland QPAs have
systems pretend there's always at least 1 screen
present.

Kwin already uses a dummy screen on startup, this patch reinserts the
dummy screen if the platform states that all real screens are removed.

BUG: 399564

Test Plan:
Logged in, everything still worked
Did not reproduce the original bug

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16096
2018-10-10 11:14:13 +01:00
l10n daemon script 43bed9a2a6 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"
2018-10-10 08:56:10 +02:00
Vlad Zagorodniy c2ffcfdc21 [effects/wobblywindows] Fix visual artifacts caused by maximize effect
Summary:
If one wants to drag a maximized window while he or she has enabled both
the Wobbly Windows and the Maximize effect, visual artifacts can be
shown.

When the Maximize effect animates transition from maximize to restore,
some parts of the window can overshoot repaint regions(because of
wobbliness), leaving us with the visual artifacts.

To fix that, we have to take into account current scale and translation
when calculating dirty region in the Wobbly Windows effect.

BUG: 370612
FIXED-IN: 5.14.1

Test Plan: When dragging maximized windows, there are no visual artifacts anymore.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: abetts, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15961
2018-10-09 18:30:13 +03:00
l10n daemon script 5aeba9da59 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"
2018-10-08 07:59:39 +02:00
l10n daemon script dc707c5c4e 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"
2018-10-07 08:03:19 +02:00
David Edmundson 0b7778f964 [plugins/qpa] Add explanatory comment 2018-10-05 14:38:55 +01:00
David Edmundson 6ebfa59331 [plugins/qpa] Don't crash on Qt5.12 OpengGL::makeCurrent
Summary:
QOpenGLContext was changed to call platform->makeCurrent before it
called setCurrentContext.

Because we bind window FBO and ultimately that calls
QOpenGlContext::format we need Qt to know which context is current so it
can tell us the format.

This matches the QtWayland EGL code.

BUG: 399392

Test Plan:
Switched virtual desktop with the OSD (previously reliably crashed)
Now it doesn't

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15957
2018-10-05 14:04:09 +01:00
Vlad Zagorodniy e9fd57285f [effects/zoom] Set wrap mode for cursor texture
Summary:
With the Oxygen cursor theme, a visual glitch can appear in the
bottom-left corner of the cursor when the screen is zoomed in.

The reason for that is we're using GL_REPEAT for GL_TEXTURE_WRAP_S
and GL_TEXTURE_WRAP_T. So, when the linear filter samples neighboring
texels in the bottom, it can sample some texels from the top (because of
GL_REPEAT).

To fix that, we have to set the wrap mode to GL_CLAMP_TO_EDGE.

BUG: 338254
FIXED-IN: 5.14.0

Test Plan:
Before:
{F6303912}

After:
{F6303913}

Tried other cursor themes(Breeze and Adwaita), everything looks okay.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15949
2018-10-04 21:40:49 +03:00
Jonathan Riddell b3e3cf861f Update version number for 5.14.0
GIT_SILENT
2018-10-04 12:25:07 +01:00
l10n daemon script 4b24a538fc 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"
2018-09-29 08:55:05 +02:00
l10n daemon script 0b8453c62f 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"
2018-09-29 08:22:49 +02:00
Jonathan Riddell 838bd060c6 Update version number for 5.12.7
GIT_SILENT
2018-09-25 10:29:06 +01:00
l10n daemon script eedccae16f 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"
2018-09-23 07:36:20 +02:00
l10n daemon script 53ba323f76 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"
2018-09-22 08:04:02 +02:00
Pino Toscano 9d49ba6a97 fixuifiles 2018-09-18 07:52:44 +02:00
David Edmundson 8bba7009bc Fix untranslatable strings in debug_console.ui shortcutdialog.ui
BUG: 398703
Review on bugzilla
2018-09-17 11:39:47 +02:00
l10n daemon script c7455c7177 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"
2018-09-17 07:34:47 +02:00
l10n daemon script a77b7a8df7 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"
2018-09-15 07:49:44 +02:00
Jonathan Riddell 84cd9cfc43 Update version number for 5.13.90
GIT_SILENT
2018-09-13 17:33:33 +01:00
Vlad Zagorodniy 213239a0ea [shadow] Rebuild quads after creation of shadow
Summary:
If a shadow is installed for already rendered window, the shadow won't
be initially rendered because we don't rebuild window quad cache.

BUG: 398572
FIXED-IN: 5.14.0

Test Plan: Can't reproduce 398572 anymore.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15475
2018-09-13 16:20:04 +03:00
David Edmundson 0a2e51db47 Remove duplicated auto backend resolution
Summary:
kwin_wayland now automatically chooses an appropriate backend, such as
DRM, nested wayland or nested X. If nested it will automatically go into
windowed mode regardless of whether --windowed is set and works fine.

Backend choosing logic existed duplicated in older code for kwin_wayland
--windowed, with the subtle unexpected difference that it preferred
running as an X client over running as a wayland cient if both are
present. This simplifies codes and syncs automatic resolution behaviour.

kwin_wayland --windowed with --x11-display  or --wayland-display will
remain the same.

Test Plan:
Ran kwin_wayland with and without --windowed inside another wayland.
Got the same backend chosen
Tested that kwin_wayland (without --windowed) on an X machine worked just fine.

Reviewers: #kwin, mart

Reviewed By: #kwin, mart

Subscribers: mart, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13658
2018-09-13 10:20:58 +01:00
David Edmundson d485dfe7ef Avoid crash with on scripted window teardown with threaded quick render loop
Summary:
Qt render loops behave quite differently to each other.

KWin scripting as a workaround for another situation cleans
(17553e5a1f) handles tracking of script
windows by deleting the underlying window handle on hide.

This currently happens before the window gets the hideEvent.

Arguably this is a quirk with Qt, but in the current state:

- QSGThreadedRenderLoop deletes the platform window and cleans up
- We then get the hide() event. This no-ops because there's no window.
   (else branch of     case WM_TryRelease in qsgthreadedrenderloop.cpp)
- We carry on rendering animations despite having no platform
- undefined behaviour

Normally this isn't a problem as typically destruction of the platform window
happens only when a window is being deleted, we're messing with Qt
internals here.

If we make sure the QHideEvent is processed by the render loop first,
things seem fine.

BUG: 397767

Test Plan:
Ran QSG_RENDER_LOOP=threaded
Read output with scenegraph logging rules on

Reviewers: #kwin, broulik

Reviewed By: broulik

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15025
2018-09-13 10:19:12 +01:00
l10n daemon script e4ff50624a 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"
2018-09-13 05:57:35 +02:00
Roman Gilg 6072b0cd6c Remove breaking pointer constraints functionality
Summary:
With 2694839099, 0bd5eff862 and f0ba436c72 it is now possible to
unconstrain a pointer by killing the client or deactivating the window, for
example by switching the window via the TabBox.

A user should always be able to do it therefore without needing to explicitly
break the pointer constrain as in the past with the Esc key.

Therefore remove the functionality and also remove the OSD announcing it,
which was often shown at the wrong time.

Test Plan: Manually and auto test adapted.

Reviewers: #kwin, #vdg, hein

Reviewed By: hein

Subscribers: ngraham, hein, kwin

Tags: #kwin

Maniphest Tasks: T8923

Differential Revision: https://phabricator.kde.org/D15234
2018-09-12 22:55:26 +02:00
Vlad Zagorodniy 74994a7fbd [effects/trackmouse] Allow to use both modifiers and shortcut
Summary:
The Track Mouse effect can be toggled either by pressing modifier keys
and moving mouse or by pressing a shortcut. It's not possible to use
the latter and then the former without changing config.

But there is one caveat, in order to use shortcut, you have to uncheck
all modifier keys. This seems to be not very intuitive.

In addition to that, the KCM allows to change shortcut even if there is
some checked modifier.

As the title says, this change makes possible to use both modifier keys
and shortcut to activate this effect without changing config.

KCM:
{F6237308, layout=center, size=full}

BUG: 398124
FIXED-IN: 5.14.0

Reviewers: #kwin, #plasma, #vdg, davidedmundson

Reviewed By: #kwin, #plasma, #vdg, davidedmundson

Subscribers: broulik, abetts, ngraham, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15272
2018-09-12 16:37:05 +03:00
Vlad Zagorodniy cc1f30b43d [effects/showpaint] Modernize code
Summary:
Summary of changes:
* Use QVector to store colors
* Add Q_OBJECT macro
* Port away from QRegion::rects
* Fix coding style
* Use default member initialization
* Use nullptr
* Reserve rects in paintXrender

The behavior of this effect haven't been changed, it still acts as before.

Test Plan: Compiles, and the Show Paint effect is still a psychedelic thing.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15424
2018-09-11 17:01:17 +03:00
Vlad Zagorodniy 113ebe9bc2 [effects] Fix type of X-KWin-Video-Url
Summary:
The desktop file parser supports only QString, QStringList, Int, Double,
and Bool. QUrl is not a supported type for some reason.

Thus, let's use QString for X-KWin-Video-Url.

Reviewers: #kwin, broulik

Reviewed By: broulik

Subscribers: Zren, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15373
2018-09-11 13:46:35 +03:00