Commit graph

13289 commits

Author SHA1 Message Date
Martin Gräßlin
1edd689293 Handle interaction with window decoration directly in InputRedirection
So far input events were sent through Xwayland which is not needed as
we have all information available. Even more it had the pointer surface
on the wrong window when interacting with decorations as it was on the
window and not on the decoration.
2015-06-06 17:43:12 +02:00
Martin Gräßlin
8b3be23032 Don't update focused pointer window on pointer movement while button is pressed
If a button is pressed all mouse events should go to the current surface
regardless of whether the pointer is on top of it or not.
2015-06-06 17:43:12 +02:00
Eike Hein
8468da197c Merge branch 'Plasma/5.3' 2015-06-05 18:04:02 +02:00
Eike Hein
26ee92cd67 'Defaults' should set the title bar double-click action to 'Maximize.' 2015-06-05 18:03:05 +02:00
Martin Gräßlin
eac99d5df6 Clenup: Drop QPoint argument from Client::mousePosition
Unused variable is unused.
2015-06-04 19:26:35 +02:00
Martin Gräßlin
6c0c513874 Require XCB 1.10
We need XCB 1.10 for sync to work. Sync was optional with a version check
to make it work on build.kde.org. The CI system supports XCB 1.10 now, so
it's better to have it as a mandatory requirement.
2015-06-04 18:39:04 +02:00
Martin Gräßlin
8a9bbf7ca3 XCB::CURSOR becomes a required dependency
It was only optional because build.kde.org did not provide it when the
dependency got introduced.
2015-06-04 17:50:29 +02:00
Thomas Lübking
be339d7ed3 Merge branch 'Plasma/5.3' 2015-06-04 01:46:12 +02:00
Thomas Lübking
3f8a8ea32a align to c4140d6f4e
activation is now supposed to happen instantly
2015-06-04 01:43:27 +02:00
Thomas Lübking
f887c7d4ee Merge branch 'Plasma/5.3' 2015-06-03 21:40:08 +02:00
Thomas Lübking
9f13e9b260 WORKAROUND for nvidia VBO failures
When switching virtual terminals,
suspending to ram and resizing the
screen (GL viewport) at least the
nvidia driver moves VBO data between
the video RAM and the system heap -
and something about this isn't reliable:

An often perceived resulted are scattered
windows but it may also be the cause for
entirely black screens reported for same
occasions.

As a workaround, we hook into the GL debug
messages and filter them for the suspicious
message, then re-init VBOs

TODO:
figure whether that's our fault or nvidias

REVIEW: 123936
CCBUG: 344326

Patch applies to KWin 5.4
2015-06-03 21:38:55 +02:00
Thomas Lübking
6a27626090 set still required xcb properties in findRule
which is invoked "in place" of the detect button
when calling the kcm as special window/application
setting from the Alt+F3 menu

BUG: 348472
REVIEW: 123953
2015-06-03 21:22:38 +02:00
Thomas Lübking
1df2d5979f keep quick maximized w/ size restritions in screen
... bounds
BUG: 348121
REVIEW: 123910
2015-06-03 21:22:22 +02:00
Martin Gräßlin
35abacabc4 [wayland] Handle unmap in ShellClient
Do not destroy the ShellClient when the Surface gets unmapped. Instead
just hide the ShellClient and show it again on the next damage.
2015-06-03 21:19:00 +02:00
Thomas Lübking
c4140d6f4e Show autohiding panels instantly
this probably makes sense since it won't
have major impact on the workspace like
switching the VD or entering
presentwindows/desktopgrid would

REVIEW: 123904
2015-06-03 21:17:54 +02:00
Thomas Lübking
12fec3f7f5 Maximize effect: skip crossfadign on user resizes
a) close to pointless
b) the target resolution texture is invalid if the resize effect is enabled (as the window was not actually resized)

REVIEW: 123901
2015-06-03 21:17:54 +02:00
Ivan Čukić
e44bffa097 Fixing activities list in the rulewidget
KActivities API is not synchronous anymore. If we want to retrieve
the activities, we should do it when we actually get the data.
We are listening to the service status changes and activity list changes.

REVIEW: 123869
BUG: 347732
2015-06-02 20:10:48 +02:00
Martin Gräßlin
1e16ab2567 Set Toplevel::m_surface to nullptr if SurfaceInterface gets destroyed
When minimizing an Xwayland client the Xwayland server destroys the
Surface causing our next access to the Surface to crash KWin. So for
safety we connect to the destroyed signal and reset the pointer.

The disadvantage is that a minimized Xwayland window doesn't have a
preview any more.
2015-06-01 16:51:27 +02:00
Martin Gräßlin
5a98d8bbbd [wayland] Set depth in ShellClient depending on whether the Buffer has alpha
We need to set the depth in order to properly determine whether the
Surface has an alpha channel and whether blending needs to be enabled
for rendering.

For this a new method is introduced in Toplevel to set the depth. If
the depth changed in a way that the Toplevel gained or lost the alpha
channel a signal is emitted which implies that the hasAlpha property of
Toplevel is no longer constant.
2015-06-01 16:25:21 +02:00
l10n daemon script
d07fd3a140 SVN_SILENT made messages (.desktop file) 2015-06-01 11:58:20 +00:00
l10n daemon script
99237c9b3f 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"
2015-06-01 10:08:03 +00:00
David Edmundson
9791978d53 enable wayland clients to go fullscreen
REVIEW: 123853
2015-05-28 10:58:40 +01:00
Martin Gräßlin
1420bb38a9 [wayland] Drop Qt version check from WaylandServer::fakeDummyQtWindowInput
No longer needed as we install keymaps which prevents the crash in
QtWayland this version check worked around.
2015-05-28 10:25:11 +02:00
Martin Gräßlin
3b4c508ee3 [wayland] Pass xkb keymap to Wayland server
When creating a new xkb keymap we need to pass it to the Wayland server's
seat. As the Wayland protocol expects the keymap as a file descriptor, a
temporary file is created, mmapped and the keymap written into it. As
the Wayland protocol doesn't restrict how long the file descriptor needs
to be valid we keep any created temporary file around till the
InputRedirection gets destroyed.
2015-05-28 10:17:41 +02:00
Martin Gräßlin
988ce28943 [wayland] Ensure size is updated before marking window as ready for painting
Fixes regression introduced with 90a6814: we may not queue a signal
taking a pointer to a ShellClient as the ShellClient might be destroyed
before the queued signal is delivered.

The idea for the queued signal was to ensure that the size is set when
windowShown is emitted - this can also be achieved by first updating the
size.
2015-05-28 08:27:34 +02:00
Martin Gräßlin
90a6814513 [wayland] Place ShellClients
When a ShellClient is added and it's not internal, it get placed just
like any other Client. This needs to happen after the initial size is
determined.

Please note: this breaks the positioning of popup windows (e.g. menus)
as they are placed like any other Client. This needs proper popup support
which right now does not yet exist and thus is not much difference to
before.
2015-05-27 14:20:12 +02:00
Martin Gräßlin
1a89fc55b5 Placement fully operates on AbstractClient
Remaining methods had to be adjusted in one go as they called back
into place method.
2015-05-27 14:20:12 +02:00
Martin Gräßlin
f16644ac2e Move maxSize and minSize to AbstractClient
With a default implementation returning either a INT_MAX size or 0.
2015-05-27 14:20:12 +02:00
Martin Gräßlin
ffd6f9ceba Placement::placeUnderMouse operates on AbstractClient 2015-05-27 14:20:12 +02:00
Martin Gräßlin
737ad0b664 Move keepInArea to AbstractClient 2015-05-27 14:20:12 +02:00
Martin Gräßlin
007e1253c6 Add resizeWithChecks to AbstractClient
The virtual method does not take the xcb_gravity_t - that's only added
in a variant in Client.
2015-05-27 14:20:11 +02:00
Martin Gräßlin
670787086b Placement::placeOnScreenDisplay operates on AbstractClient 2015-05-27 10:36:59 +02:00
Martin Gräßlin
aaca122902 Placement::placeAtRandom operates on AbstractClient 2015-05-27 10:34:15 +02:00
Martin Gräßlin
4d077c42b6 Placement::placeSmart operates on AbstractClient 2015-05-27 10:32:42 +02:00
Martin Gräßlin
a261b1c253 Placement::placeCentered operates on AbstractClient 2015-05-27 10:28:23 +02:00
Martin Gräßlin
b971749f1d Placement::placeZeroCornered operates on AbstractClient 2015-05-27 10:25:04 +02:00
Martin Gräßlin
78700e23fd Placement::checkArea operates on AbstractClient 2015-05-27 10:22:43 +02:00
Martin Gräßlin
da2731be51 Move Client::move to AbstractClient and add implementation in ShellClient 2015-05-27 10:16:46 +02:00
Martin Gräßlin
48272a0de8 Ensure Compositor can tear down without a Workspace
It's possible that the Workspace doesn't get created at all (e.g.
Xwayland failed to start). In that case we must ensure to not call into
Workspace calls during tear down.
2015-05-27 09:13:33 +02:00
Martin Gräßlin
604b6d05f5 [wayland] Ensure Compositor is destroyed early enough
If startup fails and there is no Workspace the Compositor was destroyed
as a child of Application with the result of being destroyed after the
Wayland server resulting in a crash.

If the Workspace gets created the Compositor will be destroyed by the
Workspace, so there's no need to destroy it early.
2015-05-27 09:13:33 +02:00
l10n daemon script
d0e5e86a30 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"
2015-05-26 13:53:12 +00:00
Martin Gräßlin
c798977e55 [wayland] Ensure KWin::atoms are destroyed before doing xcb_disconnect
Destroying the Atoms might call into xcb as a request might have to be
discarded. If atoms are destroyed after disconnecting xcb, this'll crash.
2015-05-26 14:26:56 +02:00
Martin Gräßlin
f81655b7f5 [wayland] Ensure our own windows don't have flag Qt::X11BypassWindowManagerHint
The QtWayland QPA plugin does not create windows with
X11BypassWindowManagerHint which means that KWin's internal windows are
not shown at all. Even worse in QtQuick it can result in a freeze due to
blocking wait for a frame rendered which can just never happen.

As windows could be created by e.g. scripts or look and feel packages we
cannot ensure that the flag will never be set in source code.

Thus we use ApplicationWayland::notify to filter for Show events and
check whether the window to be shown is bypassing window manager hits.
If it is, we unset the flag, destroy the window and show a new one.
2015-05-26 13:53:23 +02:00
l10n daemon script
5d473e37ca SVN_SILENT made messages (.desktop file) 2015-05-23 12:49:14 +00:00
l10n daemon script
cdf5ef113a 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"
2015-05-23 11:09:17 +00:00
Jonathan Riddell
098cf04f31 Update version number for 5.3.1 2015-05-21 18:10:23 +02:00
David Edmundson
df1499784f move isFullScreenable to AbstractClient
REVIEW: 123871
2015-05-21 16:40:21 +01:00
Martin Gräßlin
a9f1f3d85e [wayland] Properly handle case that EGL_WAYLAND_Y_INVERTED_WL is not supported
According to spec eglQueryWaylandBufferWL returns EGL_FALSE if
EGL_WAYLAND_Y_INVERTED_WL is not supported and in that case we should
treat it as af the value were set to EGL_TRUE.
2015-05-21 15:49:46 +02:00
Martin Gräßlin
64e01ac2ca [wayland] Use QProcess to start XWayland server
The code didn't use QProcess as in the early days of main_wayland.cpp
Xwayland had to be started before the QGuiApplication was constructed.
As this requirement doesn't exist any more we can use QProcess and
improve the interaction by e.g. provide useful error messages if
Xwayland couldn't be started.
2015-05-21 15:11:11 +02:00
Martin Gräßlin
9954f1167f [wayland] Call pixmapDiscarded when ShellClient's size changes 2015-05-21 13:34:26 +02:00