Commit Graph

14836 Commits (4d3809f8e314b602e566ba42469ca3a0836b3e88)

Author SHA1 Message Date
Jonathan Riddell 4d3809f8e3 Update version number for 5.8.5
GIT_SILENT
2016-12-27 09:27:02 +00:00
l10n daemon script 818ed8f4ad 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"
2016-12-13 05:42:59 +01:00
l10n daemon script 23e500a273 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"
2016-12-05 05:13:10 +01:00
l10n daemon script ae5df024b1 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"
2016-12-02 05:50:58 +01:00
David Edmundson d0e0f6c88c Align configure button consistently across delegates
Summary:
Currently the configure button is aligned to the win decoration in the
background. This is bound to 40 - the inactive decorations shadow.

This means the configure button ends up in different places across each
item,
looking a bit weird and potentially not even on top of the right
delegate.

This patch aligns the configure button relative to the overall delegate
so that it's in the same place on every item

Test Plan: Looked at KCM

Reviewers: #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3526

BUG: 372685
2016-11-28 09:24:55 +00:00
l10n daemon script 47a7f24ed5 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"
2016-11-25 06:39:44 +01:00
Jonathan Riddell 09dfba421b Update version number for 5.8.4
GIT_SILENT
2016-11-22 09:48:07 +00:00
Martin Gräßlin 16c7650d76 Fix AbstractClient::sizeForClientSize
Summary:
The method is supposed to return the AbstractClient's size for a given
client size. That is the size including the window decoration.

The default implementation returned the passed in client size without
adjusting for the decoration. This resulted in ShellClient getting a
wrong size especially when AbstractClient::adjustedClientSize (which
calls sizeForClientSize) was called.

The result of the incorrect size was for example a shrinking of the
window when starting to resize a window.

BUG: 370345
FIXED-IN: 5.8.4

Reviewers: #kwin, #plasma_on_wayland, broulik, subdiff

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3414
2016-11-18 12:36:08 +01:00
Martin Gräßlin fb69b791a1 Ensure that all Effects honour the grab roles correctly
Summary:
When windows get added some effects grab the window and want to be the
only one animating this window. For this the grab roles exists. An
effect being notified later on evaluates the grab state and does not
start the animation.

This process failed due to being dependent on the order the effects are
loaded. Window Added/Closed are signals emitted by EffectsHandler, thus
first come, first serve. The requested effect order does not play into
it.

Due to that it could happen that an Effect which should not animate,
started to animate as the grab was still there.

This change adds the possibility to be notified whenever the window data
changes. A new signal is added to EffectsHandler which is emitted
whenever the windowData changes. The interested effects connect to it
and cancel their (just started) animation for the window.

Adjusted effects are:
* ScaleIn
* Fade
* WobblyWindows

In case of WobblyWindows an additional logical error was fixed that the
animations were only run when an effect grabbed instead of the other way
around.

BUG: 336866
FIXED-IN: 5.8.4

Reviewers: #kwin, #plasma, broulik

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3211
2016-11-07 11:45:09 +01:00
Martin Gräßlin ee7da425ce Unpolish QStyle on QApp prior to destroying internal Wayland connection
Summary:
The QStyle might interact with our internal Wayland connection. If the
cleanup happens after destroying our internal Wayland connection KWin
will crash at tear-down.

With this change the QStyle can perform cleanup already prior to the
deconstruction of the Wayland connection.

CCBUG: 372001

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3241
2016-11-07 11:28:06 +01:00
Martin Gräßlin f3325a1cb8 [helpers/killer] Force to platform XCB
Summary:
The killer can only kill X11 windows. It is also only invoked for Client
and not for ShellClient. The tool interacts with QX11Info which means it
would crash if tried to use on Wayland.

Thus force platform xcb on the tool.

Test Plan: Killer shows for Xwayland windows.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3228
2016-11-07 11:27:32 +01:00
Martin Gräßlin 2a15592571 Simplify the window title passed in from the window system
Summary:
So far KWin used the window title provided from the window directly
without any sanitizing. This could result in broken window decorations
if the title included line breaks. Those were passed to the decoration
and depending on the way how the decoration renders the title, it could
result in visual breakage.

Having line breaks in a window title doesn't make sense. Given that KWin
now simplifies the title when copying it to it's own structure. This
also ensures that the title passed to e.g. task manager does not have
any line breaks on Wayland.

BUG: 323798
FIXED-IN: 5.8.4

Test Plan: Opened the web page in a nested KWin, properly rendered now.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3215
2016-11-07 11:26:48 +01:00
Martin Gräßlin 3c6371390d [desktopgrid] Don't manipulate virtual desktop of desktop window
Summary:
Desktop Grid has a feature that right or middle clicking a window toggles
the on all desktop state. If that is done for a desktop window, things
obviously start to fail.

KWin internally allows to change virtual desktop for all windows, even
for windows like the desktop or docks. Changing in KWin core is not a
solution.

Thus a special casing in desktop grid is added to disallow the selection
for desktop windows.

BUG: 372037
FIXED-IN: 5.8.4

Test Plan: Tried right clicking desktop window and other windows.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3253
2016-11-04 09:32:24 +01:00
Martin Gräßlin da0ba76324 Invert the scroll direction for wheel events on internal windows
Summary:
For whatever reason Qt scrolled the wrong way on internal windows. As a
new QWheelEvent is constructed anyway, just multiply by -1 to get the
direction fixed.

BUG: 371999
FIXED-IN: 5.8.4

Test Plan: Tried debug console in nested setup, scrolled correctly now.

Reviewers: #kwin, #plasma_on_wayland, broulik

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3247
2016-11-04 09:00:10 +01:00
Martin Gräßlin db58c421eb Internal windows cannot be minimized
Summary:
This change ensures that the DebugConsole does not have a minimize
button.

BUG: 372000
FIXED-IN: 5.8.4

Reviewers: #kwin, #plasma_on_wayland, broulik

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3244
2016-11-04 08:59:43 +01:00
Martin Gräßlin fb4b0c40ef [autotests/libinput] Extend the Device test
Added tests for new functionality:
* scroll enabled by default properties
* scroll supported properties
* scroll on button down
2016-11-04 08:58:09 +01:00
Martin Gräßlin f1d17c1a56 [autotests/libinput] Extend device test for scrol methods
Covers the variants for scroll method.
2016-11-03 17:51:32 +01:00
Martin Gräßlin e9dfdbe6a8 [autotests/libinput] Extend Device test case
Tests the new functionality for:
* natural scroll
* middle emulation
2016-11-03 17:22:31 +01:00
David Strobach e4283543f6 [libinput] Add scroll method configuration support
Wraps libinput
libinput_device_config_scroll_get_methods
libinput_device_config_scroll_get_default_method
libinput_device_config_scroll_set_method
libinput_device_config_scroll_get_method
libinput_device_config_scroll_set_button
libinput_device_config_scroll_get_button
libinput_device_config_scroll_get_default_button

Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3194
BUG: 371803
FIXED-IN: 5.8.4
2016-11-03 14:03:17 +01:00
David Strobach b19341777a [libinput] Add natural scrolling support
Wraps libinput
libinput_device_config_has_natural_scroll
libinput_device_config_set_natural_scroll_enabled
libinput_device_config_get_natural_scroll_enabled
libinput_device_config_scroll_get_default_natural_scroll_enabled

Differential Revision: https://phabricator.kde.org/D3193
BUG: 371791
FIXED-IN: 5.8.4
2016-11-03 14:02:27 +01:00
David Strobach e00649d002 [libinput] Add middle mouse button emulation support
Wraps libinput
libinput_device_config_middle_emulation_is_available
libinput_device_config_middle_emulation_set_enabled
libinput_device_config_middle_emulation_get_enabled
libinput_device_config_middle_emulation_get_default_enabled

Differential Revision: https://phabricator.kde.org/D3187
BUG: 371756
FIXED-IN: 5.8.4
2016-11-03 14:00:03 +01:00
Martin Gräßlin 679e417808 Don't snap to auto-hidden panels
Summary:
When moving windows we don't want to snap against not visible windows
like auto-hidden panels.

BUG: 365892
FIXED-IN: 5.8.4

Test Plan: So far only auto-test, manual test will follow.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3225
2016-11-03 08:35:25 +01:00
Martin Gräßlin 6c121436e2 [scripting] Silence unused variable warnings
CCMAIL: github@chilon.net
2016-11-03 08:17:11 +01:00
Martin Gräßlin be9ee989b1 [scripting] Fix export of WorkspaceWrapper in QtScript
The export of the WorkspaceWrapper was changed to be a subclass with all
the elements still being in the parent class. But the "workspace" was
exported with QScriptEngine::ExcludeSuperClassContents. Thus all usages
of workspace were broken and our tests started to fail on build.kde.org.

This change removes the ExcludeSuperClassContents which means that also
the QObject properties and slots are now exposed which was previously
not the case.

CCMAIL: github@chilon.net
2016-11-03 08:13:25 +01:00
James Pike 4730be084c Support for workspace.clientList() in declarative script
Summary:
The version provided is only compatible with QtScript so it became
necessary to split WorkspaceWrapper into a base class and two child
classes, one for QtScript and one for QmlScript.

BUG: 340125
FIXED-IN: 5.8.4
REVIEW: D3185
2016-11-02 23:31:06 +00:00
David Edmundson 254690e899 Correctly set i18n suffix in mousemark spinbox.
Summary:
QSpinBox can't handle plural suffixes. Something previously done by
KIntSpinBox.

Using setSuffix(ki18np("pixel", "pixels")).toString() does nothing, as
at the time of conversion we don't know which one to use.

This patch uses KPluralHandlingSpinBox and correct ki18np.

Note, "new" dependency was already linked implicitly in other kwin, but
we need to add it for this KCM.

Test Plan:
Opened KCM (in English) set counter to 1 pixel and 2 pixels.
No longer had a big warning. Also appropriate number of s's appeared.

Reviewers: #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3222
2016-11-02 13:07:39 +00:00
Martin Gräßlin 3a179f32af [autotests] Add test case for snap to auto-hiding panel
Workspace::adjustClientPosition incorrectly snaps against an auto hidden
panel as the test shows.

CCBUG: 365892
2016-11-02 11:28:54 +01:00
Jonathan Riddell 241d8bfa27 Update version number for 5.8.3
GIT_SILENT
2016-11-01 11:35:59 +00:00
Martin Gräßlin 55a0afca97 [autotest] Add test case for window caption need to be simplified
The test illustrates that special characters like a line break are not
removed from the window caption, which results in a line break added in
the window decoration.

Test case uses a title from a web page triggering it in Firefox.

CCBUG: 323798
2016-10-31 15:54:16 +01:00
l10n daemon script 9e23d20f8f 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"
2016-10-31 12:00:16 +00:00
Martin Gräßlin 82054a406a Send a pointer leave when triggering a move resize
Summary:
When triggering a move resize all following pointer events are grabbed
by KWin itself. Thus the correct behavior is to informe the client about
it and send a pointer leave.

This ensures that after the move resize ended the pointer gets a new
enter. By sending anew pointer enter the position gets updated to the
new position which so far did not happen and the client generated events
on the wrong position.

BUG: 371573
FIXED-IN: 5.8.3

Reviewers: #kwin, #plasma_on_wayland, broulik

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3154
2016-10-31 11:51:15 +01:00
Martin Gräßlin e4930c0c41 [autotest] Make SlidingPopupsTest a little bit more robust
The first test case was sometimes failing due to the time value in the
first render pass being too high. So that the effect ended directly for
the window.

This change adds a small waiting time for the compositor to render prior
to the creation of the window. Ideally we would connect to frameRendered
signal, but the OpenGL compositor doesn't emit it yet.
2016-10-31 08:55:54 +01:00
Martin Gräßlin 3aeb7367bb [autotests] Extend SlidingPopupTests for Wayland windows
Same test case as for X11 windows added for Wayland windows.
2016-10-31 08:43:35 +01:00
Martin Gräßlin b84fd50319 [autotests] Extend SlidingPopupsTest::testWithOtherEffect
Test more combinations of other effects together with sliding popups.
The problem does not only exist for scale in but for pretty much any
effect that the ordering in which the effects get loaded makes the test
pass or fail.

Some effects require OpenGL, as build.kde.org does not support OpenGL
compositing (yet), the tests only do the OpenGL cases if an OpenGL
compositor could be created.

CCBUG: 336866
2016-10-31 07:48:59 +01:00
Martin Gräßlin 42e7ffa263 [autotests/effect] Add test case for Sliding Popups effect
The test case loads the sliding popups effect and the scale in effect
which also operates on added windows. As the test case shows depending
on the sequence how the effects are loaded, the window gets animated by
both effects (wrong) oor only sliding popups.

CCBUG: 336866
2016-10-30 11:27:38 +01:00
James Pike 0c4c529d68 Support for KWin.registerShortcut() in declarative script
Summary:
registerShortcut is available to javascript KWin scripts but was not
available to those written in declarative script.

BUG: 340225
FIXED-IN: 5.8.4
REVIEW: 129250
2016-10-30 01:15:02 +01:00
Martin Gräßlin 9e3fb47259 [decorations/aurorae] Fix typo in Plastik theme 2016-10-29 20:38:42 +02:00
Martin Gräßlin 94c5704af7 [effects/translucency] Cancel existing animations before starting new
Summary:
It can happen that startAnimation is invoked multiple times for a
window. In case it was invoked a second time the previous animation was
not cancelled. This resulted in the set-animation to never end. When
closing a window, it would stay around as a translucent, non-interactive
window zombie.

This change ensures that existing animations get cancelled.

BUG: 342716
FIXED-IN: 5.8.3

Test Plan: Tested through autotest and manually.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3190
2016-10-28 16:24:49 +02:00
Martin Gräßlin 37067f538e Ensure the complete decoration texture gets repainted on recreation
Summary:
When the decoration size changes the textures get recreated and need to
be properly filled. So far KWin used the scheduled repaint geometry in
this situation. If the decoration didn't schedule the complete geometry
for repain there will be an empty area in the decoration texture.

This change ensures that the complete texture gets repainted when they
are recreated. Thus the decoration rendering is more fault tolerant
towards potential bugs in the decoration. With no-compositing and XRender
compositing this problem was not reproducable and already fault tolerant,
so OpenGL just catches up with the other modes.

BUG: 371735
FIXED-IN: 5.8.3

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3186
2016-10-28 16:06:57 +02:00
Martin Gräßlin 2e3c6c92e9 Trigger resize of input window when deco size changes
Summary:
Client::updateInputWindow operates with the decoration size. The method
gets called from various points when changing the window geometry. If at
that moment the decoration has not updated yet, the borders might be at
a wrong position.

This behavior could be triggered when a window requested to change the
state to maximized. During maximization the decoration still had the
wrong size when updateInputWindow was called, thus an interactive area
inside the window was created.

To circumvent this problem updateInputWindow is now also called whenever
the window decoration changes.

As a note: that a maximized window has resize only borders is wrong. Kwin
should be protected against that.

BUG: 371284
FIXED-IN: 5.8.3

Test Plan: Checked xwininfo for the deco extends window

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3151
2016-10-28 16:06:25 +02:00
Martin Gräßlin eb88762e07 [autotests] Add test case for translucency effect of dialog window
This test case simulates a condition of the translucency effect
modifying windows of certain types (e.g. dialogs).

In case the effect got activated for a window it does not end after the
window gets closed and creates a non-interactive zombie window.

CCBUG: 342716
2016-10-28 14:37:10 +02:00
Martin Gräßlin acb4336932 [plugins/qpa] Properly clean up the created KWayland::Client::Outputs
On build.kde.org the autotests started to crash on tear down due to a
newer Wayland library. The reason is that the KWayland::Client::Outputs
are destroyed after the internal Wayland connection is destroyed.

This change parents the created Outputs to the Registry like the other
objects. To ensure that the KWin::QPA::Screen doesn't have a problem
with that, it is changed to a QPointer - nullptr checks are already in
place.

Hopefully that will fix the crashes on build.kde.org, but there is a
chance that more errors are hidden.
2016-10-28 10:12:15 +02:00
Antonio Larrosa 19147f5f85 [platformx/x11] Add a freeze protection against OpenGL
Summary:
With nouveau driver it can happen that KWin gets frozen when first trying
to render with OpenGL. This results in a freeze of the complete desktop
as the compositor is non functional.

Our OpenGL breakage detection is only able to detect crashes, but not
freezes. This change improves it by also added a freeze protection.

In the PreInit stage a thread is started with a QTimer of 15 sec. If the
timer fires, qFatal is triggered to terminate KWin. This can only happen
if the creation of the OpenGL compositor takes longer than said 15 sec.

In the PostInit stage the timer gets deleted and the thread stopeed
again.

Thus if a freeze is detected the OpenGL unsafe protection is written into
the config. KWin aborts and gets restarted by DrKonqui. The new KWin
instance will no longer try to activate the freezing OpenGL as the
protection is set.

If KWin doesn't freeze the protection is removed from the config as
we are used to.

Check for freezes for the first n frames, not just the first

This patch changes the freeze detection code to detect freezes in the
first 30 frames (by default, users can change that with the
KWIN_MAX_FRAMES_TESTED environment variable). This detects
successfully the freezes associated to nouveau drivers
in https://bugzilla.suse.com/show_bug.cgi?id=1005323

Reviewers: davidedmundson, #plasma, #kwin, graesslin

Reviewed By: #plasma, #kwin, graesslin

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

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3132
2016-10-25 09:51:23 +02:00
l10n daemon script 2e9dc7f28a 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"
2016-10-24 12:07:39 +00:00
l10n daemon script 94d009ec02 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"
2016-10-21 12:01:48 +00:00
Jonathan Riddell b9efeb6c28 Update version number for 5.8.2
GIT_SILENT
2016-10-18 11:56:18 +01:00
Martin Gräßlin f642eb9d9d Properly specify libdrm dependency
KWin needs at least 2.4.62 which added the atomic requests.
2016-10-17 16:12:48 +02:00
Martin Gräßlin e9d20b80e9 [tabbox] Intercept QWheelEvents on QQuickWindow for scrolling
Summary:
The TabBox performs the scrolling of the items by itself in order to
support wheel events even if the mouse is not on the TabBox. For that
KWin grabs pointer events on X11 (on Wayland an input filter is used)
and forwards them to the TabBox.

Qt uses Xinput2 for scrolling on the QQuickWindow. Due to that KWin
does not get any xcb core button press/release events when scrolling
inside the QQuickWindow and thus scrolling doesn't work.

There are three possible approaches to fix this:
1. Implement scrolling support in each of the QML switchers
2. Add an xinput2 filter to TabBox
3. Intercept the QWheelEvents on the QQuickWindow

The first approach has the disadvantage that all themes need
adjustment and that there might be behaviorial difference whether one
scrolls on the TabBox window or outside the window.

The second approach would be most in line with the other filters, but
is difficult due to the nature of xinput2 (no xcb bindings, etc).

Thus the third approach might be the best solution. Wheel events are
only delivered to the QQuickWindow if the native events were not already
intercepted, thus we know it won't have side effects for the case that
Wayland is used or xinput2 is not supported.

The implementation installs an event filter on the QQuickWindow which
gets created when showing the TabBox and inside the filter waits till
there is an angleDelta of +/-120 and scrolls by one per every 120 angle
delta as described in the QWheelEvent documentation.

BUG: 369661
FIXED-IN: 5.8.2

Test Plan: Scrolled with touchpad and mouse wheel.

Reviewers: #kwin, #plasma, broulik

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2953
2016-10-17 08:23:39 +02:00
Martin Gräßlin 78a2732a9a Fix shortcut triggering with shift+letter
Summary:
A shortcut with e.g. shift+w could not be triggered as shift is
considered as consumed. It transforms the keysym to an uppercase variant
thus it is consumed.

This change checks for the condition that shift is pressed and is the
only consumed modifier. If the current keysym is a letter the shift is
removed from the consumed modifier again to still support the shortcut.

BUG: 370341
FIXED-IN: 5.8.2

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3015
2016-10-17 08:13:20 +02:00
Martin Gräßlin db95b96854 [kwinrules] Hide all autogroup related widgets
Summary:
Window tabs which are required for autogroup are currently not supported
in KWin. Thus exposing autogroup related window rules does not make any
sense.

This change hides the options again in the hope that we can bring the
feature back in future.

BUG: 370301
FIXED-IN: 5.8.2

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2996
2016-10-17 08:02:10 +02:00