Commit Graph

17925 Commits (bc1991706c66a53f970fdcd576bcb35e70c9b7f1)

Author SHA1 Message Date
David Edmundson bc1991706c drop unused headers
Test Plan: N/A

Reviewers: apol

Reviewed By: apol

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29337
2020-05-01 16:13:33 +01:00
Laurent Montel 86cbf73386 Fix compile with strict iterator 2020-05-01 13:02:39 +02:00
Laurent Montel b54c57505d Fix warning about using 0 as nullptr 2020-05-01 13:02:20 +02:00
Aleix Pol 3a9d7a6e9d Port KWin to KWaylandServer
Summary: Away from KWayland::Server and KF5WaylandServer.

Test Plan: Builds, ran nested session

Reviewers: #kwin, #plasma, #frameworks, davidedmundson, zzag

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

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29278
2020-04-30 12:56:08 +02:00
Méven Car 137a6a1705 ScreenShotEffect: Add a shouldReturnNativeSize argument to screenshotFullscreen
Summary:
Add a shouldReturnNativeSize to screenshotFullscreen so that KWin can export
screenshot that are screen pixel accurate.

Useful for spectacle to be able to do rectangular selection kind of screenshot.

Test Plan:
Example of a top screen using a 1.25 scale ratio being export in native resolution
{F8255144}
(The top screen has a bigger size than its virtual geometry and next screen doesn't overlap)

Example of the same screen in virtual resolution:
{F8255146}

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

Reviewed By: #kwin, davidedmundson

Subscribers: broulik, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29122
2020-04-29 19:16:22 +02:00
Vlad Zahorodnii a6d29add93 Fix build on FreeBSD 2020-04-29 16:54:06 +03:00
Vlad Zahorodnii 76af96bcc9 [x11] Disable synchronized resizing for Xwayland < 1.21
In case Xwayland does not use multiple buffers, the currently attached
buffer is going to be destroyed if the frame window is resized. It may
render the previous and the current window pixmap invalid and thus result
in visual artifacts when an X11 client is being interactively resized.

In order to avoid the visual artifacts, this change disables support for
synchronized resizing for X11 clients if the version of Xwayland is less
than the version in which Xwayland started using multiple buffers, i.e.
1.21.

Differential Revision: https://phabricator.kde.org/D29250
2020-04-29 16:37:31 +03:00
Vlad Zahorodnii a9d2bad007 [x11] Enable synchronized resizing for Xwayland clients
Given that we now query the current X11 time stamp on Wayland, we can
enable synchronized resizing for Xwayland clients.

Differential Revision: https://phabricator.kde.org/D29250
2020-04-29 16:37:23 +03:00
Vlad Zahorodnii 0323825f76 [x11] Update X11 time stamp on Wayland
Assume that Xwayland's current X11 time stamp corresponds to the system
monotonic time. Unfortunately, we cannot make roundtrips to Xwayland and
we cannot query the time stamp asynchronously because it may introduce
regressions in the standalone X11 window manager.

Differential Revision: https://phabricator.kde.org/D29250
2020-04-29 16:37:02 +03:00
Yuri Chornoivan 385c8d3db6 Make the string translatable
Summary:
Currently this string is marked as untranslatable for the unknown reason

Patch by Victor Ryzhykh

Test Plan: Translate, run.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29271
2020-04-29 09:34:53 +03:00
l10n daemon script 34de0b746e 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-29 06:38:00 +02:00
Vlad Zahorodnii 2fa5526f12 [wayland] Pass command line arguments to launched processes
Summary:
Since QProcess::setProgram() doesn't split the command, we need to do it
ourselves.

Test Plan: `dbus-run-session kwin_wayland "kate foo.txt"` works again.

Reviewers: #kwin, cblack, davidedmundson, apol

Reviewed By: #kwin, cblack, davidedmundson, apol

Subscribers: apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29253
2020-04-28 20:58:53 +03:00
Vlad Zahorodnii d3303bc407 Merge branch 'Plasma/5.18' 2020-04-28 20:55:00 +03:00
Vlad Zahorodnii f823be570c Make Compositor more verbose
Summary:
In order to help with debugging why the OpenGL scene is not loaded,
it can be really helpful to know what scenes the Compositor attempts to
load.

Test Plan: Ran kwin with QT_LOGGING_RULES="*.debug=true".

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29261
2020-04-28 20:54:46 +03:00
Benjamin Port 750dd068e5 [Wayland] Send stacking order event through plasma window management protocol
Summary: Depends on: D29054

Reviewers: zzag, davidedmundson, meven

Reviewed By: davidedmundson, meven

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29055
2020-04-27 09:31:29 +02:00
l10n daemon script 028aecaaf9 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-27 06:06:37 +02:00
Andreas Sturmlechner 1e70f08093 kwinscreenedges: Fix build (missing main.ui in kcm_kwintouchscreenedges_PART_SRCS)
Summary: kwinscreenedgeconfigform.cpp:23:10: fatal error: ui_main.h: No such file or directory

Test Plan: kwin builds again.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29212
2020-04-26 20:16:54 +02:00
Nate Graham f9faa94ccc [kcmkwin/kwinrules] Port placeholder message to Kirigami.PlaceholderMessage
Summary: Depends on D29152

Test Plan:
{F8256396}

{F8257685}

Reviewers: iasensio, #kwin, zzag

Reviewed By: iasensio, #kwin, zzag

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T13021

Differential Revision: https://phabricator.kde.org/D29141
2020-04-24 08:30:07 -06:00
Ismael Asensio a158d3cbd3 Rules kcm: Use new property ComboBox.currentValue
Summary:
Use the properties `valueRole` and `currentValue`, introduced in Qt5.14 for `QQC2.ComboBox`

This didn't work before due to QQC2 version being mis-detected at build time, so the code mocked an internal `currentValue` property.

After D28859, it is now required to fix:
   "file:///home/nate/kde/usr/share/kpackage/kcms/kcm_kwinrules/contents/ui/RulesEditor.qml"
   "Error loading QML file.\n42: Type RuleItemDelegate unavailable\n68: Type OptionsComboBox unavailable\n35: Cannot override FINAL property\n"
   QCoreApplication::postEvent: Unexpected null receiver

Test Plan:
Try to edit a rule or add a new one.
The rule editor page shows.

Reviewers: ngraham, #kwin, zzag

Reviewed By: ngraham, #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29145
2020-04-24 15:09:51 +02:00
Vlad Zahorodnii 890c770033 Merge branch 'Plasma/5.18' 2020-04-24 13:28:57 +03:00
Vlad Zahorodnii fd106de650 [scripting] Re-evaluate exclusions after switching between virtual desktops or activities
Summary:
OtherDesktopsExclusion and OtherActivitiesExclusion flags must be
re-evaluated after user has switched between virtual desktops or
activities; otherwise ClientLevel may contain clients that are not
necessarily on the current virtual desktop or activity.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T12877

Differential Revision: https://phabricator.kde.org/D28827
2020-04-24 13:28:39 +03:00
Vlad Zahorodnii 5b947c6458 Revert "Allow building with Qt 5.12"
This reverts commit 54c6acadf2.

Differential Revision: https://phabricator.kde.org/D29147
2020-04-24 10:19:23 +03:00
Vlad Zahorodnii a848490cae Revert "More for Qt 5.12"
This reverts commit 3e9f33bb3e.

Differential Revision: https://phabricator.kde.org/D29147
2020-04-24 10:19:17 +03:00
Vlad Zahorodnii fdb14928f6 Revert "Qt 5.12, qhash"
This reverts commit 59ad852c02.

Differential Revision: https://phabricator.kde.org/D29147
2020-04-24 10:19:09 +03:00
Vlad Zahorodnii c61b85f502 Revert "Fix build with Qt 5.12, Qt::hex and Qt::endl"
This reverts commit d18449c743.

Differential Revision: https://phabricator.kde.org/D29147
2020-04-24 10:18:45 +03:00
Cyril Rossi db9d7a7f5d KCM KWinScreenEdge fix build issue
Summary: Remove Q_ASSERT() and add a None value to Monitor::Edge enum to convert ElectricBorder NONE or COUNT

Test Plan: Fix kwin build

Reviewers: #kwin, ngraham, zzag

Reviewed By: #kwin, ngraham, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29104
2020-04-23 08:48:25 +02:00
l10n daemon script 8c7956b923 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-23 06:36:52 +02:00
Ismael Asensio a04b40dadb KWinRules KCM Redesign
Summary:
Replacement KCM to configure kwin rules, using a QML-based UI.

After some work on the task T12729, it is almost feature-par with the previous module, and adapted to the recent move to KConfigXT.

Test Plan:
{F8208046}
{F8208047}

Reviewers: #plasma, #kwin, #vdg, ngraham, davidedmundson, zzag

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

Subscribers: ngraham, davidedmundson, hchain, broulik, zzag, kwin

Tags: #kwin, #vdg

Differential Revision: https://phabricator.kde.org/D28152
2020-04-22 21:34:48 +02:00
Aleix Pol 19bfa7c065 egl: encapsulate and share duplicated code
Summary:
Removes a few TODO items mentioning that some code was exactly the same
in a couple of different places.

drm: Remove unnecessary cast

Test Plan:
Using it right now
Will push in 2 different commits

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28708
2020-04-22 16:31:40 +02:00
Cyril Rossi cf7762eaa8 KCM KWinScreenEdges disable widgets if is immutable
Summary:
Same as D28507

Disable screen edge modification, but allow the user to open an edge context menu and see the settings.

To set an edge immutable, just add `[$i]` right after the entry in `ElectricBorders` group, although the edges settings are shared between some `[Effect-something]` group under the key `BorderActivateSomething`.

Since one entry like `BorderActivateSomething` lists all edges that use this effect, it doesn't make sense to set it immutable.

Test Plan:
In `kwinrc`, set the `ElectricBorders` and/or `Windows` group immutable or any entry.

```
[ElectricBorders]
BottomLeft[$i]=None
Left=None
Right=None
Top[$i]=None

[Windows][$i]
ElectricBorderCornerRatio=0.29
ElectricBorderDelay=300
ElectricBorderMaximize=false
ElectricBorderTiling=true
ElectricBorders=2
```

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

Reviewed By: ervin, zzag, #kwin, mart

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28508
2020-04-22 11:10:17 +02:00
Cyril Rossi a9c0337113 KCM KWinTouchEdges disable edge if is immutable
Summary:
Disable touch screen edge modification, but allow the user to open an edge context menu and see the settings.

To set an edge immutable, just add `[$i]` right after the entry in `TouchEdges` group, although the edges settings are shared between some `[Effect-something]` group under the key `TouchBorderActivateSomething`.

Since one entry like `TouchBorderActivateSomething` lists all edges that use this effect, it doesn't make sense to set it immutable.

Test Plan:
In `kwinrc`, set the `TouchEdges` group immutable or any entry.

```
[TouchEdges]
Bottom=None
Left=None
Right=None
Top[$i]=None
```

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

Reviewed By: ervin, zzag, #kwin, mart

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28507
2020-04-22 11:10:12 +02:00
Cyril Rossi 128eb13c09 KCM KWinScreenEdges port to KConfigXT
Summary: Following D27862 port KWinScreenEdges to KConfigXT, handle isSaveNeeded and isDefault KCModule state.

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

Reviewed By: #kwin, ervin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28475
2020-04-22 11:10:02 +02:00
Cyril Rossi 01314f8e9a KCM KWinTouchScreen port to KConfigXT
Summary:
Also manage KCModule states (isSaveNeeded and isDefaults)

BUG: 405573

Test Plan:
* exec kcmshell5 kwintouchscreen
* In an edge, select action Present windows - All desktops, then apply
* close and reopen
* Should display action Present windows - All desktops in the previously selected edge.

* Do same test with Present windows - current desktop

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

Reviewed By: #kwin, ervin, meven, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27862
2020-04-22 11:09:39 +02:00
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