Commit graph

18616 commits

Author SHA1 Message Date
Benjamin Port
7546af6b4c KCM KWin Decoration: Add module data
depends on https://invent.kde.org/frameworks/kcmutils/-/merge_requests/19
2020-10-07 12:29:02 +02:00
Benjamin Port
5290583f8a KCM KWin Decoration: Remove isDefault
Custom code for isDefault is not needed. Indeed, testing dropdown value is not needed to know if we have a default value or not. Testing theme and border size auto is enough, and it's done automatically by KConfigXT
2020-10-07 10:14:07 +00:00
Méven Car
a7aa089ec4 ScreenshotEffect: fix ordering of screens in screenshotScreens 2020-10-06 17:07:05 +02:00
l10n daemon script
de4e429aed 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-10-06 06:04:18 +02:00
Xaver Hugl
b50f747876 Multi-GPU output support on Wayland
This commit sets up udev and the DrmBackend to list and use all GPUs.

BUG: 425586
BUG: 417323
2020-10-05 21:05:55 +00:00
l10n daemon script
1f6e615ec0 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-10-05 06:16:34 +02:00
Ismael Asensio
715f0dbbcc [kcm/kwinrules] Port to new Connections syntax
While at it remove `FIXME`comment that no longer applies
2020-10-02 23:19:59 +00:00
Andreas Hartmetz
9d77271011 Fix const / non-const iterator mismatch
Fixes the build for me. STL actually allows const and non-const
iterator comparsion, Qt containers... uh, sometimes? :>
2020-10-02 23:22:22 +02:00
Vlad Zahorodnii
0e7b02bc73 Export QDebug operator<<(QDebug , const Toplevel *)
It can be useful when debugging code in plugins, etc.
2020-10-02 13:44:10 +03:00
Vlad Zahorodnii
005377eff7 Unify code that setups client connections in EffectsHandlerImpl
Workspace::allClientList() returns all X11 and Wayland windows. So, we
don't need the two separate code paths.
2020-10-01 16:26:52 +00:00
Vlad Zahorodnii
0f9722ad69 Port DebugConsole to Workspace::allClientList()
This simplifies the code by porting the debug console away from
Workspace::clientList() to Workspace::allClientList(). The main
difference between the two is that the former returns only all X11
windows and the latter returns both X11 and Wayland windows.
2020-10-01 16:26:52 +00:00
David Edmundson
56f159dded Adapt to DataSource changes 2020-10-01 14:51:05 +00:00
Nicolas Fella
3694580e2b [kcms/effectmodel] Use KPluginMetaData to load scripted config
Instead of going through the semi-deprecated KPluginTrader and KPluginInfo we can use KPluginLoader directly.
2020-10-01 14:28:46 +00:00
Vlad Zahorodnii
bf4c67678f 3rdparty: Synchronize xcursor.{c,h} 2020-10-01 13:54:45 +03:00
Vlad Zahorodnii
1e9bd43368 scripting: Fix initialization of WorkspaceWrapper
Workspace::clientList() only returns X11 clients, while allClientList()
returns all managed clients (both X11 and Wayland).
2020-10-01 10:20:31 +00:00
Vlad Zahorodnii
1251b2cbb3 scripting: Make ClientFilterModel work for Wayland windows 2020-10-01 10:20:31 +00:00
Vlad Zahorodnii
faf6b8e049 scripting: Properly initialize clients model for Wayland windows
In some cases, a ClientLevel model may not contain all Wayland windows
because of missing if (waylandServer()) {} code path in init() method.
2020-10-01 10:20:31 +00:00
Cyril Rossi
a3caf7f6dd Port KCM KWin Decoration to SettingStateBinding 2020-10-01 09:19:32 +02:00
Albert Astals Cid
743b06d3a1 Fix kwin_rules_dialog not showing translated strings
BUGS: 427172
2020-10-01 00:29:13 +02:00
Nicolas Fella
abca052004 [kcm/decoration] Port to KPluginLoader
Summary: KPluginTrader's future is uncertain. KPluginLoader is enough here

Test Plan: Open deco KCM. Themes are listed

Reviewers: #kwin, dfaure

Reviewed By: dfaure

Subscribers: dfaure, zzag, kwin

Tags: #kwin

Maniphest Tasks: T12173

Differential Revision: https://phabricator.kde.org/D25534
2020-09-30 15:50:52 +02:00
Bhushan Shah
0a3e18e5a6 Fix build 2020-09-30 16:16:45 +05:30
Bhushan Shah
474d0344ca autotests: rename to testInputMethod
Relevant class got renamed, also update the test name

Related: plasma/kwin!302
2020-09-30 16:04:49 +05:30
Méven Car
309a656e00 Screenshot effect: add a screenshotScreens(...) to screenshot specific screens 2020-09-30 07:44:30 +00:00
Cyril Rossi
99bed106bf KCM KWin Manage default Highlight indicator for settings not handled by KCModule
For the following KCM :
* KWin Options
* KWin Screen Edges
* KWin Tabbox

KCModule introduce an indicator to show which settings have changed from
default value. Unfortunately some KCM have settings' states which are not managed
automatically by the KCModule thus we have to handle it manually.

see https://invent.kde.org/frameworks/kconfigwidgets/-/merge_requests/9
2020-09-30 09:10:23 +02:00
l10n daemon script
30b516eceb 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-09-30 06:16:48 +02:00
Bhushan Shah
222b558b04 virtualkeyboard: rename class to InputMethod
VirtualKeyboard class does not implement the relevant VirtualKeyboard
protocol but rather implements the InputMethod protcol and can in theory
be used by other input method like e.g. ibus.

Make class name consistent with what it does to avoid confusion in
future.

For now only rename of main class is done and dbus service is kept as-is
to provide retro-compatibility, when input method protocol is
implemented fully, we can think of what to do wrt the dbus interface
later when we fully implement zwp_input_method_unstable_v1 protocol.
2020-09-29 20:55:24 +05:30
Aleix Pol
f558115def scene: prefer calling mapToGlobal just once
It's the same top mapToGlobal()+operator& than the other way around and
we get to skip 1 call.
This path is the most common so we better save it.
2020-09-29 14:26:37 +00:00
Andrey Butirsky
db202f5c26 fix: redundant keyboard layout OSD notification
there is no need to display the OSD for window we are going to switch from

DIGEST:
BUG: 426122
2020-09-29 14:20:03 +00:00
Andrey Butirsky
2bbab06fc4 fix: wrong keyboard layout OSD notification
DIGEST:
BUG: 426120
2020-09-29 14:20:03 +00:00
Andrey Butirsky
769c8959d8 fix: no OSD indication when switching keyboard layout with Application Policy
When deciding do OSD or not, we need to consider not only last saved layout,
but last actual layout also, when comparing it to current one.

DIGEST:
BUG: 425590
2020-09-29 14:20:03 +00:00
Vlad Zahorodnii
4559d30399 Place internal osd windows according to placement policies
Currently, internal on screen display windows have the bypass window
manager hint set. If that hint is set, the osds must place themselves,
but they don't do it.

As far as I know, there is no any reason why internal OSDs have that
flag set.

By removing the Qt::BypassWindowManagerHint flag, we let kwin core
know that it's okay to place internal OSD windows.

BUG: 400675
2020-09-29 14:06:41 +00:00
Vlad Zahorodnii
6546ac2cae screencast: Replace EGLFence with a glFinish()
The way EGLFence is used is equivalent to calling glFinish().

CCBUG: 425869
2020-09-29 13:57:24 +00:00
Vlad Zahorodnii
6f153552da Allow calling setFrameGeometry() while the client is being resized
Currently, if some script attempts to resize a window while it's being
interactively resized, the corresponding change won't be propagated to
the X server.

The main reason for that is that we don't want to configure the frame
window, the wrapper window, and the client window twice. However, since
Xcb::Window keeps track of the last configured geometry, we can adjust
X11Client::updateServerGeometry() so it only configures windows that
have mismatching geometry.

By doing so, the setFrameGeometry() function can be called by scripts
even when the associated X11 window is being interactively resized.

Note that this bug doesn't affect Wayland windows.

BUG: 426988
2020-09-29 13:55:41 +00:00
Vlad Zahorodnii
ddb24eaf0a Fix ghost shadows left by context menus
If the shadow is destroyed immediately before the window is destroyed,
we need to schedule a workspace repaint in order to prevent showing a
"ghost" shadow.

BUG: 425294
2020-09-29 13:53:30 +00:00
Vlad Zahorodnii
12e59f9af8 Schedule workspace repaint for destroyed clients
We need to schedule a workspace repaint in case no effect is going to
animate the window.

The workspace repaint is issued before creating a Deleted because the
latter takes the owner of the effect window, which means that after an
instance of Deleted has been created, visibleRect() returns the frame
geometry.

CCBUG: 425294
2020-09-29 13:53:30 +00:00
Bhushan Shah
6d433bdfc9 virtualkeyboard: add text-input-v3 support 2020-09-29 10:56:24 +00:00
Vlad Zahorodnii
a433fb08a3 x11: Make removal of X11 event filters safe
If an X11 event filter has been activated and it unregisters another X11
event filter, then the window manager may crash because the foreach macro
in Workspace::workspaceEvent() makes a copy of m_genericEventFilters or
m_eventFilters and we can call the event() method for an already defunct
filter.

With this change, X11 event filters can be safely removed and installed
at any particular moment.

BUG: 423319
2020-09-29 08:26:28 +00:00
David Edmundson
260e75f6c9 Update systemd units
By marking as part of graphical-session we get a more graceful shutdown.

Also switched to explicit restart inside the unit. Originally I did this
with drop-ins, but this complicates wayland for now.
2020-09-29 06:10:20 +00:00
l10n daemon script
cd9acd2e41 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-09-29 06:08:11 +02:00
Carson Black
fbab964e98 Use Header color group for decoration colours 2020-09-28 16:08:52 +00:00
Carson Black
02b1e11758 Bump up minimum C++ version to C++17 2020-09-28 16:08:52 +00:00
Aleix Pol
309d6a0d5b Always include the window decoration's clipping
No need to only report opacity on the window decoration if the window
itself is opaque.
2020-09-28 15:00:36 +02:00
Vlad Zahorodnii
688dc9ac1d Adjust kwin to recent window management interface changes 2020-09-28 14:43:34 +03:00
l10n daemon script
25b93b4ccc 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-09-27 06:07:58 +02:00
l10n daemon script
e534d5abad 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-09-26 05:57:20 +02:00
Aleix Pol
375691c6c2 Improve opacity detection
If the opaque area covers all the window's shape, it means that it's an
opaque window.
This is how GTK presents opacity right now, so we'll get to skip
rendering under GTK clients and other compatible ones.
Qt is still not emitting opacity.
2020-09-25 14:08:55 +00:00
Felix Yan
a58100fc72 Correct typos in xcbutils.h 2020-09-25 08:45:06 +00:00
Vlad Zahorodnii
f24f2bd509 Enable shadow protocol support for all Wayland clients
The main motivation for this change is to enable support for our
proprietary shadow protocol in LayerShellV1Client.

Previously we couldn't move code that handles shadows in WaylandClient
because WaylandClient::bufferGeometry() was a pure virtual method.
2020-09-25 10:10:10 +03:00
Vlad Zahorodnii
989e0987d7 screencast: Ensure that there is current OpenGL context when recording a window
We need an OpenGL context otherwise we may hit an assert in libepoxy.

BUG: 425869
2020-09-24 15:47:56 +03:00
Vlad Zahorodnii
80554a3e12 Expose KWIN_XWL logging category to kdebugsettings 2020-09-24 14:56:35 +03:00