Commit graph

18858 commits

Author SHA1 Message Date
Yu Zhang
bf5155f82b fix: Restore the default properties of dialog window so that the max and min buttons can be customized 2020-11-23 18:36:08 +08:00
David Edmundson
30f9e2a570 [autotests] Fix decoration input test
QTRY_COMPARE doesn't work well with how we do our wayland event
dispatching.

We know the client hasn't processed any events yet, so we can safely do
a normal wait.
2020-11-22 23:56:44 +00:00
David Edmundson
71ce1f7a5b Add an explicit quit mechanism controlled by plasma
On X Kwin's lifespan used to be managed by XSMP. This accidentally broke
in 5.20 as we made kwin start before ksmserver for speed purposes.

This leaves kwin to be killed by the display manager as the X connection
closes, but this can lead to deadlocks.

BUG:428817

On wayland kwin's lifespan is mapped to the lifespan of the ksmserver
binary. This is problematic as it makes our entire xwayland robustness
redundant if we ultimately rely on an application that /has/ to run in
xwayland.

BUG: 427688
2020-11-22 22:04:59 +00:00
Xaver Hugl
8f104815e8 Add a QRect to showWindowMenu
This is so we don't have to rely on the cursor position for the popup

BUG: 393163
2020-11-22 21:47:31 +00:00
David Edmundson
5e60e64a5d Bundle QPA plugin directly
On wayland, we know we're always going to load our internal QPA. Instead
of shipping a plugin and loading it dynamically we can use Qt static
plugins.

This should result in slightly faster load times, but also reduce the
number of moving pieces for kwin.

This also prevents anyone outside kwin loading our QPA which wouldn't
have made any sense and just crashed.
2020-11-22 17:52:14 +00:00
Aleix Pol
786207a4ba placement: Make internal methods private 2020-11-20 18:18:52 +01:00
Aleix Pol
df395f440b placement: Remove unused function 2020-11-20 18:10:01 +01:00
Nate Graham
3df7985570 [kcmkwin/kwinscreenedges] Disable left touch edge by default
On X11, it creates a dead pixel on the left edge which interferes with
left panels, the left-nost widget on bottom and top panels, and scroll
events on the left-most pixel in various apps.

It works properly on Wayland, but unfortunately turning it off by
default only on X11 but not Wayland is not easily doable. So let's turn
it off by default everywhere.

BUG: 387775
FIXED-IN: 5.21
2020-11-20 14:25:15 +00:00
Aleix Pol
3acb1a788e xkb: Don't call the seat's keyboard if it doesn't have one
Otherwise I can't start windowed kwin
2020-11-19 22:32:52 +01:00
Aleix Pol
4f484180cd Add emit to signal calls
To signify they're emitting.
2020-11-19 22:32:08 +01:00
Aleix Pol
22658bb2b4 Prefer Q_ENUM to Q_ENUMS
It exposes more information to introspect on.
2020-11-19 22:32:08 +01:00
Niccolò Venerandi
a590dbd309 Raise default blur strenght 2020-11-19 19:53:52 +01:00
yunqiang tai
51eeacd649 Initializes 'UserActionsMenu::m_multipleDesktopsMenu' and 'UserActionsMenu::m_shortcutOperation' in the constructor 2020-11-19 11:11:03 +00:00
Bhushan Shah
3429617662 adapt to changes in seat and keyboard interface
Now several methods of keyboard_interface are public and wrappers for
them are removed from the seat_interface.
2020-11-19 06:05:45 +00:00
Nate Graham
592c82abeb [kcmkwin/kwindecoration] Clean up QML code
Various fixes:
- Remove unneeded PlasmaCore import
- Re-arrange imports to be alphabetical and grouped consistently
- Use standard import names
- Use Kirigami units explicitly
- Remove unused ids
- Remove unneeded cases of setting aproperty to its default value
- Use Layouts where appropriate instead of lots of anchors
- Reduce number of unnecessary items
- Fix inappropriate mutation of `width` and `height` inside layouts

Visual changes are extremely minor and of a bugfixy nature.

BUG: 428883
FIXED-IN: 5.21
2020-11-18 14:53:11 +00:00
Chaojiang Luo
99c5f0aed6 fix: Restore full screen window to the right screen
We should use the geometry restore to check the full screen workspace
to make sure the window is on the right screen.
Step:
    1.plug extend display, change to Extend mode
    2.start a window, move to extend display, change to fullscreen
    3.unplug the extend display
    4.re-plug the extend display
Now, the full screen window do not restore to the extend display
2020-11-18 10:08:30 +00:00
xinbo wang
44b2a3f872 fix: magiclamp effect wrong direction.
if the dock is on the top,and the dock is not close together with screen edge.
for example,the dock is 10 pixels taller then sceen edge,the "position" will be "Bottom".
Autually,the dock is on the top of screen.
2020-11-18 10:06:06 +00:00
Nicolas Fella
fe6c296073 [libkwineffects] Add windowId to EffectWindow
My use case is integrating with a system that tracks window properties based on the windowId. This allows the effect to do window-specific things.
2020-11-17 21:56:17 +00:00
Nicolas Fella
3281569c12 Fix typos in comment 2020-11-17 21:55:42 +00:00
Xaver Hugl
cb9ccdb0fd Don't check atomic property non_desktop when not using atomic mode setting 2020-11-17 08:10:51 +00:00
Ismael Asensio
871611e9ec kcm/decorations: Fix border size updating for thumbnails
The property was only being updated on changes, but reset back
to `Normal` on KCM loading or after clicking Apply.
2020-11-16 17:23:07 +00:00
Ismael Asensio
47efd17763 kcm/decorations: Fix thumbnail border size on theme change
Correctly update the thumbnails' border sizes when the theme
changes and `Theme's Default` is selected,
as different themes may have different border defaults.

Before 9cf52340e, this was implicitly done on QML side.
Do it explicitly now on C++ side.
2020-11-16 16:29:30 +00:00
David Edmundson
88f1883e90 Update to wayland-server changes for plasmashell 2020-11-16 10:10:08 +00:00
l10n daemon script
7659261982 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-11-16 06:14:08 +01:00
l10n daemon script
d36e326d66 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-11-14 06:42:08 +01:00
Ismael Asensio
9cf52340ef kcm/decorations: Simplify border selection
Use a single combobox instead of checkbox + combobox.
Adds a new property that acts as a proxy for the configuration value,
while internal configuration properties are kept unchanged.

BUG: 426157
BUG: 417430
FIXED-IN: 5.21
2020-11-13 22:00:04 +01:00
Ismael Asensio
1829dce1a9 kwinrules: Show error when detected window is unmanaged
BUG: 340477
2020-11-13 20:29:01 +01:00
Ismael Asensio
bf7e7b2130 kwinrules: Improvements on Detect Properties button
Slight UX and code improvents:

- Disable the detection button when property sheet is open.

- Add a minimum limit (smallDuration) to the delay before detecting
a window. Otherwise we freeze the window before even showing the
button release feedback, which can feel unexpected

- Prefer Q_INVOKABLE over public slot to expose method to QML
2020-11-13 20:18:04 +01:00
Vlad Zahorodnii
f26eeb9706 Use consistent naming for begin/end frame hooks
Currently, the OpenGLBackend and the QPainterBackend have hooks to
indicate the start and the end of compositing cycle, but in both cases,
the hooks have different names. This change fixes that inconsistency.
2020-11-12 09:14:57 +02:00
Vlad Zahorodnii
76303888ab Unify begin/end frame hooks in OpenGLBackend 2020-11-12 09:14:54 +02:00
Vlad Zahorodnii
81abc341d7 Remove assert in Compositor::aboutToSwapBuffers()
The purpose of Compositor::aboutToSwapBuffers() is notify the compositor
about a pending buffer. It's totally safe to call it multiple times if you
have multiple outputs. Ideally, it should also take an AbstractOutput or
screen id, but with the introduction of render loops per each output, we
won't need Compositor::aboutToSwapBuffers(). So, for the time being, this
change drops the annoying assert to make necessary per screen rendering
related refactorings easier to perform.
2020-11-11 22:03:45 +02:00
Vlad Zahorodnii
755dd81e49 Refactor how per screen rendering is handled
In order to allow per screen rendering, we need the Compositor to be
able to drive rendering on each screen. Currently, it's not possible
because Scene::paint() paints all screen.

With this change, the Compositor will be able to ask the Scene to paint
only a screen with the specific id.
2020-11-11 22:03:45 +02:00
Konrad Materka
d2f3372749 Fix Connections warnings
Qt 5.15 introduced new syntax for defining Connections. Fix warnings like this one:
QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
2020-11-11 19:22:40 +00:00
Vlad Zahorodnii
7cab8cf8bb Make Scene::qpainterRenderBuffer() take a screen id 2020-11-11 07:22:10 +00:00
Vlad Zahorodnii
94b731c196 Prepare QPainter render backend for per screen rendering 2020-11-11 07:22:10 +00:00
Vlad Zahorodnii
edfb0a3fd9 Drop support for X11 overlay windows in QPainter render backend
It's unused.
2020-11-11 07:22:10 +00:00
Vlad Zahorodnii
e4861c28a7 scenes/qpainter: Drop support for Xinerama-style rendering
All platforms that provide support for the QPainter render backend use
per screen rendering. Since there is no any way to test Xinerama-style
rendering, it's better to drop the dead code.
2020-11-11 07:22:10 +00:00
Marco Martin
f64bea0f68 move decorations kcm to appearance
the application style category doesn't exist anymore
2020-11-10 14:03:36 +00:00
Aleix Pol
8ba6006a1b startupfeedback: Prefer using smart pointers to raw
Better security and less boilerplate.
2020-11-10 12:12:27 +00:00
Aleix Pol
4d549d76be startupfeedback: Don't use a lambda unnecessarily 2020-11-10 12:12:27 +00:00
Aleix Pol
35fe4fa7c1 startupfeedback: Properly check if a vector is empty 2020-11-10 12:12:27 +00:00
Niccolò Venerandi
6af6a942e9 Raise blur strenght 2020-11-10 10:14:06 +00:00
Vlad Zahorodnii
e398a7cd1a Drop Toplevel::windowId()
A window id generated by WaylandServer may reference an X11 window
with the same id, which can result in undefined behavior.

The main reason why we needed windowId() was because of the task
switcher. However, since tabbox uses internal ids now, the window id
property can be dropped.
2020-11-10 09:58:07 +00:00
Jonathan Marten
6d7e8fc8a5 Fix for Clang: clockskewnotifierengine_linux.cpp needs <cerrno>
GCC doesn't seem to mind, but Clang complains that 'errno' is not
defined.
2020-11-09 09:51:45 +00:00
Nicolas Fella
37ba0404c8 [kcms/effectsmodel] Add config module role to effectsmodel and use it to open config
For builtin effects the information comes from the EffectData struct.
For plugin effects the X-KDE-ConfigModule key is read from the plugin metadata.
For plugins that do not yet make use of it we fall back to the old way.
For scripted effects this is empty since the config is loaded in a different way.
2020-11-08 13:36:32 +00:00
Nicolas Fella
49ed0361fd Add config module information to builtin effects
Add a new field to EffectData that stores an effect's config module.

We currently determine an effect's configModule using KPluginTrader and the X-KDE-ParentComponents metadata.
IMO it's much more straight forward to let the effect specify its config module directly instead.
2020-11-08 13:36:32 +00:00
Nicolas Fella
648f495830 Add missing includes
It worked until now because they were included transitively
2020-11-08 13:36:32 +00:00
l10n daemon script
2be28ac65a 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-11-08 06:22:50 +01:00
Fabian Vogt
f790cca3fb Make kwin-5.21-desktop-grid-click-behavior.py use Python 3
python refers to python2, which is not desired.
kwin-5.18-move-animspeed.py already uses python3.
2020-11-07 12:00:45 +00:00
l10n daemon script
d830f41cc3 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-11-07 06:30:51 +01:00