Commit graph

18000 commits

Author SHA1 Message Date
Benjamin Port
a8979aa4e4 KCM Compositing: Fix save state
use settings objects to track state instead of a class member that will need to be synchronized.

BUG: 423223
2020-06-22 09:24:11 +02:00
l10n daemon script
b5040fe425 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-06-20 07:42:21 +02:00
Méven Car
396a9da557 KCMoptions: delay initialization after QObject creation in standalone
BUG: 423111
FIXED-IN: 5.19.2
2020-06-18 12:15:18 +02:00
l10n daemon script
430ca2a33e 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-06-18 08:32:20 +02:00
Vlad Zahorodnii
cff2070ab2 Merge branch 'Plasma/5.18' into Plasma/5.19 2020-06-17 18:07:12 +03:00
l10n daemon script
8027ccd6d6 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-06-17 16:54:45 +02:00
Vlad Zahorodnii
96774e79e7 [x11] Create egl scene textures with right size
Or client-side decorated clients will be rendered incorrectly.
2020-06-17 17:52:17 +03:00
Vlad Zahorodnii
bc2df9f84b [x11] Provide physical dimensions for outputs
Since ScreenEdge no longer uses physicalDpiX() and physicalDpiY() from
the QPaintDevice class in favor of our own helpers, we need to ensure
that the X11 platform provides valid output physical dimensions.

BUG: 422816
FIXED-IN: 5.19.2
2020-06-17 10:53:12 +03:00
Jonathan Riddell
ed50b1b614 Update version number for 5.19.1
GIT_SILENT
2020-06-16 13:29:52 +01:00
l10n daemon script
ce5b9c3612 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-06-11 09:38:33 +02:00
Ismael Asensio
e307038f84 [kcm/kwinrules] Fix slow scrolling through rules list
Every `AbstractItemDelegate` was instantiating a `Kirigami.ActionToolBar`,
which is a very expensive component, rising CPU usage specially on long lists.

Use `Kirigami.SwipeListItem` instead, as is seems the proper component.

BUG: 421537
2020-06-10 21:29:08 +00:00
l10n daemon script
f18deb69f1 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-06-09 09:19:42 +02:00
Fabian Vogt
13810088cc Merge branch 'Plasma/5.18' into Plasma/5.19 2020-06-07 21:55:51 +02:00
Fabian Vogt
ec602e0c2a Fix the Plastik decoration with Qt 5.15
The trick in qmldir no longer works with Qt 5.15, so use a more reliable
approach. This way works with Qt 5.15 and also on previous versions of Qt.
2020-06-07 18:05:21 +02:00
Shubham Jangra
48a5bfee0f [KCM] Fix label in Screen Edges system settings 2020-06-03 20:37:07 +05:30
Jonathan Riddell
ac0d1cb072 Update version number for 5.19.0
GIT_SILENT
2020-06-03 11:18:44 +01:00
Ben Cooksley
31bd55b88c Capstone commit to prevent force push reversed commits returning accidentally. 2020-06-03 09:54:00 +00:00
Méven Car
1a50c98f4a [scene] Avoid a crash when currentPixmap is invalid and previousPixmap is null or invalid 2020-06-02 11:06:42 +02:00
l10n daemon script
ccd0677bb1 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-06-02 09:47:47 +02:00
l10n daemon script
051cba15ce 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-06-02 09:11:06 +02:00
Ismael Asensio
0a06ee12c6 [kcm/kwinrules] Fix "window role" combo not showing up
Correctly set the policy of `windowrole` property to `StringMatch`.

BUG: 422302
FIXED-IN: 5.19
2020-06-01 20:23:40 +02:00
l10n daemon script
a3139650a7 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-05-31 14:23:06 +02:00
Ismael Asensio
623ee1011c [kcm/kwinrules] Fix first item position on property list
The first time the list in `Add properties` is shown, the position of the first
delegate is miscalculated as (0, 0) and gets hidden behind the section header.
It only repositions when the delegate is destroyed and re-created, for example, when
setting and deleting a filter text. (https://bugs.kde.org/show_bug.cgi?id=422289)

This works-around it by delaying the `overlayModel` filtering until the list is first
shown, which makes the delegate position correctly.

BUG: 421583
FIXED-IN: 5.19
2020-05-31 10:54:28 +00:00
l10n daemon script
cba442b079 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-05-30 16:31:27 +02:00
Vlad Zahorodnii
783c2f47d6 Merge branch 'Plasma/5.18' into Plasma/5.19 2020-05-29 16:47:54 +03:00
Vlad Zahorodnii
2c76cc4784 [wayland] Fix misuse of EGL/eglmesaext.h
The recommended way to get all EGL extension defines is to include
EGL/eglext.h. EGL/eglmesaext.h is a private header that compositors
should not use.

BUG: 422131
2020-05-29 16:21:01 +03:00
Vlad Zahorodnii
309fbf1837 [effects/blur] Don't blur outside the frame rect
We need to clip the blur region to ensure that the background behind
client side drop shadows is not blurred.

BUG: 422202
2020-05-29 10:42:48 +03:00
Ismael Asensio
61c6d58172 [kwinrules] Add kconf_update script to fix placement rule
Since the port to KConfigXT, the placement setting in `kwinrulesrc` now stores the enum value instead of a string equivalent.
The strings and enum values are taken from `placement.h/.cpp`

This was suggested by @zzag in https://phabricator.kde.org/D29790
2020-05-27 18:13:00 +00:00
Johnny Jazeix
00b285623a fix compilation, remove extra parenthesis 2020-05-26 19:14:10 +02:00
Méven Car
f0f465ccbd Wayland: avoid binding disabled outputs to surfaces
We don't need to bind disabled outputs to surfaces that overlaps them.
This prevents error down the line and warnings about ignoring surface.enter events with Qt.

BUG: 419749
2020-05-26 17:18:11 +02:00
David Edmundson
e3044e619e Correctly align natural layout in present windows
Summary:
Present windows works as follows:

- It moves all windows about until nothing is overlapping with any
other window.
- This doesn't resize anything so ultimately we end up with a new
co-ordinate space that's bigger than the screen depending on the amount
of overlap.

 - We then render this whole view transformed to the screen

The rectangle "bounds" is in overviewpixels, with "scale" being the
ratio to convert to screen pixels.

When adjusting the new bounds there's an attempt to centre align things.
As bounds is in "overviewpixels" we multiply references to the previous
bounds by scale, and divide everything through at the end. bounds.x/y
were missed.

This is mostly unoticable except on massive super-ultra-wide monitors
which will otherwise have a tendency to shift to the left.

Test Plan:
Kai created a whole new test framework for this code that copy pasted
this algorithm then showed mock windows as rectangles

Reviewers: #kwin, apol, broulik, zzag

Reviewed By: #kwin, apol, broulik, zzag

Subscribers: zzag, apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29705
2020-05-26 10:52:16 +01:00
Ismael Asensio
91eee99fca [kcm/kwinrules] Extend upper limit of position and size spinners
Currently, the spinners used to edit position and size rules have an upper
limit of 4098, which may be not enough for wide/hdpi/mutiple screens.

The property itself has no such limit in the `.kcfg` schema
This is just an issue with the editor.

BUG: 421892
FIXED-IN: 5.19
2020-05-22 16:03:32 +02:00
Vlad Zahorodnii
621b2e1cde [decoration] Fix propagation of client size
Even though the frame geometry and the client geometry have a connection
between themselves, it doesn't mean that the frame geometry will change
if the client geometry has changed and vice versa. For example, it can be
the case when the border size changes. The frame geometry won't change,
but the client geometry will.

In general, similar to the frameGeometryChanged signal, we need another
signal that is emitted when the client geometry has been changed that
can be used then in DecoratedClientImpl.

Unfortunately, 5.19 release is around the corner and I would prefer not
to do any geometry-related changes in order to avoid introducing new
regressions.

In order to fix the propagation of the client size to decorations, this
change ports DecoratedClientImpl from frameGeometryChanged to a signal
that is emitted whenever geometry of any kind has been changed.

BUG: 419080
FIXED-IN: 5.19.0
2020-05-21 09:44:55 +00:00
Bhushan Shah
b2df11bf7e [platforms/drm] show cursor only when it is enabled
In previous code we used to update/show cursor even when the pointer
device was present, e.g mobile device. Guard it behind the cursor
enabled check.

BUG: 418977
FIXED-IN: 5.19.0
2020-05-21 12:38:02 +05:30
Vlad Zahorodnii
7569bdf6a3 [scene] Re-build window quads after creating a WindowPixmap
In order to generate window quads for a window, the scene needs a valid
WindowPixmap tree. If it's time to render the window, the scene will
build window quads for the contents, the server-side window decoration,
the drop-shadow and cache the resulting window quads. With this way of
generating window quads, we need the window pixmap tree to be valid,
or else no contents window quads will be generated.

While the window pixmap tree is guaranteed to be valid at the time of
generation of window quads for Wayland and X11 clients, this is not the
case for Xwayland clients.

When an Xwayland client is created, some time may pass between the
moment it's been created and the moment when a regular wayland surface
has been associated with the xwayland window. If the compositor decides
to render the Xwayland client in that short period of time, the window
quads cache won't have window quads cache.

In order to work around the weird asynchronous behavior of Xwayland
clients, this change makes the scene discard the window quad cache when
a new window pixmap has been created. This will ensure that the current
window quads are always in sync with the current window pixmap tree.
2020-05-19 14:06:06 +03:00
Ismael Asensio
bd5e34f5b4 [kcm/kwinrules] Detect virtual desktops in Wayland
The list of virtual desktops is retrieved using a DBus method, instead of
`KWindowSystem`, to make it work both in Wayland (as well as X11).

FIXED-IN: 5.20
BUG: 416165
2020-05-19 00:49:15 +02:00
Ismael Asensio
fdd9ed53d9 [kcm/kwinrules] Fix Placement setting
Summary:
Since the port to KConfigXT, the setting "placement" is stored using the enum value, instead of a string equivalent.
This updates the kcm model to be able to communicate this property with the config schema.

BUG: 421586
FIXED-IN: 5.19.0

Test Plan:
- In a rule set the "Initial Placement" property
- The value is stored in `~/.config/kwinrulesrc`
- Close/reopen the kcm. The placement value is correctly loaded.

Reviewers: #kwin, #plasma, zzag

Reviewed By: #kwin, #plasma, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29790
2020-05-18 20:27:59 +02:00
Ismael Asensio
db7fb26eed [kcm/kwinrules] Fix size properties not being stored
Summary:
Use `QSize`/`QPoint` to handle and store coordinate values (size and position)

Previously, the rules model stored the "coordinate" type properties as a
`QString` with format `x, y`.

This fails when setting the properties to the config schema, as it requires
a proper `QPoint` or `QSize` value, specially the latter which can't be
convert from such a string.

BUG: 421055
FIXED-IN: 5.19.0

Test Plan:
- Add a new rule and set its position and size properties
- Hitting apply stores the right values in `~\.config\kwinrulesrc`
- Close the kcm and reopen, the values are loaded
- Property detection still works for size and position

Please note that there is a pre-existing bug of some position/sizes not being
applied to the windows in some cases, when using `Apply Initially`.
Better try using the `Force` policy.

Reviewers: ngraham, #kwin, #plasma, zzag

Reviewed By: #kwin, #plasma, zzag

Subscribers: zzag, ltoscano, yurchor, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29764
2020-05-15 19:45:11 +02:00
Ismael Asensio
973957127d [kcm/kwinrules] Fix placeholder message in RulesEditor
Summary:
Fix the anchoring of the placeholder message after https://phabricator.kde.org/R108:9e5498238f88ece28f4f0d22da00879280cb7955
It needs to center on the free space, not the whole ListView.

Test Plan
Before: {F8323417}
After: {F8323416}

Reviewers: ngraham, broulik, #vdg, #plasma

Reviewed By: ngraham, #vdg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29783
2020-05-15 19:44:43 +02:00
Jonathan Riddell
d7687ce277 Update version number for 5.18.90
GIT_SILENT
2020-05-14 11:20:29 +01:00
Vlad Zahorodnii
a68c0959a6 Revert "Improve partial maximization strings"
Summary:
This reverts commit 45bf53adab.

We cannot change config values for existing users since it will break
their installations.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, bshah, broulik, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29736
2020-05-14 12:46:40 +03:00
Nate Graham
45bf53adab Improve partial maximization strings
Summary:
e.g. "Vertically maximize" is more natural and expressive than "Maximize (vertical only)"

See D29671#inline-169882.

Test Plan: New strings appear in the KCM

Reviewers: zzag, #vdg, #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29729
2020-05-13 12:31:02 -06:00
Méven Car
c483e209fe Autotests: Add a test when relaunching a maximized cliend with BorderlessMaximizedWindows
Test Plan: Test pass

Reviewers: #kwin, zzag, davidedmundson

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29702
2020-05-13 16:41:33 +02:00
David Edmundson
e8091a1d6f Follow scale of drag surfaces
Summary:
Similar to regular cursors a drag surface can have a scale.

The buffer "rect" should be in logical pixels at which point QPainter
will automatically handle everything.

CCBUG: 421395

Reviewers: #kwin, zzag, apol

Reviewed By: #kwin, zzag, apol

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29672
2020-05-13 14:44:27 +01:00
Vlad Zahorodnii
88c4de60fd [kcmkwin/kwinoptions] Use text to describe maximize button actions
Summary:
Currently, we use icons to display possible maximize button actions. The
problem with those icons is that they are confusing even for me, a person
who knows kwin in and out. The size_all icon implies that if you click the
maximize button, you'll be able to move the window around. Same goes with
the size_ver and size_hor icons, they indicate that user will start
resizing the window in the vertical and horizontal direction, respectively.

Test Plan:
Before

{F8312394}

After

{F8312395}

Reviewers: #kwin, #vdg, ndavis

Reviewed By: #vdg, ndavis

Subscribers: ngraham, ndavis, broulik, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29671
2020-05-13 09:23:36 +03:00
Nate Graham
9e5498238f [kcmkwin/kwinrules] Set saner width for Placeholder messages so they don't overflow
See D29692
2020-05-12 14:12:04 -06:00
l10n daemon script
7fed973dbb 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-05-12 11:06:12 +02:00
Kai Uwe Broulik
65f611f700 [kcmkwin/kwinrules] Change translation domain
Make it consistently kcm_kwinrules to match the KAboutData

Differential Revision: https://phabricator.kde.org/D29674
2020-05-12 10:58:30 +02:00
Vlad Zahorodnii
e19fa3d5c2 [kcmkwin/kwinoptions] Fix default for MaximizeButtonRightClickCommand
Summary:
KWin assumes that the default value for MaximizeButtonRightClickCommand
is Maximize (horizontal only).

Reviewers: #kwin, broulik

Reviewed By: broulik

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29673
2020-05-12 11:32:46 +03:00
Vlad Zahorodnii
7b751099bf Emit Workspace::clientAdded() with AbstractClient
Summary:
Currently, if one wants to monitor for new X11 and Wayland clients, they
have to listen for two signals. Workspace::clientAdded() is emitted only
for X11 and Xwayland clients, while WaylandServer::shellClientAdded() is
emitted only for xdg-shell clients. Such design doesn't scale well.

As the first towards emitting Workspace::clientAdded() for new Wayland
clients, this change replaces the X11Client parameter in the clientAdded
signal with AbstractClient.

Test Plan: Tests still pass.

Reviewers: #kwin, cblack

Reviewed By: cblack

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29665
2020-05-12 08:38:01 +03:00