Commit graph

17855 commits

Author SHA1 Message Date
David Edmundson
0a65681596 [kcmkwin] Make dialog non blocking
Summary:
It's invoked from QML.

Nested event loops invoked directly from QML is asking for crashes.

BUG: 419118

Test Plan:
Opened KCM
Opened dialog for some settings
Window was still modal as before
Settings were saved
(though they didn't seem to be applied..maybe another bug?)

Reviewers: #kwin, apol

Reviewed By: apol

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28293
2020-03-30 17:27:11 +01:00
Vlad Zahorodnii
9755ef20e5 [kwineffects] Port GLPlatform to QRegularExpression
Test Plan: kwinglplatformtest still passes.

Reviewers: #kwin, apol

Reviewed By: apol

Subscribers: apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28320
2020-03-30 16:00:46 +03:00
Aleix Pol
c9c6fa818d Don't position plasma surfaces if a position wasn't requested
Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28429
2020-03-30 14:49:56 +02:00
Aleix Pol
27634d00c0 Prefer holding a reference to an object we're going to call
Summary: It's more correct and fixes a warning

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28430
2020-03-30 14:49:27 +02:00
Aleix Pol
7db9129521 Figure out nested wayland dismantle
Summary:
Fixes a crash we would get, we're changing 2 main things:
- release the event queue first, otherwise we'd serve events to
disappearing objects.
- destroy the connection thread object after the thread has quit.

Test Plan: KWin doesn't explode when closing.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28340
2020-03-30 13:41:32 +02:00
Méven Car
5498ed9565 KCM/Kwinoptions: Port focus tab to KConfigXT
Summary:
* remove singleton of KWinOptionsSettings

Depends on D27477

Test Plan:
* No functional change
* default / reset button work as expected.

Reviewers: ervin, bport, hchain, crossi, #kwin, zzag

Reviewed By: ervin, #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27934
2020-03-30 10:13:16 +02:00
Méven Car
519c4df57c KCM/Compositing: Use KConfig XT to store values
Summary:
 * Clean a little the code
 * Improve a little the UI

Test Plan:
Before:
{F8167763}
After:
{F8167764}

Reviewers: #kwin, ervin, bport, crossi, hchain, zzag

Reviewed By: #kwin, ervin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27955
2020-03-30 09:14:25 +02:00
l10n daemon script
4cfdb33005 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-03-30 06:16:09 +02:00
Nate Graham
128dd967c7 Merge branch 'Plasma/5.18' 2020-03-29 18:17:54 -06:00
Eugene Popov
ae022e92c9 [kcmkwin/kwindesktop] Fix inability to create more than one row on the "Virtual Desktops" settings page
Summary:
When a spinbox with the number of rows loses focus, the value of this spinbox (i.e., the count of rows) is always reset to 1. Thus, it's impossible to create more then one row.

To fix this bug, we need to implement `valueFromText` function.

BUG: 419141
FIXED-IN: 5.18.4

Reviewers: ngraham, zzag, davidedmundson

Reviewed By: ngraham, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28378
2020-03-29 18:15:05 -06:00
Roman Gilg
f8bafef294 Adapt to new KScreenLocker API
Summary:
KScreenLocker only anymore takes an FD when it tries to lock. The connection
is created and kept internally in KWin.

At the moment we do not do any further checks on the lock but directly hand
over an FD whenever KScreenLocker is about to lock.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28085
2020-03-28 23:02:46 +01:00
Kai Uwe Broulik
5e8038a1a1 [workspace] Use qDeleteAll
Rather than a foreach with questionable indentation

Differential Revision: https://phabricator.kde.org/D28334
2020-03-27 14:25:02 +01:00
Vlad Zahorodnii
bdd6882767 [kwineffects] Drop KWIN_GL_DEBUG
Summary:
It has been broken for many years and no one has filed bug
reports about it (besides me).

BUG: 419285

Test Plan: Ran kwin with KWIN_GL_DEBUG and it still works.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28332
2020-03-27 12:29:24 +02:00
l10n daemon script
2f6e9a6355 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-03-27 06:43:00 +01:00
Aleix Pol
745981f4c5 Fix build, pass a QRect instead of its 4 components 2020-03-26 16:51:32 +01:00
Aleix Pol
5eb84af469 Remove overloads on virtual methods
Summary:
Prefer virtual methods that take QRect and QSize rather than multi-int versions.
Makes for clearer API and reduces the amount of code that was taking all of the
components and turn it into a class.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28283
2020-03-26 16:10:10 +01:00
l10n daemon script
f18109d9c4 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-03-26 10:48:29 +01:00
l10n daemon script
7fc05f1cf6 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-03-26 06:24:43 +01:00
Aleix Pol
48a8fdbdc7 Fix output initialization
Summary: Fixes a regression where displays would not be available to kscreen.

Test Plan: Can configure my screens again.

Reviewers: davidedmundson

Reviewed By: davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28243
2020-03-24 17:24:45 +01:00
David Edmundson
e323e62202 fix misleading indendation 2020-03-24 15:57:32 +00:00
David Edmundson
754b90c72f Create screens before screen edges
Summary:
Screens is used in screenEdges in a recent refactor

This didn't affect wayland as main_wayland creates screens earlier
itself. We can't move creation into main_x11 as X11's screens uses an
event filter which relies on workspace existing.

BUG: 419178

Test Plan: Restarted on X11

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28233
2020-03-24 12:40:14 +00:00
Aleix Pol
9b7ab4d16a Improve tests behaviour on set ups with high dpi
Summary:
We are testing on a 100x100 mock display. We'd ask QWidget for our
display's dpi, it would not use the mock display but the actual
system's. On my system it made the corners overlap with each other and
all sorts of weird things happened.

Test Plan: The tests actually pass here.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28224
2020-03-24 00:16:04 +01:00
David Edmundson
80d3f148e0 [wayland] Simplify output handling
Summary:
Instead of changing lifespan of kwayland objects we can just call
create() and delete() on it which affects the lifespan of the underlying
resource, but not the kwayland wrapper.

This gets rid of some duplicate syncing.

Test Plan:
Ran WAYLAND_DEBUG=1
plugged in and removed a monitor
output showed wl_output and xdg_output being handled correctly

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27899
2020-03-23 23:04:06 +00:00
l10n daemon script
93e8231b61 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-03-23 06:03:07 +01:00
l10n daemon script
5c51b1c619 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-03-21 09:55:15 +01:00
Carson Black
679427da24 Broadcast application menu on PWM interface initiaization
Summary:
By the time AbstractClient::setupWindowManagementInterface() is called,
it's possible for a window to already have an application menu, and not update them
afterwards.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28150
2020-03-20 03:04:36 -04:00
Aleix Pol
43969122a2 Remove changes from a patch from the future 2020-03-20 03:44:59 +01:00
Aleix Pol
e0052cedcb Implement the tablet wayland protocol in kwin
Summary:
Uses the tablet classes introduced in kwayland.
Depends on D26858

Test Plan:
Scratched my tablet with a magic stick and it did things depending on the pressure.
https://youtu.be/GGx0TlNJlzs

Reviewers: #kwin, #plasma, zzag, davidedmundson

Reviewed By: #kwin, #plasma, zzag, davidedmundson

Subscribers: davidedmundson, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26859
2020-03-20 03:05:41 +01:00
Vlad Zahorodnii
bb04ab390d Merge branch 'Plasma/5.18' 2020-03-19 22:41:19 +02:00
Vlad Zahorodnii
25276d3058 [wayland] Recursively destroy WindowPixmap objects
Summary:
We need to destroy the root WindowPixmap together with all of its
children; otherwise, buffers that are attached to subsurfaces will
not be released.

Test Plan:
weston-subsurfaces doesn't quit with an error message saying that
all buffers are held by the compositor.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28145
2020-03-19 22:41:03 +02:00
Vlad Zahorodnii
c0c693efb3 Merge branch 'Plasma/5.18' 2020-03-19 16:41:09 +02:00
Vlad Zahorodnii
348e72c56e [scenes/opengl] Print a debug message when viewport limits aren't met
Summary:
This may help with debugging why compositing is suspended.

CCBUG: 418951

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28139
2020-03-19 16:40:54 +02:00
Méven Car
d571457bbe KCM/Kwinoptions: Port title bar and window actions tabs UI and conf to KConfigXT
Summary: Depends on D27463

Reviewers: crossi, bport, ervin, #kwin, zzag

Reviewed By: ervin, #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27477
2020-03-19 12:40:01 +01:00
l10n daemon script
9f3b817bdc 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-03-19 05:51:04 +01:00
Vlad Zahorodnii
29fa85eed1 Use SurfaceInterface::boundingRect()
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27831
2020-03-18 16:35:21 +02:00
Vlad Zahorodnii
9cce7f8686 [wayland] Drop support for legacy xdg-shell-v6 protocol
Summary:
xdg-shell stable has been around for quite a while. A quick analysis
showed that many distros ship GTK and Qt that support both xdg-shell
v6 and stable. Therefore, we can drop support for legacy v6 protocol.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28118
2020-03-18 14:38:58 +02:00
Vlad Zahorodnii
e7babb3e97 Drop .arclint file
Summary:
Lately, submitting patches has become very annoying because of cppcheck's
false positive error messages. After doing some research, no reasonable
solution have been found to this annoying problem so let's get rid of the
.arclint file. If we've missed something during the code review, our CI
will spot it. Although CI doesn't check spelling, we have other ways to
detect typos, e.g. EBN.

Reviewers: #kwin, apol

Reviewed By: apol

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28119
2020-03-18 14:38:21 +02:00
l10n daemon script
a273ec2bc3 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-03-18 06:00:00 +01:00
Aleix Pol
d18449c743 Fix build with Qt 5.12, Qt::hex and Qt::endl 2020-03-17 15:57:11 +01:00
Kai Uwe Broulik
980dda8831 [Toplevel] Check info being null
There's some X11-reliance in Toplevel which is ideally split out but for now let's check for info being null.
For instance, accessing pid() on a deleted Wayland client can crash when it's no longer a XdgShellClient.

Differential Revision: https://phabricator.kde.org/D28101
2020-03-17 15:51:43 +01:00
Aleix Pol
59ad852c02 Qt 5.12, qhash 2020-03-17 15:44:07 +01:00
Daniel Vrátil
9bd91e66cd
fix: make hwdata truly a runtime dependency
Summary: Followup to comments in D10041

Reviewers: #plasma, ngraham, davidedmundson, zzag

Reviewed By: #plasma, ngraham, davidedmundson, zzag

Subscribers: iasensio, wstephenson, davidedmundson, zzag, ngraham, kwin, cgiboudeaux

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27729
2020-03-17 15:39:17 +01:00
Aleix Pol
3e9f33bb3e More for Qt 5.12 2020-03-17 15:37:01 +01:00
Aleix Pol
54c6acadf2 Allow building with Qt 5.12 2020-03-17 15:32:20 +01:00
Aleix Pol
cca0e15b45 Fix compiler warnings
Summary: No need to keep them around for no reason.

Test Plan: Tested the plugins I thought could be affected. Have been using it for a couple of days without problems

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28062
2020-03-17 15:07:52 +01:00
Yuri Chornoivan
39154ad2d6 Fix minor typo: inital -> initial
Summary: inital -> initial

Test Plan: none

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28092
2020-03-17 09:41:12 +02:00
Henri Chain
518c85e91e Remove default button on kwinrules KCM
Summary:
The "default" button was behaving the same as "reset" which was unnecessary and confusing.

As the only settings are the list of rules, the only meaning "default" could have is to clear all the rules, which is probably not what the user would want. So I think the best course of action is to remove the button.

Reviewers: zzag, meven, crossi, bport, ervin

Reviewed By: zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28071
2020-03-16 17:11:01 +01:00
Henri Chain
7c1c9d8164 Port kwinrules kcm to kconfigxt
Reviewers: meven, crossi, bport, ervin, #kwin

Subscribers: iasensio, ognarb, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27682
2020-03-16 13:21:43 +01:00
l10n daemon script
ede53f73bd 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-03-15 05:50:08 +01:00
Yuri Chornoivan
c66cde7307 Remove duplicate includes
Summary: The code contains duplicate includes.

Test Plan: Open the files from the patch

Reviewers: #kwin, apol

Reviewed By: apol

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28048
2020-03-14 21:19:14 +02:00