Commit Graph

18142 Commits (d1b35f306d83f2346a96c5b6aaea1d5241b83ff8)

Author SHA1 Message Date
l10n daemon script 4e7394457c 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-04-22 11:03:45 +02:00
l10n daemon script b8b71daed6 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-04-22 06:37:43 +02:00
Albert Astals Cid df89d4d83e GIT_SILENT Fix scripty failing
There's no *.h file here anymore

CCMAIL: meven29@gmail.com
2020-04-21 23:11:15 +02:00
Méven Car 66898e7f46 Wayland: Allow to take single screen screenshots using scale factor without loss
Summary:
The screenshot made on screens with scale factor were downscaled by their scale factor making them blurry.
It prevents taking screenshots of missing Hidpi related bugs showing the issues under Wayland.

This fix the case of a single screenshot, but not the rest:
Multiscreen screenshot downscales the screen using scale factor.
Spectacle rectangular selection screenshot is broken as soon as some scale factor different than 1 is used on any screen.

Test Plan:
Under Wayland with a scale factor on a screen, take a screenshot using spectacle.
The output image is not downscaled and has the same size as the screen resolution.

No other change to any other screenshot mode, or under X.

Reviewers: davidedmundson, #kwin

Reviewed By: davidedmundson, #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29010
2020-04-20 16:12:26 +02:00
Méven Car e95d1dc950 KCM/Compositing: Use KConfig XT in UI
Summary:
Use KConfig XT to manage most fields of the KCM.
Simplify code.

Depends on D27955

Test Plan: No functional change

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

Reviewed By: #kwin, ervin, bport, zzag

Subscribers: anthonyfieroni, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27988
2020-04-20 10:12:05 +02:00
Méven Car a94be708ef Merge branch 'Plasma/5.18' 2020-04-17 18:31:23 +02:00
Méven Car e8a1f8eccc Avoid crash in KWin::DrmOutput::updateCursor
Summary:
BUG: 420077

Sample stack traces :

From bug:

  #2  QImage::copy (this=this@entry=0x558117775e20, r=...) at image/qimage.cpp:1172
  #3  0x00007f22d0a24cdf in QImage::detach (this=this@entry=0x558117775e20) at image/qimage.cpp:1091
  #4  0x00007f22d0a25ae0 in QImage::fill (this=0x558117775e20, color=...) at image/qimage.cpp:1806
  #5  0x00007f22d0a25f5f in QImage::fill (this=this@entry=0x558117775e20, color=color@entry=Qt::transparent) at image/qimage.cpp:1780
  #6  0x00007f22bf3bdffd in KWin::DrmOutput::updateCursor (this=0x5581176fb780) at ./plugins/platforms/drm/drm_output.cpp:175
  #7  0x00007f22bf3b0e55 in KWin::DrmBackend::updateCursor (this=0x558117669b60) at ./plugins/platforms/drm/drm_backend.cpp:701

Locally reproduced:

  #0  0x00007f360611e159 in KWayland::Server::OutputDeviceInterface::transform() const (this=<optimized out>)
      at /home/meven/kde/src/kwayland/src/server/outputdevice_interface.cpp:590
  #1  0x00007f3607438059 in KWin::AbstractWaylandOutput::transform() const (this=this@entry=0x5645bed10f90) at /home/meven/kde/src/kwin/abstract_wayland_output.cpp:317
  #2  0x00007f35ecd8acd3 in KWin::DrmOutput::matrixDisplay(QSize const&) const (this=0x5645bed10f90, s=...)
      at /home/meven/kde/src/kwin/plugins/platforms/drm/drm_output.cpp:155
  #3  0x00007f35ecd8efa9 in KWin::DrmOutput::updateCursor() (this=<optimized out>) at /home/meven/kde/src/kwin/plugins/platforms/drm/drm_output.cpp:179
  #4  0x00007f35ecd81db5 in KWin::DrmBackend::updateCursor() (this=0x5645bec743a0) at /home/meven/kde/src/kwin/plugins/platforms/drm/drm_backend.cpp:701
  #5  0x00007f36049e7fe7 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
  #6  0x00007f36075ee43f in KWin::Cursors::currentCursorChanged(KWin::Cursor*) (this=<optimized out>, _t1=<optimized out>)
      at /home/meven/kde/build/kwin/kwin_autogen/EWIEGA46WW/moc_cursor.cpp:385

Test Plan: Could not reproduce

Reviewers: #kwin, zzag, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: ngraham, apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28889
2020-04-17 18:25:31 +02:00
Benjamin Port 864f355870 Set cursor size default to 24 to align with KCM
Reviewers: #plasma, meven, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T12040

Differential Revision: https://phabricator.kde.org/D28654
2020-04-17 14:43:51 +02:00
David Edmundson 1a359d5e93 [wayland] Fix teardown order
Summary:
Valgrind flags an error on teardown.

EventQueue has a pointer to ConnectionThread internally
Registry has a pointer to the EventQueue internally

teardown order needs to be

Registry
EventQueue
Connection

registry was explicitly deleted before connectionthread already, we just
need to put event queue in the right place.

Test Plan: Ran kwin_wayland nested in valgrind

Reviewers: #kwin, cblack, apol

Reviewed By: cblack, apol

Subscribers: zzag, apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28668
2020-04-16 00:58:05 +01:00
David Edmundson d0875aa117 [wayland] avoid potential crash when checking for window inhibitions on desktop change
Summary:
Xwayland clients are sometimes offset from being visible to having a
surface applied.

We might also have internal windows which will be AbstractClients
without a surface.

No idle interface will be set up for non wayland clients, but on a
desktop change we itterate through all AbstractClients and need to guard
somewhere.

BUG: 420039

Test Plan: None

Reviewers: #kwin, apol

Reviewed By: apol

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28858
2020-04-16 00:57:50 +01:00
Jacopo De Simoi a2fc6f8eda Fix fullRepaints loop
The method paintSimpleScreen is responsible for redrawing the parts of
the back-buffer that need updating using the buffer_age extension.
The method fails to set correctly the damaged_region if, for some
reason, one frame needs a repaint of the whole screen. In this case
the backbuffer will request a full-screen repaint at some future
frame, so the dirty region will be extended to full-screen. However,
in this case the repaintRegion is not subtracted from the
damaged_region (as it is done for the non fullRepaints case below
--see the comment below--) and the damaged_region is reported to be the full
screen again. This causes all the subsequent frames to be reported
with a full screen damage, which causes some penalty, until
paintGenericScreen is invoked for some reason and then the damage gets
reset correctly.

We now set the correct damage and prevent falling into the fullRepaint
loop.
2020-04-14 08:29:46 -04:00
Cyril Rossi 3284e19646 KCM KWinTabbox disable widget if property is immutable.
Summary:
Some widget cannot be managed by KCModule, so we have to disable the widget if the property is immutable.
Remove unused parameter in `createConnections()`

Test Plan: Add [$i] right after the key or group in kwinrc, the widget should be disabled.

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

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28484
2020-04-14 14:08:36 +02:00
Kai Uwe Broulik 59642a4b28 Merge branch 'broulik/no_ksmserver'
Differential Revision: https://phabricator.kde.org/D28617
2020-04-09 14:52:53 +02:00
Aleix Pol 85b322ad9c drm: Fix hotplugging docking stations
Summary:
It turns out DRM connectors are not static and may change over time.
This patch refreshes them right before looking for new outputs.

BUG: 419061
FIXED-IN: 5.19.0

Test Plan:
Seems to work better, it's still not ideal but I think there's an unrelated bug
sending updates to clients.

Reviewers: #kwin, davidedmundson, meven

Reviewed By: #kwin, davidedmundson, meven

Subscribers: dalbers, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28642
2020-04-09 00:45:23 +02:00
Aleix Pol 6a33533816 drm: properly access a scoped pointer
Differential Revision: https://phabricator.kde.org/D28680
2020-04-08 16:26:07 +02:00
Aleix Pol 16fe8dbd88 drm: Don't leak planes 2020-04-08 16:12:03 +02:00
Aleix Pol fa654bda59 drm: Improve QDebug of DrmOutput
Instead of printing as QObject, provide actual information of the
instance.
2020-04-08 16:11:44 +02:00
David Edmundson a13ecf8d0e [wayland] Add new XdgOutput properties
Summary:
AbstractOutput::name() behaviour is changed so that it matches the X11
behaviour, showing an identifier like "HDMI-0".

XdgOutput.name is set to this name.

XdgOutput.description is currently set to the manufacturer name and
model, but it's not exposed to Qt so we probably don't care too much.

This should fix plasmashell changing applets when switching between X11
and wayland.

Test Plan:
Relevant unit test
I still need to run it on my laptop.

Reviewers: #kwin, #plasma, zzag

Reviewed By: #kwin, #plasma, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28230
2020-04-08 10:39:59 +01:00
Méven Car 564c739371 Wayland: Allow to set a scroll Factor for input devices
Summary:
Mouse and touchpad wheel events are concerned.

CCBUG: 403843

KCM patch: D28331

Test Plan: build, ctest, manual set of scrollfactor value via qdbusviewer

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

Reviewed By: #kwin, davidedmundson, ervin, apol

Subscribers: apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28310
2020-04-07 19:08:49 +02:00
Aleix Pol f6029c3dbd debugging: Simplify printing DrmObjects through QDebug
Summary:
Print automatically a few properties as well as the type, so it's easier
to read debug information.

Test Plan: Debugged a fix with it

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28641
2020-04-07 13:23:05 +02:00
David Edmundson 2a39a7a7e1 Merge branch 'Plasma/5.18' 2020-04-07 09:28:35 +01:00
David Edmundson bee3afdd51 [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-04-07 09:27:31 +01:00
David Edmundson 26ce4869a0 [xwl] Fix crash if same data is requested twice
Summary:
m_dataRequests is a list of transfers for a given selection.
It exists primarily as a ref counting mechanism that matches up
transfers with selections.

If the same data is requested twice we would insert two items into the
list with matching timestamps for the original selection. This then
confuses the callback handling.

BUG: 417936

Test Plan:
kwin_wayland + chromium
drag and drop a URL onto desktopview. kwin used to crash here
Now a context menu now appears and I can add a link

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28630
2020-04-06 23:22:08 +01:00
Kai Uwe Broulik be31101f12 Remove QSessionManager usage
Summary: Instead, have KSMServer talk to us directly on DBus.

Test Plan: Depends on D28616

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28617
2020-04-06 11:51:47 +02:00
David Faure 6dc938907f kwin: fix compilation error with strict iterators
Summary: After insert(), image seems to be set already, no need to copy it again?

Test Plan: Builds

Reviewers: apol

Reviewed By: apol

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28578
2020-04-05 08:53:56 +02:00
Aleix Pol 77782efc1f x11: register the cursor as well
BUG: 419595
CCMAIL: kwin@kde.org

Committing as is because it crashes on load
2020-04-03 20:01:09 +02:00
Aleix Pol 9f183642ca Fix build
Could reproduce the problem in the CI on Neon, this fixes the build there.
We'll probably want to untangle xcb and wayland dependencies some day...
2020-04-03 02:34:25 +02:00
Aleix Pol 6abd23ed02 Make it possible to have a separate cursor for the tablet
Summary:
As is KWin only had 1 Cursor which was a singleton. This made it impossible for
us to properly implement the tablet (as in drawing tablets) support and show where
we're drawing.
This patch makes it possible to have different Cursors in KWin, it makes all the
current code still follow the mouse but the tablet can still render a cursor.

Test Plan: Tests pass, been using it and works as well as before but with beautiful tablet cursors.

Reviewers: #kwin, cblack, davidedmundson

Reviewed By: #kwin, cblack, davidedmundson

Subscribers: davidedmundson, cblack, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28155
2020-04-03 01:16:45 +02:00
Jonathan Riddell 08a21ae7b6 bump to require Qt 5.14 2020-04-02 15:22:36 +01:00
Aleix Pol da2d896257 Fix for older cmake versions
Summary: Recent changes prevented it to build on KDE Neon.

Test Plan: Built it on Neon

Reviewers: #kwin, bshah, davidedmundson

Reviewed By: #kwin, bshah, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28511
2020-04-02 13:20:03 +02:00
Aleix Pol f4e41430e5 Improve PowerOff/PowerDown behaviour
Summary:
Trigger PowerDown after pressing for 1s instead of having to wait for release
to decide, feels more natural.
Also don't operate the modifiers, it's done later by KGlobalAccel.

Reviewers: #kwin, #plasma:_mobile, bshah

Reviewed By: #plasma:_mobile, bshah

Subscribers: ngraham, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28490
2020-04-02 12:09:51 +02:00
Aleix Pol dbac4bce7e Reduce the amount of objects that are compiled several times
Summary:
We build some objects several times which makes it uncomfortable to develop KWin
since every time we modify something a lot of things get rebuilt. This should
help a bit although it doesn't solve all the problems.

Test Plan: Builds, tests pass

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: davidedmundson, zzag, anthonyfieroni, iasensio, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28445
2020-04-02 00:41:55 +02:00
l10n daemon script b3dad08dbd 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-04-01 11:06:32 +02:00
Cyril Rossi 51a1e06dfc KCM KWinTabBox manage KCModule states
Summary:
Following D27323, manage KCModule states for reinitialize/defaults/apply

Also, this should solve :

BUG: 414567
BUG: 387160
FIXED-IN: 5.19

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

Reviewed By: #kwin, ervin, meven, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27784
2020-04-01 11:01:49 +02:00
Jonathan Riddell 01cca38a42 Update version number for 5.18.4
GIT_SILENT
2020-03-31 14:53:05 +01:00
l10n daemon script d876dde05b 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-31 06:35:42 +02:00
Vlad Zahorodnii ebf6e691d8 [kcmkwin] Remove redundant lambda
Summary:
We don't need a lambda because QDialog::accepted can be connected
directly to KCModule::save.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28443
2020-03-30 19:39:09 +03:00
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