Commit graph

18180 commits

Author SHA1 Message Date
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
Vlad Zahorodnii
23113d38c6 Update cached client size when the client geometry has changed
The usage of geometryShapeChanged() is highly discouraged because it is
emitted when geometry of any kind has been changed, e.g. buffer geometry,
frame geometry, etc.

This change ports DecoratedClientImpl to the clientGeometryChanged()
signal, so the cached client size will be updated only after the client
geometry has actually changed.
2020-06-18 07:40:58 +00:00
Vlad Zahorodnii
cc3eb54b32 Introduce the client geometry in Toplevel
In most cases, we don't need to react to client geometry changes, but in
code that deals with server-side window decorations, we need to react to
client geometry changes. The problem is that frame and client geometry
updates are not correlated even though there is a connection between the
frame geometry and the client geometry.

This change introduces the client geometry in the Toplevel class in order
to allow monitoring client geometry updates from DecoratedClientImpl.
2020-06-18 07:40:58 +00:00
Vlad Zahorodnii
68ec39f433 [xwayland] Ensure that DataBridge is initialized prior to PropertyNotify
Since WaylandCursorImage no longer flushes the internal connection
connection and dispatches events, the DataBridge must do it to ensure
that the selections are initialized prior to receiving a ProperyNotify
event.
2020-06-18 07:14:58 +00:00
Vlad Zahorodnii
cb7a9456c0 [wayland] Rework Xcursor theme loading code
Currently in order to load an Xcursor theme, kwin uses libwayland api,
which looks really awkward because of the way how the compositor talks
to itself via the internal connection.

The main motivation behind this change is to limit the usage of kwayland
client api in kwin.
2020-06-18 07:14:58 +00:00
Vlad Zahorodnii
317bc74c86 [wayland] Simplify WaylandCursorImage
Cached cursor lookup tables aren't used anywhere so drop relevant methods
that populate those tables in order to make the code simpler.
2020-06-18 07:14:58 +00:00
l10n daemon script
f3356b1f4f 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 09:05:32 +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
l10n daemon script
c10fe06d06 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 05:44:57 +02:00
l10n daemon script
da239b2006 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 17:28:29 +02:00
Vlad Zahorodnii
f79d4ba05f Merge branch 'Plasma/5.19' 2020-06-17 18:07:23 +03: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
l10n daemon script
0e117c49a1 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 14:12:29 +02:00
Vlad Zahorodnii
da6c775d11 Merge branch 'Plasma/5.19' 2020-06-17 11:05:27 +03:00
Vlad Zahorodnii
e26f590dd2 Merge branch 'Plasma/5.19' 2020-06-17 11:04:05 +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
Méven Car
e3df2e15a6 ScreenshotEffect: Use Service Property to authorize screenshot without confirmation
Summary:
Restrict to process with `X-KDE-DBUS-Restricted-Interfaces=org.kde.kwin.Screenshot` in their corresponding Service file,
 to take screenshots.
Such a program can now take immediate screenshots.

Adds a utility file to group KService related logic.

Needed for D29408

Reviewers: #kwin, apol, davidedmundson, bport, zzag

Reviewed By: #kwin, davidedmundson

Subscribers: ngraham, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29407
2020-06-16 19:00:04 +02:00
Jonathan Riddell
ed50b1b614 Update version number for 5.19.1
GIT_SILENT
2020-06-16 13:29:52 +01:00
David Edmundson
2c55df788f [wayland] Update to kwayland-server appmenu changes 2020-06-15 10:34:46 +01:00
David Edmundson
7a861d07aa Merge branch 'master' of https://invent.kde.org/plasma/kwin 2020-06-15 10:30:20 +01:00
Ismael Asensio
d9154ef350 Merge branch 'Plasma/5.19' 2020-06-12 16:58:09 +02:00
Nate Graham
87578bfc15 Allow corner-tiling by quickly combining edge tiling shortcuts
Currently the only way for a uuser to invoke corner-tiling is to
manually set shortcuts for them. This patch adds another option: invoke
the existing shortcuts for edge tiling in a combined manner in quick
succession.

For example, hitting Meta+Left and then Meta+Up within a one-second
period will tile the active window into the top left corner. In practice
you hold down the Meta key and then press Left then Up (or Up and then
Left), and I think it feels very natural. Linux Mint's window manager
has this feature and I always missed it when I left Mint for the KDE
world.

Autotests for existing tiling shortcuts are adjusted to not break, and
additional tests for the new tiling options are added.
2020-06-12 13:50:24 +00:00
David Edmundson
83f5362925 [xwl] Fix clipboard clearing after externally changed
1c2f23d31c swapped round things so we
manage a dataSource rather than a dataDevice which may or may not have a
source.

In introduced a bug on clear. We only want to clear the wayland's
clipboard if xwayland owns the current clipboard. Otherwise we reset the
clipboard if some other client sets the selection. There's also no need
to wait for this to go through from our internal client to the server
representation - we can just clear immediately
2020-06-12 09:46:39 +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
Alain Knaff
e9c68f36bd [x11] Send a valid timestamp in TakeFocus messages
Kwin sends out undated WM_TAKE_FOCUS client messages. Gtk based
applications such as Firefox react to these by handing focus to one of
their subwindows using XSetInputFocus(), and pass on the null time field
that they received in the client message to XSetInputFocus().

If for whatever reason the application (firefox) is slow to process the
event, it might issue that XSetInputFocus() message at a time when it
has already lost focus to the next application. This results in Firefox
stealing back the focus from the next application. Normally, such an
occurrence would not happen, as the server could tell by the time field
that the message is stale.

Until 2016 (e73e331f35) kwin *used* to
send a valid timestamp, but this got deliberately broken to appease some
Java Applications which were "extremely picky" and would refuse focus.

This was based on the assumption that no other toolkit used the
timestamp from take focus events which is now proven to be false.

ICCCM document states:

Windows with the atom WM_TAKE_FOCUS in their WM_PROTOCOLS property may
receive  a ClientMessage event from the window manager (as described in
section 4.2.8) with WM_TAKE_FOCUS in its data[0] field and a valid
timestamp (i.e. not CurrentTime ) in its data[1] field."

BUG: 421068
2020-06-10 11:11:08 +01:00
Vlad Zahorodnii
c890996a33 [scene] Setup scene window connections with correct receiver object
We need a couple of connections to ensure that the window pixmap, the
window quad cache, and the window shape get discarded when the geometry
of the toplevel has been changed. Currently, those connections are
created with the receiver object being the scene. The problem is that
the associated wayland surface may outlive the toplevel and we don't
cleanup the connections after the scene window has been destroyed.

The fact that the connections don't get destroyed can lead to accessing
dangling pointers, which may result in a crash.

In order to ensure that the connections are broken automatically when
the scene window is destroyed, we need to ensure that the received
object is the scene window. That way, the connections will be destroyed
automatically.
2020-06-10 09:36:55 +03:00
Vlad Zahorodnii
430b63d13b [scene] Rename a scene window method
This change renames invalidateQuadsCache() to discardQuads() because the
latter name is shorter and it aligns with pre-existing method names.
2020-06-10 09:18:32 +03:00
Vlad Zahorodnii
cb4dc0ff9d [scene] Make the scene window a qobject
Since the scene window is not a QObject, we cannot connect toplevel's
signals directly to the scene window's slots.
2020-06-10 09:13:35 +03: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
c2126f9ce1 Merge branch 'Plasma/5.19' 2020-06-07 21:56:32 +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
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