Commit graph

17984 commits

Author SHA1 Message Date
Ismael Asensio
7706e17d94 Port away from deprecated KIconLoader::IconSize
Summary: Use `QStyle::pixelMetrics` instead

Test Plan:
No compiler warning
Icon still happily bounces on application launch

Reviewers: #kwin, davidedmundson, broulik

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T11637

Differential Revision: https://phabricator.kde.org/D27726
2020-02-29 00:29:13 +01:00
Vlad Zahorodnii
fcea0eb218 [autotests] Fix PointerInputTest::testCursorImage()
Summary:
    FAIL!  : KWin::PointerInputTest::testCursorImage() Compared QImages differ in device pixel ratio.
       Actual   (((p->cursorImage()))): 2
       Expected (blueScaled): 1
       Loc: [/home/vlad/Workspace/KDE/src/kde/workspace/kwin/autotests/integration/pointer_input.cpp(1058)]

Test Plan: The test passes.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27725
2020-02-28 19:22:23 +02:00
Vlad Zahorodnii
fb114dfba3 Return early if we ignore resize increments and aspect ratio constraints
Summary:
If we know that we are going to disobey resize increment and aspect ratio
geometry hints, then there is no point for trying to constrain the client
size according to those hints. Just return early.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27031
2020-02-28 17:13:01 +02:00
Vlad Zahorodnii
b8f1c09cfd Honor minimum and maximum size of InternalClient
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26831
2020-02-28 17:13:01 +02:00
Vlad Zahorodnii
2b120e07ca [wayland] Honor xdg-toplevel size constraints
Summary:
This change ensures that we honor surface size constraints specified by
xdg-toplevel clients.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26830
2020-02-28 17:13:01 +02:00
Vlad Zahorodnii
c3abe87f4c Document AbstractClient::minSize() and AbstractClient::maxSize()
Summary:
Clarify that AbstractClient::minSize() and AbstractClient::maxSize()
specify the minimum and the maximum client size.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26829
2020-02-28 17:13:01 +02:00
Vlad Zahorodnii
a75fb7f84e Refactor geometry constraints code
Summary:
Currently, there are a couple of issues with sizeForClientSize(). First
of all, we have a method called clientSizeToFrameSize() which does similar
thing except applying geometry constraints and checking window rules. The
other issue is that sizeForClientSize() is doing a bit too much, it checks
window rules, it applies a bunch of geometry constrains. Sometimes it
does not perform conversion between client sizes and frame sizes!

This change attempts to address those issues by replacing sizeForClientSize
with two similar methods and changing semantics of some methods of the
X11Client class.

The most significant difference between sizeForClientSize() and the new
methods is that neither constrainClientSize() nor constrainFrameSize()
check window rules. This is up to users of those methods. In many places,
we don't have to check window rules because we check isResizable(),
which returns false if the frame size is enforced by a window rule.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26828
2020-02-28 17:13:01 +02:00
Roman Gilg
5b6e081af2 [libinput] Send touch events with respect to device rotation
Summary:
Touch events coming from libinput devices must be transformed according to the
current device rotation.

Test Plan: Manually.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25921
2020-02-28 19:56:55 +05:30
Roman Gilg
7c70b344f5 [platforms/drm] Fix cursor output rotation
Summary:
The calculation of cursor position and orientation on outputs rotations other
than 0° and 180° was faulty.

This patch fixes both.

Test Plan: In live session cursor looks and moves as expected.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25909
2020-02-28 19:48:43 +05:30
David Edmundson
8ff01fa60c [platforms/drm] Rewrite rotation rendering to use MapTexture
Summary:
The previous code uses a fixed version of GSLS which does not match our suported GL targets. We need both, using kwin's existing MapTexture framework we can achieve the same thing in a better way with less code.

Test Plan:
Had some slight issues with the rotation, but everything appeared the same
as when I applied the patchset with the custom shader.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26371
2020-02-28 12:22:42 +00:00
Roman Gilg
8180662233 [platforms/drm] Introduce Gl post-process output rotations
Summary:
In case the hardware is not able to rotate the output for the configured
rotation value do this rotation in a post-process step.

For that rendering the current view into a separate framebuffer bound to a
texture that then gets sampled to the default framebuffer in an additional
rendering pass through a simple shader rotating it.

This allows us to leave the Effects system and internal model-view-projection
matrix untouched. The rotation in the post-processing step is isolated.

BUG: 389665
FIXED-IN: 5.18

Test Plan: With KScreen all rotations work.

Reviewers: #kwin

Subscribers: davidedmundson, PureTryOut, z3ntu, zzag, univerz, kwin

Tags: #kwin

Maniphest Tasks: T6106

Differential Revision: https://phabricator.kde.org/D25907
2020-02-28 12:22:42 +00:00
Roman Gilg
429fe05856 Cache output transformation first
Summary:
First we need to set a transformation, then update the backend. In DRM the
cursor gets updated and needs the new transformed size.

Longterm we need a pending state if we want to apply configuration changes
atomically or deny them.

Test Plan: Compiles.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25903
2020-02-28 12:22:42 +00:00
Roman Gilg
15de237dbe Add modeSize getter
Summary:
The getter pixelSize rotates the size of the mode. In contrast modeSize just
directly returns the current mode size.

Test Plan: Compiles

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25901
2020-02-28 12:22:42 +00:00
Roman Gilg
f246768468 Inform Screens about size change
Summary:
Changes to a Wayland output that could affect the overall geometry
need to be communicated to the Screens class.

Test Plan: Compiles, runtime tested with other patches for rotation.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25900
2020-02-28 12:22:42 +00:00
Roman Gilg
9c398de683 [libkwineffects] Set original backend framebuffer for render targets
Summary:
KWin only renders into the default framebuffer, which is for example an EGL
surface.

To prepare a post-processing step with a different framebuffer allow the
framebuffer to be changable. For that KWin's current framebuffer must be
communicated to the GLRenderTarget class, which otherwise does not set it back
to KWin's current one when a render target is disabled again.

Test Plan: Compiles, with other patches for Gl based screen rotation

Reviewers: #kwin

Subscribers: fredrik, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25904
2020-02-28 12:22:42 +00:00
Roman Gilg
dfea5798f1 [platforms/drm] Add hardware transformation API
Summary:
Planes might be able to do transformations without compositing required.
When changing the current transform try this with the primary plane. If this
fails fall back to no transformation at all through hardware and communicate
the fact and other information through some getters.

Also adds an environment variable to never do hardware transformations.

Test Plan: Compiles.

Reviewers: #kwin

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25906
2020-02-28 12:22:42 +00:00
David Edmundson
ed5768181e Honour panelTakesFocus for other plasmashell types
Summary:
The semantics of a window taking focus on user interaction apply to more roles. See D25851.

Given it is used by `KWindowSystem::forceActivateWindow` in kwayland-integration, it makes sense to pass focus to the window once it gets this property set.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25968
2020-02-28 12:22:42 +00:00
David Edmundson
41b02f2356 [x11client] Make activity handling more consistent across windows
Summary:
Typically by default newly added toplevel windows are added only to the
current activity.

Initially windows with no borders were added to all activities. This
causes problems particularly now with the newer frame extents support
leaving window behaviour quite inconsistent.

Since the time of the original code the taskbar gained control for
controlling activities allowing at least one method of changing them.
This means we can use this as the new filter.

BUG: 274931

Test Plan:
Opened gtk3-demo
Switched activities, it wasn't on the new one
Went back, altered it through the taskmanager, it worked

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27690
2020-02-28 11:41:59 +00:00
Vlad Zahorodnii
e32374abc9 [autotests] Add tests for PMinSize, PMaxSize, and PResizeInc geometry hints
Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27400
2020-02-28 11:42:40 +02:00
l10n daemon script
5411a5f770 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-02-28 05:55:39 +01:00
l10n daemon script
d664b8fdbf 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-02-27 05:57:15 +01:00
Daniel Vrátil
33a1777a5a
Decode full monitor vendor name from EDID using hwdata
Test Plan:
KScreen now shows "Dell Inc." instead of DEL and
"Eizo Nano Corporation" instead of ENC in output names, which
matches closer to what's written on my monitors.

Reviewers: graesslin, davidedmundson, #plasma

Reviewed By: davidedmundson, #plasma

Subscribers: apol, feverfew, ngraham, davidedmundson, mart, kwin, sebas

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D10041
2020-02-26 12:37:11 +01:00
l10n daemon script
ce306a598a 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-02-26 06:07:20 +01:00
Nate Graham
04aff77f94 Remove the "Candy" category and fold its contents into "Appearance"
Summary:
The "Candy" category suffers from some problems:
- It does not need to exist; everything in it is purely appearance-related and could live in the existing "Appearance" category
- The name is inappropriate; "Eye Candy" would be better, but changing it to this has proven controversial in the past

Let's just remove the category and move everything in it into the "Appearance" category.

Test Plan:
Apply and compile
Open Desktop Effects KCM
See that the "Candy" category is no more and the "Appearance" category has more stuff in it

Reviewers: #kwin, #vdg, zzag, abetts

Reviewed By: #kwin, #vdg, zzag, abetts

Subscribers: abetts, zzag, kwin, kde-doc-english, GB_2

Tags: #kwin, #documentation

Differential Revision: https://phabricator.kde.org/D27658
2020-02-25 11:26:27 -07:00
Nate Graham
1d7202af50 Improve strings for "Show Desktop" effects
Summary:
Problems with the current strings:
- Incorrect capitalization
- Grammatical errors ("to show the latter")
- Inappropriate obscure references ("This might remind you of something.")
- Redundancy (mentioning "showing the desktop" when the KCM's header already shows this)

The above issues are fixed.

Test Plan:
Before: {F8129332}
After: {F8129331}

Reviewers: #vdg, #kwin, filipf, zzag

Reviewed By: #vdg, #kwin, filipf, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27630
2020-02-25 09:37:22 -07:00
Jonathan Riddell
fcbbcc3078 Update version number for 5.18.2
GIT_SILENT
2020-02-25 12:34:33 +00:00
Nicolas Fella
f175460e07 Merge branch 'Plasma/5.18' 2020-02-22 12:02:14 +01:00
Nicolas Fella
8fb839f682 [kcm/effects] Clip ListView
Summary:
Otherwise the content overflows the frame when scrolling.

QQC2 scrollview docs say "ScrollView does not automatically clip its contents. If it is not used as a full-screen item, you should consider setting the clip property to true"

Test Plan:
Before:
{F8121150}

After:
{F8121152}

Reviewers: #kwin, #plasma, ngraham

Reviewed By: ngraham

Subscribers: ngraham, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27558
2020-02-22 12:01:19 +01:00
Nicolas Fella
7159684ced Revert "[kcm/effects] Clip ListView"
Bad merge

This reverts commit b713044216.
2020-02-22 11:53:59 +01:00
Nicolas Fella
b713044216 [kcm/effects] Clip ListView
Summary:
Otherwise the content overflows the frame when scrolling.

QQC2 scrollview docs say "ScrollView does not automatically clip its contents. If it is not used as a full-screen item, you should consider setting the clip property to true"

Test Plan:
Before:
{F8121150}

After:
{F8121152}

Reviewers: #kwin, #plasma, ngraham

Reviewed By: ngraham

Subscribers: ngraham, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27558
2020-02-22 11:52:49 +01:00
Nicolas Fella
cdc5ea19ab Revert "[kcm/effects] Clip ListView"
Bad merge

This reverts commit 5babf52df4.
2020-02-22 11:50:30 +01:00
Nicolas Fella
5babf52df4 [kcm/effects] Clip ListView
Summary:
Otherwise the content overflows the frame when scrolling.

QQC2 scrollview docs say "ScrollView does not automatically clip its contents. If it is not used as a full-screen item, you should consider setting the clip property to true"

Test Plan:
Before:
{F8121150}

After:
{F8121152}

Reviewers: #kwin, #plasma, ngraham

Reviewed By: ngraham

Subscribers: ngraham, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27558
2020-02-22 11:48:51 +01:00
l10n daemon script
3af031145f 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-02-22 05:46:53 +01:00
Vlad Zahorodnii
b9cb1d0f1d Merge branch 'Plasma/5.18' 2020-02-21 13:57:14 +02:00
Vlad Zahorodnii
275082ad49 Schedule a workspace repaint in AbstractClient::minimize()
Summary:
We need to schedule a workspace repaint in minimize() to ensure that
there are no ghost windows on Wayland.

Test Plan:
Make sure that window minimization effects are disabled,
minimize a window. Without this patch, you are going to see a ghost
window. With this patch, no ghost window.

Reviewers: #kwin, davidedmundson, apol

Reviewed By: #kwin, davidedmundson, apol

Subscribers: apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27516
2020-02-21 13:56:55 +02:00
l10n daemon script
41735fdd10 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-02-21 09:42:45 +01:00
David Edmundson
39798bffb1 [plastik] Disable problematic text hints
Summary:
Use of "style: Text.Raised" combined with UTF-8 emoji characters
currently crashes deep in font rendering code.

A report has been submitted upstream:
https://bugreports.qt.io/browse/QTBUG-82311

Given this crash is surprisingly common, this patch removes the text
shadow. I normally would be against removing features, but this was a
subtle effect anyway and frankly just made things look blurry. I doubt
it'll be missed.

BUG: 417699
BUG: 413179

Test Plan:
Made unit test for the crash in qmlscene
Fixed the issue there

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27488
2020-02-19 08:27:17 +00:00
Cyril Rossi
c0afbb2cf8 KCM KWinTabBox port to KConfigXT : use generated kcfg settings to load and save config
Reviewers: ervin, bport, meven, #kwin, zzag

Reviewed By: meven, #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27323
2020-02-18 14:11:55 +01:00
Jonathan Riddell
fb2fa0ff5f Update version number for 5.18.1
GIT_SILENT
2020-02-18 12:40:05 +00:00
Vlad Zahorodnii
63fa013334 Merge branch 'Plasma/5.18' 2020-02-18 11:16:56 +02:00
Vlad Zahorodnii
cfa5daaad1 Fix misplaced client windows
Summary:
This regression was introduced by me, sorry. The client window may be at
location other than (0, 0), in which case we have to move it to (0, 0)
to ensure that the client contents is not covered by window frame.

BUG: 417584
FIXED-IN: 5.18.1

Reviewers: #kwin, broulik

Reviewed By: broulik

Subscribers: broulik, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27456
2020-02-18 11:16:44 +02:00
l10n daemon script
03407fcf59 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-02-17 09:45:31 +01:00
l10n daemon script
91abcdbcfa 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-02-17 05:51:10 +01:00
Yuri Chornoivan
90a73b39d4 Extract messages from header file as well, optimize extraction 2020-02-16 11:55:17 +02:00
l10n daemon script
186f6487af 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-02-16 10:09:35 +01:00
l10n daemon script
7cee10d89e 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-02-16 05:56:41 +01:00
Vlad Zahorodnii
1b528c4020 Merge branch 'Plasma/5.18' 2020-02-14 02:02:12 +02:00
Vlad Zahorodnii
4f9cbe4369 [autotests] Make XWaylandInputTest more robust 2020-02-14 02:02:04 +02:00
Vlad Zahorodnii
6a2fc3d8ce Merge branch 'Plasma/5.18' 2020-02-14 01:50:48 +02:00
Vlad Zahorodnii
1181af2cd1 Provide input geometry and input transformation matrix for Xwayland clients
Summary:
We need to provide the input geometry and the input transformation
matrix for Xwayland clients in order to make sure that input events
are correctly mapped from the global screen coordinates to the
screen-local coordinates.

BUG: 417444
FIXED-IN: 5.18.1

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27375
2020-02-14 01:49:27 +02:00