Commit graph

18246 commits

Author SHA1 Message Date
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
Adriaan de Groot
fcba278094 Handle differences in paths for Linux vs FreeBSD
- The name of tty devices is different; put detection into
  the CMakeLists and pass that as a define when building
  virtual_terminal.cpp -- this means no ifdeffery for the path.
- The name of dri devices is different; FreeBSD just has one.
2020-06-05 12:41:28 +02:00
Adriaan de Groot
8826c7ff34 Fix virtual_terminal.cpp build on FreeBSD
- need to shuffle some Linux includes behind an ifdef, and some
  FreeBSD ones as well
- FreeBSD has no notion of major device numbers anymore, so the
  isTty() function can't really tell. Just ignore the check --
  I'm assuming the somewhat-standard isatty() doesn't do what
  is wanted, since otherwise it would be used.
2020-06-05 12:41:28 +02:00
Tobias Berner
33aff4fcd0 Add Findepoll.cmake
- On FreeBSD epoll.h if provided through a library (from a port, epoll-shim)
  that emulates the Linux behavior. Make a CMake module for it to hide
  differences in systems behind a module.
- Find epoll on FreeBSD and link to it

Now on FreeBSD, tries to compile virtual_terminal.cpp, which will fail because
that needs more patches.
2020-06-05 12:41:24 +02:00
Adriaan de Groot
0dce25ba0f Consolidate target_link_libraries() calls
There's no reason I can find for the various calls to
target_link_libraries to be separate, separated by export headers
2020-06-05 12:40:43 +02:00
Nicolás Alvarez
131e8aaa8a Fix comment typo
(Test for IRC notifications)
2020-06-04 15:48:33 -03:00
l10n daemon script
29915632df 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-04 05:12:36 +02:00
Shubham Jangra
48a5bfee0f [KCM] Fix label in Screen Edges system settings 2020-06-03 20:37:07 +05:30
David Edmundson
d0d1ad8c85 [wayland] Create primary selection device manager 2020-06-03 14:17:47 +01:00
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
Vlad Zahorodnii
de2c4cb4ac [wayland] Add support for cropped and scaled surfaces
The wp_viewporter compositor extension allows clients to crop and scale
their surfaces. It can be especially useful for applications wishing to
reduce their power consumption, e.g. video players, etc.

Given that there is no any direct relationship between the surface size
and the buffer size anymore, we have to use specialized helper methods
for converting coordinates from the surface-local space to buffer pixel
space and vice versa.
2020-06-03 10:00:48 +03:00
Vlad Zahorodnii
9e797cf943 [scene] Introduce helpers for mapping between different coordinate spaces
We currently deal with three distinct coordinate spaces - the window
pixmap coordinate space, the window coordinate space, and the buffer
pixel coordinate space.

This change introduces a couple of helper methods to make it easier
to map points from the window pixmap space to the other two spaces.

The main motivation behind the new helpers is to break the direct
relationship between the surface-local coordinates and buffer pixel
coordinates for wayland surfaces.
2020-06-03 10:00:48 +03:00
l10n daemon script
fe83cbf034 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-03 05:23:19 +02:00
Benjamin Port
0c9e481577 Dock with windows go below will be on top of all windows and same layer of above windows 2020-06-02 15:51:29 +02:00
Vlad Zahorodnii
78d00f6d69 [autotests] Fix the plasma surface test
Currently the plasma surface test fails because the window placement
policy for OSDs had been changed and the test wasn't adjusted.
2020-06-02 16:23:31 +03:00
Méven Car
1b1831a5ac Merge branch 'Plasma/5.19' of https://invent.kde.org/plasma/kwin 2020-06-02 11:07:57 +02: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
l10n daemon script
e302c3600d 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 05:21:54 +02:00
Vlad Zahorodnii
71bc60f4bc Fix build 2020-06-01 23:40:38 +03:00
Ismael Asensio
13f061afad Merge branch 'Plasma/5.19' 2020-06-01 20:35:11 +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
Vlad Zahorodnii
b028ae56d9 [effects/logout] Start the animation on only windowAdded or windowClosed
windowShown and windowHidden are emitted when the window becomes visible
and hidden, respectively. For example, that can be the case when the
window has been minimized or unminimized. We have to start animations
only when windowAdded or windowClosed has been emitted.
2020-06-01 15:13:03 +03:00
Vlad Zahorodnii
9d4c8fda09 [effects/slidingpopups] Start the animation on only windowAdded or windowClosed
windowShown and windowHidden are emitted when the window becomes visible
and hidden, respectively. For example, that can be the case when the
window has been minimized or unminimized. We have to start animations
only when windowAdded or windowClosed has been emitted.
2020-06-01 15:13:03 +03:00
Vlad Zahorodnii
6f822b22bb [effects/fade] Start the animation on only windowAdded or windowClosed
windowShown and windowHidden are emitted when the window becomes visible
and hidden, respectively. For example, that can be the case when the
window has been minimized or unminimized. We have to start animations
only when windowAdded or windowClosed has been emitted.
2020-06-01 15:13:03 +03:00
Vlad Zahorodnii
df9e36ee68 [wayland] Destroy XdgToplevelClient and XdgPopupClient on unmap
There are several ways to handle unmapping of a wl_surface. The first
one is to destroy the associated AbstractClient instance. The second one
is to transition the AbstractClient in a special state.

The problem with the second approach is that it makes animations such as
fade out more difficult to handle since effects in kwin are geared more
towards the first approach (destroying AbstractClient).
2020-06-01 15:13:03 +03:00
Vlad Zahorodnii
31ea780d79 [wayland] Rework xdg-shell implementation
Summary:
This change splits the XdgShellClient class to better match existing
abstractions in the xdg-shell protocol and fix a few issues related to
sending configure events.

In the new client classes, configure events are handled differently.
Instead of blocking configure events, we try to send them as late as
possible. Delaying configure events will let us merge changeMaximize()
for X11 clients and Wayland clients and it also fixes the bug where
we don't send the final configure event when user has finished resizing
a window.

Given that configure events are not sent immediately, XdgSurfaceClient
keeps the last requested frame geometry and the last requested client
geometry.

This patch doesn't intend to fix all issues in kwin's implementation of
the xdg-shell protocol. For example, we still handle surface unmapping
very poorly.

Test Plan: Tests pass.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27861
2020-06-01 15:12:59 +03:00
Vlad Zahorodnii
076b8bc14c [effects/zoom] Implement text caret tracking
The text caret tracking feature allows to keep the text caret inside the
zoomed area. It can be especially useful when the zoomed area is smaller
than the text editor.

BUG: 362189
2020-06-01 10:43:59 +03:00
Vlad Zahorodnii
c1ea0412a4 [effects/zoom] Implement focus tracking with QAccessibilityClient
Currently, the focus tracking functionality in the zoom effect does not
work because it relies on kaccessibleapp, which is dead. Luckily for us,
there is a library called libqaccessibilityclient that provides a way
to monitor focus changes.

BUG: 421234
2020-06-01 10:43:59 +03:00
Mikhail Zolotukhin
7226e75bc8 Notify about decoration theme change 2020-05-31 19:55:38 +00:00
l10n daemon script
7230c95320 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 20:24: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
379ce9327a Merge branch 'Plasma/5.19' 2020-05-31 13:42:53 +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
Ismael Asensio
d725fc59bf [kcm/kwinrules] Detect also window complete class
Summary:
When detecting the properties of a window, now it shows and lets the user select the window complete class.
If this property is selected in the overlay, `Window class` takes the whole class value, and the option `Match window whole class` is set.

This adds back a feature the old kcm was offering.

BUG: 421542
FIXED-IN: 5.20

Test Plan:
- `Detect window properties` and pick a firefox window
- The property selector shows: `Window class: navigator` and `Whole window class: navigator firefox`
- Selecting the latter set the properties as per summary

{F8334118}

Reviewers: ngraham, #kwin, #plasma, meven

Reviewed By: ngraham, #kwin, #plasma, meven

Subscribers: broulik, davidedmundson, meven, anthonyfieroni, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29791
2020-05-31 12:51:44 +02: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
Carl Schwan
1dcf514e21
Don't compare string with empty string
Summary: Instead compare string length with an integer

Test Plan: Compile && run

Reviewers: #plasma, iasensio

Reviewed By: iasensio

Subscribers: broulik, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29772
2020-05-29 22:50:01 +02:00
Vlad Zahorodnii
ab5d310119 Merge branch 'Plasma/5.19' 2020-05-29 16:48:10 +03: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
Benjamin Port
301d3defc5 Take in consideration keyboard shortcuts inhibit rename to V1 2020-05-29 11:24:04 +02:00
Benjamin Port
4a90f6ab60 Add support to keyboard shortcuts inhibitor
Summary:
- Disable all global shortcuts
- For now don't disable spies (So opening menu with meta key is not disabled for now)

Depends on D29231

Test Plan: Tested with https://github.com/swaywm/wlroots/blob/master/examples/keyboard-shortcuts-inhibit.c

Reviewers: davidedmundson, zzag

Reviewed By: davidedmundson

Subscribers: romangg, broulik, apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29272
2020-05-29 08:49:11 +00:00
Benjamin Port
98701b6f38 Wayland server getters => const 2020-05-29 08:40:36 +00:00
Vlad Zahorodnii
30a5b11148 Merge branch 'Plasma/5.19' 2020-05-29 10:55:16 +03:00
Vlad Zahorodnii
ed02ece38d Merge branch 'Plasma/5.19' 2020-05-29 10:48:45 +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
Méven Car
464203c60e Clean #if version check blocks
Since 08a21ae7b6 we now depend on Qt 5.14
2020-05-28 11:43:29 +00:00
Vlad Zahorodnii
c54d069d43 [wayland] Adjust to kwayland-server changes
"V1" suffix has been added to Display::createDataControlDeviceManager().
2020-05-28 11:58:38 +03:00