Commit Graph

434 Commits (85eec90c233ad5e98b82cc6f24142a64e421d68f)

Author SHA1 Message Date
l10n daemon script 3b3aa82f58 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"
2018-07-23 05:24:40 +02:00
David Edmundson 9f2f6d9657 Don't remove outputs during page flip
Summary:
To do so leaves a dangling pointer on our pageFlipHandler

BUG: 396272

Test Plan: Wobbled a window whilst plugging a monitor in and out

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14210
2018-07-18 16:05:59 +01:00
l10n daemon script 2b657feb29 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"
2018-07-13 05:26:08 +02:00
David Edmundson 29ca2a1e47 Merge branch 'Plasma/5.13' 2018-06-24 13:29:03 +01:00
David Edmundson 463ccfc8bb Revert "Workaround crash in Aurorae destruction"
This reverts commit 275b7ee0f4.

BUG: 395732
2018-06-24 13:28:23 +01:00
David Edmundson 2cc42ecc12 DRM cursor scaling
Summary:
We pass the buffer scale of the cursor through QImage::devicePixelRatio.

When copying the cursor with QPainter use Qt's in-built functionality to
handle resizing the cursor pixmap as necessary to match the screen.

As we're now resizing the cursor, the hotspot needs translating from
logical to device co-ordinates.

Test Plan: Used with associated patches

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13605
2018-06-23 18:15:41 +01:00
David Edmundson 9ff1f77e8e Support cursor scaling in X windowed backend
Test Plan:
Ran kwin_wayland --windowed  --scale2

Hovered over deco. Got massive and detailed cursor
Hovered over a wayland client (Qt 5.11 not dev)
Got a massive, but slightly blocky cursor

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13642
2018-06-23 18:15:41 +01:00
David Edmundson be5d0f6bac Merge branch 'Plasma/5.13' 2018-06-21 01:50:23 +01:00
David Edmundson 275b7ee0f4 Workaround crash in Aurorae destruction
Summary:
Workaround QtBug-68997

Deleting of a RenderControl/render controlled window triggers deletion
of other queued deleted items, putting KWin in a corrupt state. See Qt
bug report.

Deleting this queued means we know we don't have anything else going on
in the stack which should make this somewhat safe.

BUG: 395346

Test Plan:
Couldn't reproduce original crash. Based purely on the incomplete backtrace and code reading

Set an Aurorae theme. Closed some windows. Things still worked as before

Reviewers: #kwin, #plasma, mart

Reviewed By: #kwin, #plasma, mart

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13614
2018-06-20 09:39:29 +01:00
l10n daemon script 1879303d5b 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"
2018-06-19 06:02:57 +02:00
David Edmundson 6f6f224315 Merge branch 'Plasma/5.13' 2018-06-18 15:37:05 +01:00
l10n daemon script d8addb6b3a 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"
2018-06-18 07:25:30 +02:00
l10n daemon script 6b0d2fc027 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"
2018-06-18 05:35:02 +02:00
l10n daemon script f9a3a97dc7 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"
2018-06-13 07:33:20 +02:00
David Edmundson 5b4eb80c8f Set specific edge cursor shape when resizing
Summary:
Instead of seeing the cursor <--> on the left edge you now see an icon
that looks like |<-  .

This brings kwin decorations in line with GTK CSD icons.

In theory this is also useful to tell which window will resize in the
case of side-by-side windows (regardless of whether borders are on or
not). In practice with the adwaita icon theme I tested with it's not
very intuitive to realise which is which till you learn the icon.

Change is more involved than it should be as Qt::CursorShape doesn't
have these entries, and I don't want to shadow that enum internally or
have
to change kwin effect code.

Specifics depend on cursor icon theme if they are not present it will
fallback to the <--> icon. (Breeze does not have them currently)

Test Plan:
Resized some windows (on X and on Wayland)
Correct icon appeared on Adwaita
Existing icon appeared on Breeze

Reviewers: #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13396
2018-06-11 10:05:07 +01:00
Vlad Zagorodniy 2d01ba6450 [scenes/qpainter] Draw decoration shadows
Summary:
QPainter doesn't render decoration shadows. It renders only
shadows provided through ShadowInterface.

With this change, painting of shadows is done in similar way OpenGL backend is
currently doing.

Before

{F5734867, layout=center, size=full}

After

{F5734870, layout=center, size=full}

Depends on D10811 (dummy decoration with shadows in autotests)

Test Plan:
* start kwin with QPainter backend enabled:

```
KWIN_COMPOSE=Q kwin_wayland --xwayland --windowed
```

* open konsole and kate:

```
DISPLAY=:1 konsole
DISPLAY=:1 kate
```

Reviewers: #kwin, graesslin, davidedmundson

Reviewed By: davidedmundson

Subscribers: abetts, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D10943
2018-06-07 12:27:31 +03:00
Vlad Zagorodniy 7637cfc22b [scenes/opengl] Fix overlapping shadow tiles
Summary:
This problem appears if shadow corner tiles are too big and
some window has size smaller than 2 * shadowTileSize.

This change tries to address the problem above by exclusing
overlapping tile parts. If there are any two overlapping corners
then tile between them(top/right/bottom/left) is not rendered.

Also, because some corner tile parts can be excluded, corner tiles
are expected to be symmetrical(i.e. if we remove right half from
the top-left tile and left half from the top-right tile and
stick them together, they still look fine, there are no misalignments, etc).
Most shadows(e.g. shadows from Breeze) have such behaviour.

No tiles are overlapping

{F5728514, layout=center, size=full}

Overlapping tiles

{F5728516, layout=center, size=full}

And this is how it supposed to be

{F5728517, layout=center, size=full}

Test Plan:
* apply D11069 to Breeze
* in System Settings/Application Style/Window Decorations, choose "Very Large" shadow size
* open Konsole
* resize it to a minimum possible size

Reviewers: #kwin, graesslin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, ngraham, anemeth, abetts, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D10811
2018-06-07 12:07:57 +03:00
David Edmundson a3cff85e7a Remove Qt module declarations in includes
Summary:
Test Plan: Compiles

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13359
2018-06-05 18:07:23 +01:00
Martin Flöser 32a715b0c9 Merge branch 'Plasma/5.13' 2018-05-20 15:43:46 +02:00
Martin Flöser 9a9c34f352 Merge branch 'Plasma/5.12' into Plasma/5.13 2018-05-20 15:41:48 +02:00
Martin Flöser 69afe4d266 Update seat's timestamp after waking up screen through double tap
Summary:
The drm platform has a special handling for touch events while the
screen is in dpms. All touch events are filtered out, but a double
tap wakes up the screen.

Due to the filtering out of the events the idle timers were not reset.
So if you only double tapped, the screen turned on, but not off again.

This change updates the timestamp after double tap, so that the idle
timers are restarted. All other events are still filtered out, to not
have "fake" events (e.g. smart phone in pocket) wake up the device.

BUG: 392754
FIXED-IN: 5.12.6

Test Plan: only compile tested

Reviewers: #kwin, #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D12668
2018-05-20 15:38:31 +02:00
Martin Flöser f28d44e5b2 Use XdgShell Unstable V6 in nested wayland platform
Summary:
Changing the creation of the nested window from unstable v5 to v6 in
order to be supported on more compositors and to use KWin's better
supported platform.

Targeting 5.12 as this will help to remove support for unstable v5
from KWayland.

Test Plan: Run a nested KWin/Wayland on KWin/Wayland, everything looked fine

Reviewers: #kwin, #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D11806
2018-05-20 15:37:19 +02:00
David Edmundson 1403fcf316 Add XDG Output support
Test Plan:
Very minimal expansion of unit tests which uses WaylandScreens
Wrote mini app to debug actual output of xdg-output for testing the DRM code

Main relevant user of this is xwayland > 1.20 which I don't have, so that
part remains untested

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: romangg, graesslin, bshah, kwin

Tags: #kwin

Maniphest Tasks: T8501

Differential Revision: https://phabricator.kde.org/D12243
2018-05-18 14:16:13 +01:00
l10n daemon script ed4a936315 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"
2018-04-25 07:16:14 +02:00
Nerdopolis Turfwalker b2ed73cdb0 fb_backend_qpainter_backend: Use logind to determine if the session is active.
Summary: TTYs are only available for seat0, so when starting a framebuffer kwin on seat1, it never draws, because drawing is always suspended, because it is being treated as not active

Test Plan: The framebuffer backend draws on seat1, and /dev/fb1 and when I switch back to my Weston greeter, (when it's also using the frame buffer,) it doesn't try to draw on top of it.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: davidedmundson, rkflx, graesslin, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D9574
2018-04-24 14:18:45 +02:00
Rohan Garg 757ed91a5d Handle errors with drmModeSetCursor instead of silently failing
Summary:
Make sure we switch to a software cursor when drmModeSetCursor
fails.

Reviewers: #kwin, graesslin

Subscribers: davidedmundson, bshah, graesslin, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D12447
2018-04-23 10:39:24 +02:00
Nerdopolis Turfwalker 8321453fde fb_backend: use new udev function to detect framebuffer devices, if one is not set
Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: rkflx, graesslin, anthonyfieroni, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D9556
2018-04-22 17:52:15 +02:00
Nerdopolis Turfwalker 3c745bb571 fb_backend: fix warning
Summary: The warning that the format is unknown was being logged unconditionally

Reviewers: #kwin, bshah

Reviewed By: #kwin, bshah

Subscribers: rkflx, graesslin, cfeck, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D9567
2018-04-22 17:49:23 +02:00
l10n daemon script 67acb21ab8 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"
2018-04-22 07:33:45 +02:00
l10n daemon script e68356831b 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"
2018-04-22 05:43:11 +02:00
Vlad Zagorodniy c44788889c [platforms/virtual] Make VirtualOutput non-copyable
Summary:
Qt objects are treated as identities so remove the copy constructor and
an assignment operator. See, http://doc.qt.io/qt-5/object.html#identity-vs-value

IIRC some Qt objects(like QImage) have copy constructor for implicit data sharing,
but VirtualOutput doesn't have anything to share.

Also, it [this patch] fixes a compiler warning:

```
/home/vlad/KDE/src/kde/workspace/kwin/plugins/platforms/virtual/virtual_output.cpp: In copy constructor ‘KWin::VirtualOutput::VirtualOutput(const KWin::VirtualOutput&)’:
/home/vlad/KDE/src/kde/workspace/kwin/plugins/platforms/virtual/virtual_output.cpp:30:1: warning: base class ‘class QObject’ should be explicitly initialized in the copy constructor [-Wextra]
 VirtualOutput::VirtualOutput(const VirtualOutput &o)
 ^~~~~~~~~~~~~
```

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: michaelh, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D12214
2018-04-16 02:48:48 +03:00
Alexey Min 0ccecbc427 drm backend: choose correct EGL config with mesa-18
Do not blindly select first EGL config from returned list, but choose the one that matches GBM surfaces, that will be created later.
GBM surfaces are created with GBM_FORMAT_XRGB8888 format, so choose the config that matches it.
With wrong format EglGbmBackend::resetOutput() will later fail with error EGL_BAD_MATCH.

Test Plan: Compile, run startplasmacompositor. Verify that OpenGL compositing is used, either by kwin debug console, or by kwin support information.

Reviewers: graesslin, davidedmundson, #kwin, #plasma_on_wayland, bshah

Reviewed By: davidedmundson

Subscribers: zzag, kwin, #kwin

Tags: #kwin, #plasma_on_wayland

Differential Revision: https://phabricator.kde.org/D11758
2018-04-06 00:17:08 +03:00
Alexey Min d318cb3bd4 drm backend: choose correct EGL config with mesa-18
Summary:
Do not blindly select first EGL config from returned list, but choose the one that matches GBM surfaces, that will be created later.
GBM surfaces are created with GBM_FORMAT_XRGB8888 format, so choose the config that matches it.
With wrong format EglGbmBackend::resetOutput() will later fail with error EGL_BAD_MATCH.

Test Plan: Compile, run startplasmacompositor. Verify that OpenGL compositing is used, either by kwin debug console, or by kwin support information.

Reviewers: graesslin, davidedmundson, #kwin, #plasma_on_wayland, bshah

Reviewed By: davidedmundson

Subscribers: zzag, kwin, #kwin

Tags: #kwin, #plasma_on_wayland

Differential Revision: https://phabricator.kde.org/D11758
2018-04-05 01:29:17 +03:00
Eike Hein 2c26215d7e Request a high-priority EGL contexts
Summary:
This patch implements using EGL_IMG_context_priority to request
high-priority rendering contexts if the extension is available.

EGL_IMG_context_priority is currently used in this fashion by
e.g. Android's SurfaceFlinger (RenderEngine.cpp) and libweston
(gl-renderer.c) and seems promising given this widespread
acceptance.

Reviewers: #kwin, graesslin, romangg, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D11572
2018-03-29 20:34:22 +09:00
Bhushan Shah 5c78fbfdcc Include errno.h 2018-03-26 12:35:15 +05:30
l10n daemon script c8c76f78b2 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"
2018-03-26 05:11:05 +02:00
Oleg Chernovskiy 4d46edd7ba
GBM remote access support for KWin
Summary:
Implements a KWayland protocol to pass GBM fd from KWin to KRfb and
addictions to relevant projects from both sides.

Note that this patch does not affect default behaviour of mentioned projects. It can be used
only with KWIN_REMOTE=1 in env from KWin side and with preferredFrameBufferPlugin=gbm in krfbrc from
KRfb side. In all other aspects app behaviour remains unchanged.

Test Plan: Launched KWin in Wayland mode, launched KRfb in it, launched KRDC on a laptop, connected in read-only mode, observed a correctly retrieved desktop with Krfb window

Reviewers: graesslin, davidedmundson, romangg, #kwin

Reviewed By: davidedmundson, romangg, #kwin

Subscribers: kossebau, jgrulich, romangg, ngraham, alexeymin, aacid, kwin, #kwin, davidedmundson, plasma-devel

Tags: #plasma_on_wayland, #kwin

Maniphest Tasks: T5653, T7785

Differential Revision: https://phabricator.kde.org/D1230
2018-03-25 20:18:47 +03:00
Roman Gilg 1136386d9f [platforms/virtual] Store virtual outputs per reference
Summary:
Since VirtualOutput is a QObject, store it per reference and not per value.

Also fix some compilation warnings.

Test Plan: Before and after 92% tests passed.

Reviewers: #kwin, davidedmundson

Reviewed By: davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D11581
2018-03-22 16:03:16 +01:00
Roman Gilg 8136c2722b [platforms/virtual] Add virtual output class
Summary:
This matches the DRM backend more closely and allows mid-test removal and
addition of virtual outputs with different properties in the future.

Test Plan: Before and after 93% tests passed.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D11351
2018-03-19 22:12:22 +01:00
Bhushan Shah 90762ade86 Merge branch 'Plasma/5.12' 2018-03-06 09:26:19 +05:30
Bhushan Shah 3fa287280b Fix the build on armhf/aarch64
Summary:
qopengl.h redeclares the functions defined in the epoxy/gl.h and it
results in the build error. this is similar to other .cpp files where
epoxy/gl.h is used.

See: https://build.neon.kde.org/job/xenial_unstable_plasma_kwin_bin_armhf/157

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D10762
2018-03-06 09:25:33 +05:30
Martin Flöser e71460b6fc Merge branch 'Plasma/5.12' 2018-03-05 19:32:48 +01:00
Fabian Vogt b1bffa4458 Fix typo in config group name
Summary: Quickly fix it before anyone relies on this typo.

Test Plan: None. Yes, really untested.

Reviewers: #plasma, graesslin, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kwin, plasma-devel, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D11047
2018-03-05 13:03:20 +01:00
Marco Martin 8a2b9a014f check for EGL_KHR_platform_gbm extension as well
Summary:
some drivers, like Mali have EGL_KHR_platform_gbm
but not EGL_MESA_platform_gbm

Test Plan: pending a test on rock64 board

Reviewers: #kwin, #plasma, davidedmundson, graesslin

Reviewed By: #kwin, #plasma, graesslin

Subscribers: graesslin, garg, davidedmundson, plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D10346
2018-02-15 19:33:06 +01:00
l10n daemon script 8c74b793e0 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"
2018-02-11 07:09:43 +01:00
l10n daemon script ca5747c094 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"
2018-02-11 05:09:38 +01:00
Martin Flöser 477d79b16a Merge branch 'Plasma/5.12' 2018-02-05 21:22:05 +01:00
Martin Flöser ea5e701164 [x11] Fix interactive point selection
Summary:
The support for interactive point selection was missing. This results in
the ColorPicker dbus API always returning an error on X11. We either need
to disable the ColorPicker on X11 or add support for this functionality.

As the X11 platform basically supports selecting a point in the
interactive window selection it makes more sense to add this missing
method in the platform than to disable support of color picker effect.

BUG: 387720
FIXED-IN: 5.12.1

Test Plan:
Run KWin/X11 on Xephyr and was able to pick a color and
kill a window

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10302
2018-02-05 21:21:27 +01:00
Martin Flöser bbf00fdd98 Require libinput and udev
Summary:
The main reason for not having it as a mandatory dependency was that BSD
doesn't support it. But as I learned recently it is available on our CI
system. So BSDs have support now.

Even more it showed that the code doesn't compile if the dependency is
missing. And there's one thing I hate: broken build configuration
options.

So let's make UDEV and libinput a required dependency and get rid of the
problems.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10057
2018-02-04 15:00:42 +01:00
Martin Flöser 45bdd8a342 Merge branch 'Plasma/5.12' 2018-02-04 15:00:31 +01:00