Commit graph

15701 commits

Author SHA1 Message Date
Martin Flöser
a5b17b2228 Require Qt 5.9
Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8331
2017-10-31 12:45:21 +01:00
Martin Flöser
91d78daac4 Ensure libinput connection thread uses real time scheduling
Summary:
The SCHED_RESET_ON_FORK results in threads (not only processes) to have
the scheduling policy reset to default. This means that the libinput
thread is not real time, but this was actually intended.

To solve this problem KWin does start without the RESET_ON_FORK flag
during startup. Once createInput has been called the scheduling is
adjusted again and RESET_ON_FORK is added again. This results in the
libinput thread and all threads Qt starts in between (e.g. dbus) to gain
real time policy. But it is still not leaked to other processes or to
threads in KWin which don't need it.

Other options considered: just don't use RESET_ON_FORK and instead
manually reset on fork. This would mean all threads in KWin gain real
time, but we don't need this. It's only interesting for the main
(rendering, Wayland thread) and the input thread. Also the danger to
leak into another process is too high.

Keeping the capability till the libinput thread is created and adjust
the thread itself. This option was discarded as I don't want KWin to
have any capabilities when the QApplication is started.

Test Plan: ps -eL -o class,rtprio,cmd,comm  | grep kwin_wayland

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8065
2017-10-31 12:44:51 +01:00
Martin Flöser
f25088c424 Merge branch 'Plasma/5.11' 2017-10-31 10:35:56 +01:00
Martin Flöser
d71792378e Fix rendering issues of subsurfaces by using proper clipping
Summary:
Rendering subsurfaces in the OpenGL compositor has always resulted in
flickering when a subsurface gets repainted and there is a window on top
of it. Looking at the code this is rather obvious: the clipping of the
main window is ignored and the complete subsurface is rendered as is and
thus also rendering above windows where it should not render.

This change passes the clip region and whether hardware clipping is used
to the rendering of subsurfaces which in turn uses it for rendering the
texture.

BUG: 385924
FIXED-IN: 5.11.3

Test Plan:
Opened systemsettings, went to decoration KCM, put a window
partially above and scrolled. Without change: strong flicker, with change:
no flicker.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8369
2017-10-31 10:35:04 +01:00
l10n daemon script
aa0a25f380 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"
2017-10-31 04:42:16 +01:00
David Edmundson
7e6721ece0 Scaled decorations in QPainter mode
Summary:
Under wayland we support high DPI putting by putting a separation
between the logical co-ordinate system and the resolution of rendered
assets.

I didn't include window decorations in the previous wayland scaling
patchset. They were drawn them at a standard resolution, which is
implicitly scaled up.

This uses the Qt scaling, meaning oxygen and breeze (and others) get
perfect high DPI support with zero client changes.

Like the window scaling this handles any combination of a 2x scaled
decoration being rendered on a 1x screen or vice versa.

CCBUG: 384765

Test Plan:
export KWIN_COMPOSE=Q
Had two screens of different scales
It was the right size on both (as before)
Was super-sharp on the fancy screen

Reviewers: #plasma, hetzenecker, graesslin

Reviewed By: #plasma, graesslin

Subscribers: ngraham, graesslin, plasma-devel, kwin, #kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D8504
2017-10-30 13:27:48 +00:00
l10n daemon script
644f595df6 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"
2017-10-29 04:58:06 +01:00
l10n daemon script
2e371f9634 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"
2017-10-29 03:39:13 +01:00
l10n daemon script
145bfd168d 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"
2017-10-28 04:38:13 +02:00
l10n daemon script
35bea8a87e 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"
2017-10-27 04:49:52 +02:00
David Edmundson
5d07543d2f Merge branch 'Plasma/5.11' 2017-10-26 18:46:43 +01:00
Kamil Piwowarski
9cafbb1179 Fix viewport for screenshot on multiple screens
Summary: D8479 fixes viewport for real hardware, but there is still problem with screenshots. This patch fixes that.

Test Plan:
- Have three monitors (like in bug 385655)
- Press PrtSc and then Enter
- Screenshot is ok

Before:
{F5450056}
After:
{F5450058}

Reviewers: #kwin, #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel, kwin, #kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D8485
2017-10-26 18:45:45 +01:00
David Edmundson
ded617bd1a Merge branch 'Plasma/5.11' 2017-10-26 17:40:34 +01:00
David Edmundson
69b2c2fcea Set scale on glScissor calls
Summary:
glScissor works on window co-ordinates. i.e not scaled by the viewport
We need to multiply by the scale there.

This fixes a minor visual glitch in animations when using hardware
clipping.

Test Plan:
Hardcoded my minimise animation to be really slow.
Now every frame looks perfect

Reviewers: #kwin

Subscribers: kpiwowarski, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8490
2017-10-26 17:32:47 +01:00
David Edmundson
019d4bf425 Fix glScissor calls with y-offset screens
Summary: As per the glViewport patches yesterday.

Test Plan:
Vertically stacked monitors
minimised something, it animated properly

Reviewers: #plasma

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8503
2017-10-26 17:31:58 +01:00
David Edmundson
20db59ac1f Merge branch 'Plasma/5.11' 2017-10-26 01:07:49 +01:00
David Edmundson
5d7e22e5dc Fix viewport on vertically stacked monitors
Summary:
We want to translate by the monitor position, so that needs to be
the negative of the position.

But Kwin/KScreen treats 0 as the top of all monitors. GL treats 0 as
bottom, so that all needs inverting.

Hence this should be a positive y value for the viewport.

BUG: 386099
BUG: 385655

Test Plan:
Had two monitors
Side by side was - fine
Stacked vertically - still fine

Modded X code to extend in y instead of x.
3 monitors worked fine.

Nested wayland only seems to support one screen?

Reviewers: #plasma

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8479
2017-10-25 23:13:44 +01:00
Jonathan Riddell
aa58243a48 Update version number for 5.11.2
GIT_SILENT
2017-10-24 11:12:42 +01:00
l10n daemon script
530e63b751 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"
2017-10-24 06:46:04 +02:00
l10n daemon script
f6e32f5ba1 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"
2017-10-24 05:16:57 +02:00
Bhushan Shah
2a13a292ea [platforms/fbdev] Support for RGBA8888 color format
Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6798
2017-10-23 13:44:53 +05:30
Bhushan Shah
8729ff25c9 [platforms/hwcomposer] Make createOutput a non-static method
Summary:
there is no need for createOutput to be static, make it non-static,
this also fixes the build failure introduced in commit
02d3daf28a.

Test Plan: builds

Reviewers: #kwin, graesslin, davidedmundson

Reviewed By: davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8430
2017-10-23 13:42:26 +05:30
l10n daemon script
4ef7a572a1 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"
2017-10-20 04:35:39 +02:00
Martin Flöser
2e868c50df Create a dedicated X11Filter for Client sync events and move it to X11 platform
Summary:
On Wayland we have the sync disabled as it doesn't work properly. This
allows us to also move the sync event handling into the X11 standalone
platform.

The code is slightly refactored: instead of passing the event to each
Client, we search for the matching Client. For that the SyncAlaram struct
is added to public section of Client. The method to handle the sync
doesn't need the event any more and is moved from events.cpp to
client.cpp.

Test Plan:
Run Xephyr+kwin_x11, resized a window and verified through
gdb breakpoint that the sync still works

Reviewers: #kwin, #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D7942
2017-10-19 19:56:58 +02:00
Martin Flöser
8f4b6a8973 Drop the explicit fallback to XRender
Summary:
With the new try of all compositor types supported there is an automatic
fallback from OpenGL to XRender/QPainter in case OpenGL setup failed.
So there is no need to invoke a method to do just that.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D8364
2017-10-19 18:26:57 +02:00
Martin Flöser
729bfd04a0 Try all supported Compositor Types of the current Platform
Summary:
The Compositor now tries to create a Scene not just once but every
type supported by the Platform till it finds one which works. The user's
configuration is only used as a preferred hint and tried first if the
platform supports it.

This brings as an advantage that on platforms such as framebuffer the
user does not need to specify which compositor to use: KWin uses QPainter
automatically.

Also we don't need to do the "translation" from XRender to QPainter any
more. XRender is not supported by any platform using QPainter, so the
user configuration is ignored anyway.

BUG: 350159
FIXED-IN: 5.12.0

Test Plan: Run on framebuffer, verified debug output.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8363
2017-10-19 18:26:33 +02:00
Martin Flöser
abedb464d5 [QPA] Implement Screen on top of internal Screens API
Summary:
The test DontCrashUseractionsMenu (Waylandonly) found an issue in our
screen handling implementation in the QPA. The code exposed a short time
frame between the dummy screen getting destroyed and the first screen
being added. This could result in a crash of KWin.

There is actually no need to implement Screen on top of Wayland screen.
KWin has all the knowledge, so we can also base this on top of the
Screens API.

Advantages:
 * no delays due to Wayland roundtrips
 * handle screen getting removed (was a TODO)
 * handle resolution changes (was a TODO)

The new implementation has a disadvantage that it destroys and readds
all screens whenever something around the screen changes. This shouldn't
be an issue in practice as it's only for the internal QPA and thus only
affects KWin internal windows which is placed in global coordinates
anyway. If it turns out to be a problem we need to track better the
screen changes - so far those were not tracked at all.

Test Plan: Run a few unit tests which change screens

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8345
2017-10-19 18:03:10 +02:00
Martin Flöser
02d3daf28a Add physicalSize to the Screens API
Summary:
Allows to share the implementation in a better way and is a requirement
to get the Screen implementation in the QPA plugin to be based on
KWin::Screens instead of KWayland::Output.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8344
2017-10-19 18:02:32 +02:00
Martin Flöser
c2d4cb8846 Support initial minimize rule in ShellClient
Summary: Honors the rules for minimizing a window on initial show.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8182
2017-10-19 18:00:42 +02:00
Martin Flöser
d3eccada62 Implement Apply desktop rule for ShellClient
Summary:
This change sets up ShellClient for supporting window rules by reading
in the rules once it gets created. As a first rule the Apply initially
rule for desktop is implemented.

Currently it is not yet possible to set window rules through the
configuration menu. So far only injecting rules through the test
framework (temporary rules) is implemented. The idea is to first
implement all rules then to expose them to the UI.

Test Plan: New test case

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8177
2017-10-19 18:00:06 +02:00
Martin Flöser
8c2b2faf9d Add DBus protocol to virtual keyboard
Summary:
This change adds a DBus API to query whether the virtual keyboard is
currently enabled and provides DBus methods to request that the virtual
keyboard gets enabled/disabled. This is useful for e.g. providing a
Plasmoid or for convertables where the tablet mode needs to be enabled.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8166
2017-10-19 17:59:19 +02:00
Martin Flöser
09489a4c2b Add a pure virtual method to Platform to describe the supported compositors
Summary:
So far KWin does not know which Compositors the platform actually
supports. This results in KWin happily trying to use the OpenGL
compositor on fbdev or the QPainter compositor on hwcomposer although
that is obviously going to fail as the platform doesn't support this.

By adding a pure virtual method all Platforms can define what they
support. In a later step the Compositor can use this to create an
appropriate scene and also perform proper fallback handling in case the
scene creation fails.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8316
2017-10-18 21:19:43 +02:00
Jonathan Riddell
655b0876f1 Update version number for 5.11.1
GIT_SILENT
2017-10-17 08:26:28 +01:00
Martin Flöser
aed7ff64c4 Merge branch 'Plasma/5.11' 2017-10-16 17:58:28 +02:00
Martin Flöser
507d83fb08 Ensure leave event is send to decoration when a window maximizes
Summary:
When clicking the maximize button without moving the mouse, the maximize
button stayed in hover state till the mouse moved. The reason for this
is that the PointerInputRedirection does not perform an update on the
geometry change of a window.

BUG: 385140
FIXED-IN: 5.11

Test Plan: Manual testing

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8016
2017-10-16 17:57:21 +02:00
Alexander Potashev
769c6358f5 kcmkwincompositing: Remove space in front of ellipsis 2017-10-16 18:49:09 +03:00
Martin Flöser
6b8943bddd Fix new unused variable warning 2017-10-16 17:17:15 +02:00
Martin Flöser
7ef8409157 Move X11-only specific part of EffectsHandlerImpl to x11 platform plugin
Summary:
The Platform API is extended by a call to create the EffectsHandler. In
X11 standalone Platform a new EffectsHandlerImplX11 is added which
contains the X11 only parts of the EffectsHandler, such as grabbing the
X keyboard and the X11 mouse interception window.

The EffectsHandlerImpl gains some virtual methods for the parts which
are now done in the X11 specific implementation. In return we get rid of
lots of if-else structures checking for the operation mode.

Test Plan: Only compile tested.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7955
2017-10-16 16:54:17 +02:00
l10n daemon script
985e9cfba3 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"
2017-10-16 06:37:03 +02:00
l10n daemon script
b1aa4e84ef 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"
2017-10-16 05:07:40 +02:00
Alexander Potashev
e033091f41 kcmkwinrules: Fix window title 2017-10-15 18:36:38 +03:00
Alexander Potashev
348ad276ac kcmkwinrules: Change file filter to "KWin Rules (*.kwinrule)" 2017-10-15 18:36:38 +03:00
Martin Flöser
afe0a5c041 Fix placement of KSplash
Summary:
In a bug report there was a reference that on multi-screen KSplash is
not placed correctly. I investigated and noticed that it is an OSD which
sets an own position. In KWin the events were processed correctly but
the position was off.

The problem is that KWin has code to correct the position of an OSD when
it's size changes. This happens also on first damage and then the window
gets incorrectly placed when the position is set. So honor that the
position is set.

Test Plan: Restarted the session, ksplash positioned correctly now.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8268
2017-10-15 16:41:31 +02:00
Martin Flöser
1e7b4fbc8a Merge branch 'Plasma/5.11' 2017-10-15 16:40:03 +02:00
Martin Flöser
1b01f1b300 Update pointer position whenever a window gets (un)minimized
Summary:
This fixes the following problem:
1. Have two windows maximized
2. Click minimize button on first window
3. Click minimize button on second window

What happened:
Second click was ignored as the pointer was not updated.

BUG: 378704
FIXED-IN: 5.11

Test Plan:
Nested KWin/Wayland, added two maximized windows, minimized
both without moving the mouse

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8145
2017-10-15 16:38:45 +02:00
l10n daemon script
af82ddb508 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"
2017-10-14 07:20:40 +02:00
l10n daemon script
eedd89fd51 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"
2017-10-14 05:33:32 +02:00
Marco Martin
735fcc6e95 Make use of foreign protocol
Summary:
not sure if that is the right "parent" that has
to be set, set the transient for surfaces that
have setParentOf of an imported set

Test Plan:
m_XdgForeign->transientFor(surface()) finds the surface is expected,
not sure how to test it further

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: luebking, graesslin, davidedmundson, plasma-devel, kwin, #kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D7521
2017-10-13 11:32:22 +02:00
l10n daemon script
c409c9c3f0 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"
2017-10-13 06:29:01 +02:00
l10n daemon script
696028bdb2 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"
2017-10-13 05:05:58 +02:00