Commit graph

14247 commits

Author SHA1 Message Date
Anthony Fieroni
c3cd8df795 Be sure isCurrentTab returns true
REVIEW: 127985

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2016-06-01 20:46:35 +03:00
Martin Gräßlin
6cd0d5a54a Delay maximize button click to next event cycle
Summary:
The delay to next cycle dance is needed for Aurorae. Maximizing a
window can result in the decoration being destroyed, in which case
QtQuick can trigger a crash.

A test case is added to simulate the situation and ensure that maximize
still works also after the change.

BUG: 362772
FIXED-IN: 5.6.5

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1586
2016-05-11 13:45:14 +02:00
Jonathan Riddell
440cefff92 Update version number for 5.6.4
GIT_SILENT
2016-05-10 12:45:51 +01:00
l10n daemon script
33d0f02bf0 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-04-28 13:03:57 +00:00
Martin Gräßlin
6d60f01ad9 Skip DontCrashEmptyDecorationTest if we don't have a /dev/dri/card0 device
Without the /dev/dri/card0 mesa fails to initialize egl and the test
fails. In order to silence the failure till the system provides the
device file, we better skip the test.

A nullptr crash in that case is fixed in WaylandServer tear-down.
2016-04-26 12:47:02 +02:00
Jonathan Riddell
8b2e032f96 Update version number for 5.6.3
GIT_SILENT
2016-04-19 11:51:12 +01:00
Martin Gräßlin
380c5e0bd8 [autotests] Only start Xwayland if compositor created a scene
Same as df2c26e3d9 for
WaylandTestApplication.
2016-04-14 10:29:27 +02:00
Martin Gräßlin
df2c26e3d9 Only start Xwayland server if Compositor created a Scene
So far if the Scene creation failed kwin_wayland went into a shutdown,
but didn't succeed because the thread to start Xwayland was already
running: it froze.

This change introduces a new signal in Compositor: sceneCreated. The
startup of Xwayland is bound to this signal. If it gets fired KWin can
startup Xwayland. If it does not get fired, KWin terminates correctly.
2016-04-14 08:51:16 +02:00
Martin Gräßlin
0df4406c2c Fix crash on repainting an invalid sizes decoration
Summary:
If a window has an invalid size the decoration also has an invalid
size. This results in the texture used by the
SceneOpenGLDecorationRenderer to be invalid and being reset to null.
Of course we shouldn't try to use this texture to render to.

The change comes with a test case to simulate the situation. We cannot
simulate it with Wayland clients as the geometry can never be empty.
Thus we create an X11 client, resize it to an empty size and unmap it.

This is the first integration test case which creates an X11 Client!
It's also a test case which needs the OpenGL compositor. This will most
likely not work on build.kde.org yet - we need to see what to do about
it. Will need adjustments to get it at least skip on build.kde.org.

BUG: 361551
FIXED-IN: 5.6.3

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1383
2016-04-14 07:35:51 +02:00
l10n daemon script
ca73e65ac1 SVN_SILENT made messages (.desktop file) 2016-04-11 13:10:20 +00:00
l10n daemon script
57649ee854 SVN_SILENT made messages (.desktop file) 2016-04-09 12:58:52 +00:00
Jonathan Riddell
a70adf1567 Update version number for 5.6.2
GIT_SILENT
2016-04-05 14:16:21 +01:00
Martin Gräßlin
09dd9153d8 [autotests] Use DMZ-White as cursor theme
On build.kde.org we cannot use the breeze cursor theme. Instead we have
DMZ-White (debian package dmz-cursor-theme).

This change adjusts the PointerInput test to enforce DMZ-White and uses
SizeAllCursor instead of OpenHandCursor as that one seems to be missing
in that theme.

Hopefully with these changes the test starts to pass on build.kde.org.
2016-04-05 08:36:53 +02:00
Jonathan Riddell
95c8af33b5 Update version number for 5.6.1
GIT_SILENT
2016-03-29 14:44:59 +01:00
l10n daemon script
e3272fea36 SVN_SILENT made messages (.desktop file) 2016-03-28 13:15:07 +00:00
Sebastian Kügler
5fecaf3fe7 Revert "desktop grid: zoom hovered window"
Summary:
This reverts commit 14d1fdf63f.

The zoom effect is definitely the wrong way, it's broken (can be
triggered without moving the mouse, expands windows outside of their
allotted area (looks like broken sizing/placement), isn't animated so
feels very choppy, isn't using well-known highlight semantics), the
result is that it feels unnatural and jarring. To be honest, when I
looked at it, I was looking for a bug in the code, e.g. margins not
being taken into account. It didn't come up in me that this could be
wanted behavior, until I read the code.

As to the original commit message: The highlight is useless for this
case, as any window can be dragged or activated, highlighted or not.

What *could* work is to somehow intensify the colors, but that again
would have to be animated, and play well with the ongoing desktop-zoom
animation, the mouse pointer location changes relative to the window, so
it's really complex to get right. I thought of this for a while, I don't
think the complexity that has to be implemented is worth the benefit,
because, what does highlighted really mean here? "window is under the
mouse" isn't a useful metric, as we don't know if the user is changing
desktops or rearranging windows, and "window under mouse" changes
depending on the zoom level, "window can be dragged or activated" also
isn't a useful metric, as I can do that with any window, anyway.

Test Plan: Tested with patch applied, desktopgrid windows don't jump around anymore.

Reviewers: graesslin

Reviewed By: graesslin

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1209
2016-03-24 16:06:41 +01:00
Marco Martin
a9fad7396e use a global static for animation ids
using stack adresses makes it possible (even tough not frequent)
for two animations (onle just killed, one just created) to have
the same id, causing scripts to be potentially really confused.
this replaces the id with a global counter, and the
"flying tooltips" bug is gone.

REVIEW:127276
BUG:360068
CCBUG:352254
2016-03-23 12:03:31 +01:00
Martin Gräßlin
23c505d71e Ensure panel, desktop and onscreendisplay windows cannot be moved/resized
Summary:
A user shouldn't be able to manually move/resize a desktop window or
a panel. So far this wasn't ensured.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1155
2016-03-21 16:44:46 +01:00
Kai Uwe Broulik
f9da3fb0eb [Window Rules] Fix simple shortcut not being transfered to text field
The dialog only had a "Close" button but the text was only transfered in accepted()

Also fix the position of the QDialogButtonBox which is swapped and so the buttons appear at the top.

BUG: 360521
FIXED-IN: 5.6.1

Differential Revision: https://phabricator.kde.org/D1173
2016-03-21 10:28:44 +01:00
Jonathan Riddell
4a05cc2f54 Update version number for 5.6.0
GIT_SILENT
2016-03-17 09:31:06 +00:00
Martin Gräßlin
fe745177e0 [plugins/qpa] Add a roundtrip platform function
Summary:
Mostly intended for plugins loaded into KWin and wanting to use
KWayland::Client::ConnectionThread::roundtrip(). By providing this
function we can ensure that KWin does not block and nevertheless
perform the required roundtrip.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1153
2016-03-16 11:10:14 +01:00
l10n daemon script
863c586b19 SVN_SILENT made messages (.desktop file) 2016-03-15 14:32:45 +00:00
Martin Gräßlin
bf932c4e97 Fix crash when accessing ShellClient::iconGeometry for a not mapped window
It uses windowManagementInterface which is null until the window
is mapped. A not mapped window obviously has an invalid iconGeometry.
2016-03-14 10:24:13 +01:00
Martin Gräßlin
0b9e6a4aa2 Fix start move through drag distance on window decoration
We need to call handleMoveResize on the mouse move with button down.

Auto tests adjusted to include all possible directions.
2016-03-11 12:48:01 +01:00
Martin Gräßlin
7777f0c507 Invalidate double click timer when start move resize
A press, move, release, press cycle should not trigger the double
click action.
2016-03-11 12:47:17 +01:00
Martin Gräßlin
68683873e3 [plugins/qpa] Fix build with Qt 5.4
PlatformIntegration::destroyScreen got added in 5.5.
2016-03-11 10:02:16 +01:00
Martin Gräßlin
51ee514227 [plugins/qpa] Add a dummy screen on startup
Qt has problems initializing everything correctly if there is no screen
at startup. E.g. the breeze widget style tries to initialize some pixmaps
and this fails. In worst case hitting asserts in Qt (debug build).

This change creates a dummy screen which gets destroyed as soon as there
is a real screen.

Reviewed-By: notmart and sebas
2016-03-10 17:02:06 +01:00
l10n daemon script
544e5a7fb8 SVN_SILENT made messages (.desktop file) 2016-03-10 12:46:31 +00:00
Martin Gräßlin
abca474d44 Don't pass keyboard events to internal windows outside the screen geometry
PresentWindows moves the close button outside the visible area. We
don't want that one to take all key events.
2016-03-09 22:21:10 +01:00
Martin Gräßlin
7d08b08470 [plugins/qpa] Adjust to changes in Qt 5.7 QPA interface
BUG: 360269
2016-03-09 17:15:15 +01:00
l10n daemon script
9fb71ef9a2 SVN_SILENT made messages (.desktop file) 2016-03-09 12:09:22 +00:00
l10n daemon script
b6907427d0 SVN_SILENT made messages (.desktop file) 2016-03-07 13:24:34 +00:00
Martin Gräßlin
34951b3bee Fix repaints area on Wayland damage
The damage event of the Surface does not consider the offset through
the server side decoration. Due to that we need to have a different
repaint and damage area. As Toplevel::addDamage(QRegion) is only used
in the Wayland case the repaint adjustment is removed from the generic
implementation and moved into the specific implementations. While it
wouldn't hurt to have the repaint adjustment in Toplevel, it would
trigger a repaint of an unchanged area.

For Client I'm not sure whether it's correct without considering the
clientPos. My testing shows it's working, but that might also just be
do to Xwayland using OpenGL buffers. Needs further testing.
2016-03-04 16:33:09 +01:00
Martin Gräßlin
2c0df531b7 Only pass key press events to TabBox
We want TabBox to operate on key press, not on key release. So far
it only operated on release as the press was filtered out by the
global shortcuts filter. To prevent that the tab box filter is moved
before the global shortcuts filter.

Note: first usage of TabBox has current window selected instead of
next. This problem is also visible on X11.
2016-03-04 15:40:20 +01:00
Martin Gräßlin
d2716c834b Pass pointer and wheel events to TabBox from special event filter
The TabBox implements methods for those events and performs same
logic as on X11. Click outside of TabBox closes. If the event is on
the TabBox we don't filter the event out and let the internal filter
forward the event.
2016-03-04 14:18:32 +01:00
Martin Gräßlin
6c0ed26c65 Add bool checkInputWindowEvent(QWheelEvent *e) to EffectsHandlerImpl
Allows to also pass through some QWheelEvents.
2016-03-04 14:18:32 +01:00
Martin Gräßlin
7718b6dce3 [effects] Don't assume windowInputMouseEvents only carries QMouseEvents
A QEvent* is passed around, this could also be a QWheelEvent. Only
present windows static casted, all other effects verified.

Documentation is not existing, so we don't know what was intended.
2016-03-04 14:18:32 +01:00
l10n daemon script
5cfadf72a1 SVN_SILENT made messages (.desktop file) 2016-03-04 12:10:05 +00:00
Martin Gräßlin
aea4221575 [tabbox] Pass the tabbox window to elevate as a QWindow instead of winId
By using QWindow we can also find the TabBox window on Wayland where
the winId is not really helpful.

This also changes the elevation from Unamanged to Toplevel, so that
it is no longer X11 specific.

Result: TabBox stays on top of all windows also on Wayland.
2016-03-04 09:44:24 +01:00
Martin Gräßlin
59e3b96812 Add a Toplevel *Workspace::findInternal(QWindow *w) const
This method is able to match a QWindow created by KWin to a Toplevel.
On X11 by matching winId against Unmanaged, on Wayland by matching
to internal window of ShellClient.

Finding the internal window is a commonly needed feature to e.g.
elevate the TabBox window.
2016-03-04 09:42:33 +01:00
Martin Gräßlin
9c78d28327 Fix Workspace::hasClient(const AbstractClient *c)
Properly find AbstractClient. This makes TabBox activate Wayland clients
on end.
2016-03-04 08:37:56 +01:00
Martin Gräßlin
c8b3f71cc6 Fix typo 2016-03-03 17:01:52 +01:00
Martin Gräßlin
2787fdb873 [autotest] Fix build on build.kde.org (Try 3)
Qt::Orientation seems not to be a declared metatype with Qt 5.4.
2016-03-03 16:26:55 +01:00
Martin Gräßlin
db76d4279a Fix build of stable branch on build.kde.org (Try 2)
Like cc64bb25ae just for xkb.
2016-03-03 16:14:17 +01:00
Martin Gräßlin
04fdecdd59 Implement sanity checks when placing transients
A transient window should always be visible on the current screen.
This change ensures that a transient is always placed in a way that
the transient window is visible on the screen ignoring the transient
offset hint if it has to be.

Unfortunately QtWayland doesn't set the transient hint correctly:
a sub menu is a transient to the main window and not to the parent
menu resulting in quite off positioned menus, see:
https://bugreports.qt.io/browse/QTBUG-51640
2016-03-03 15:57:55 +01:00
Martin Gräßlin
fa774230f3 Fix transient placement for decorated parents
Need to add client pos to the transient's position. The offset is
relative to the parent surface, but the client doesn't know about the
size of the decoration, thus KWin needs to add it.
2016-03-03 15:57:55 +01:00
Martin Gräßlin
f2873dcd36 [autotest] Add test for transient placement positioning
Test creates windows and transients for it and verifies the position.
For decorated windows the position is currently broken as it does not
consider the adjusted client position.
2016-03-03 15:57:55 +01:00
l10n daemon script
d678ffc8c5 SVN_SILENT made messages (.desktop file) 2016-03-03 13:12:24 +00:00
Martin Gräßlin
cc64bb25ae Fix build of stable branch on build.kde.org
CI system doesn't have Qt 5.5 yet, let's not break because of
qCInfo.
2016-03-03 08:00:55 +01:00
Jonathan Riddell
72dbdaad06 Update version number for 5.5.95
GIT_SILENT
2016-03-02 13:47:41 +00:00