Commit graph

13857 commits

Author SHA1 Message Date
l10n daemon script
6bb9f6db7b 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-11-17 13:07:36 +00:00
Martin Gräßlin
57a3cea142 [backends/hwcomposer] Base HwcomposerScreens on BasicScreens 2015-11-17 10:49:09 +01:00
Martin Gräßlin
eb81ddfb86 [backends/fbdev] Use BaseScreens implementation 2015-11-17 10:46:32 +01:00
Martin Gräßlin
898eefc6be [backends/wayland] Use BasicScreens implementation 2015-11-17 10:43:10 +01:00
Martin Gräßlin
7b12e55857 [backends/x11] Use BasicScreens implementation 2015-11-17 10:40:17 +01:00
Martin Gräßlin
fb4d59abb7 [wayland] Add a base implementation for Screens in a basic setup
X11, Wayland, virtual, Framebuffer and hwcomposer have extremely
similar screens implementations. Let's add a base implementation
for them as a BasicScreens.
2015-11-17 10:39:39 +01:00
Martin Gräßlin
cab25fc13f [backends/wayland] Drop warning messages concerning egl backend
From a time before we split into platform plugins.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
75c82fce19 [backends/wayland] Only set socket name if it got sepcified
If we don't have a dedicated device identifier we should use the default
mechanismn which involves using the WAYLAND_DISPLAY or WAYLAND_SOCKET env
variable.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
930e56767e [backends/wayland] Do not query outputs
Not needed, we use a nested window.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
df71c5b61b [backends/wayland] Simplify WaylandScreens by basing on ShellSurface size
It's a screen for a nested setup - no need for integrating with Wayland's
output for that.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
9381d3f88c [backends/wayland] Drop XRandR updating
No longer needed as we use Xwayland.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
3f6cb8812b [backends/wayland] ShellSurface opened as a toplevel instead of fullscreen
Going towards nested setup.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
eafded7127 [backends/wayland] Drop subsurface for cursor
As we don't use the fullscreen shell any more, we use the "normal"
cursor image handling of wl_seat.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
1ca690d4ee [backends/wayland] Drop support for fullscreen shell
We are going to switch to a proper nested approach similar to the
x11 backend. Given that we don't want to run on fullscreen anymore
but just open a nested window.
2015-11-17 09:51:50 +01:00
Bhushan Shah
42ddf685c1 [InputRedirection] Don't crash on invalid Toplevel
Reviewed-By: Martin Gräßlin
2015-11-16 20:57:23 +05:30
Martin Gräßlin
38f19dafb2 Add safety check to Deleted::~Deleted for tear-down
It's possible that the Deleted gets created before destroying Workspace
and due to the deleteLater outlives Workspace. In that case we may not
call into Workspace as this might crash.
2015-11-16 14:14:07 +01:00
Martin Gräßlin
deb63fa344 Cancel loading in EffectsLoader on tear down
When unloading all effects we should make sure that also the ones
scheduled for loading are canceled. For this a new method clear()
is added to the AbstractEffectLoader and all inheriting classes which
clears the current load queue. For the scripted and plugin effect loader
it should also cancel the future, but that's not yet implemented.
2015-11-16 14:06:23 +01:00
Bhushan Shah
e5a0af1589 [InputRedirection] Check if workspace is valid before accessing it
Reviewed-By: Martin Gräßlin
2015-11-16 16:20:29 +05:30
Bhushan Shah
e5518dffe2 [wayland] Add some restrictions for lockscreen
When screen is locked,

- No window other then screenlocker or inputmethods gets rendered
- Only screenlocker gets keyboard events
- Only screenlocker and inputmethods get mouse events

Things that are not secured/tested are :

- Touch events
- Global shortcuts for screenlocker
- Fallback/emergency screen not yet working

REVIEW: 126015
2015-11-16 16:16:20 +05:30
Bhushan Shah
450bbaafdc [wayland] Introduce property to identify lockscreen and inputmethods
This introduces Toplevel::isLockScreen() and Toplevel::isInputMethod(),
this can be used to allow only lockscreen/inputmethods to get input
events and shown when screen is locked.
2015-11-16 15:49:38 +05:30
Martin Gräßlin
5d416a0f69 Introduce additional safety checks for init debug output in SceneOpenGL
There are slight differences between GL_ARB_debug_output and GL_KHR_debug
affecting how it works on GLES. With GL_KHR_debug the context should be
created with a debug flag. With the ARB extension there is no such
requirement. Empirical data (Mali) shows that it doesn't work if the
context is not created with the flag, although the spec seems to allows
it.

So:
* if we have GL_ARB_debug_output we assume it works
* if we only have GL_KHR_debug we check whether the context is created
  with debug support (which we don't do yet, but maybe should?)
* on GLES we can only query with version 3.2 (which we don't request yet)
* with anything older we just assume it's not enabled (which is correct
  given that we don't enable the debug flag)

REVIEW: 126053
2015-11-16 09:09:34 +01:00
Martin Gräßlin
1d75cd26fb Verify that context is robust before resolving robust functions
The extensions specify that you are only allwoed to use the robust
functions if the context is robust. Given that we need to query
whether the robust is context and fall back to our workaround if
the context is not robust.

REVIEW: 126051
2015-11-16 09:08:14 +01:00
Martin Gräßlin
b383db2e2e Create robust egl context if possible 2015-11-16 09:08:14 +01:00
Martin Gräßlin
6d96b8c4af Move egl context creation into AbstractEglContext
Code was more or less copied into each backend, so it's better to
have a shared implementation.
2015-11-16 09:08:14 +01:00
Martin Gräßlin
3a610ec9f6 [backends/hwcomposer] Do not manually cleanup our HwcomposerWindow
It looks like libhybris already deletes the window when we do
eglDestroySurface resulting in a double delete if we also delete it.
2015-11-13 17:55:02 +01:00
Martin Gräßlin
eb5ff917f6 [backends/hwcomposer] Blank output on tear down
This gives a better tear down experience as it goes to black instead
of showing outdated screen and also it disables vsync which fixes a
crash on teardown.
2015-11-13 17:39:16 +01:00
Martin Gräßlin
d4dbc8c802 Disallow XRender or NoCompositing on Wayland
If the user specifies KWIN_COMPOSE=X or KWIN_COMPOSE=N or config
says Xrender lets fallback to QPainter.
2015-11-13 17:12:47 +01:00
l10n daemon script
22da928d2b 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-11-13 10:44:04 +00:00
Martin Gräßlin
bcf76c0d2f [libkwinglutils] Fix regression in OpenGL version parsing
QByteArray seems to not like a truncate or left with -1.

Reviewed-By: Rohan Garg
2015-11-12 17:14:36 +01:00
Martin Gräßlin
f6ef9e8d8c [wayland] Don't use waitForFinished on the Xwayland QProcess
WaitForFinished blocks our main thread, but Xwayland wants to talk
to Wayland and blocks as well. So let's ensure events are processed
while terminating Xwayland.
2015-11-12 15:15:44 +01:00
Martin Gräßlin
240e7ba337 [wayland] Emit signal before x11 connection gets destroyed
Used in Compositor to destroy the cm_selection. This would crash
otherwise as it calls into xcb after Xwayland is destroyed.
2015-11-12 15:13:42 +01:00
Martin Gräßlin
f2bdb4818a [wayland] Disable Compositor during tear-down
Prevents rendering an incomplete state and as well prevents from
running performCompositing() which could access Workspace and crash.
2015-11-12 15:12:01 +01:00
Martin Gräßlin
238ff89edb [wayland] Don't exit due to Xwayland exiting on tear down
Our Xwayland exit error handler should not run during tearing down
Xwayland. Yes we expect Xwayland to exit as a response to KWin telling
it to exit.
2015-11-12 14:06:28 +01:00
l10n daemon script
7d8fcbfd72 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-11-12 11:51:31 +00:00
Martin Gräßlin
c1e9280efa [wayland] Unload all effects prior to destroying Xwayland connection
Some effects do X11 calls in their cleanup code through external
libraries (e.g. KSelectionOwner). As we cannot control that we need
to ensure the effects are unloaded prior to destroying the Xwayland
connection.
2015-11-12 11:33:00 +01:00
Thomas Lübking
7b459214d9 reset generic shader after zoom
REVIEW: 108252
BUG: 355028
REVIEW: 125994
FIXED-IN: 5.5
2015-11-11 22:18:39 +01:00
Thomas Lübking
c04f7919c1 abort max animation on unrelated geometry changes
stupid clients think it's relevant to withdraw other states
when going fullscreen, this means we trigger an
nmaximization animation and when that's done, the
window is fullscreen...

Unfortunately one of the stupid clients is QWidget and also
the window could get other, *legit*, resizes during the
animation, so we cancel it on occasion

BUG: 336467
FIXED-IN: 5.5
REVIEW: 125989
2015-11-11 22:18:32 +01:00
Thomas Lübking
8bea96d701 wait for GL after swapping
otherwise at least on the nvidia blob the swapping
doesn't block even for double buffering

REVIEW: 125659
BUG: 346275
CCBUG: 351700
FIXED-IN: 5.5
2015-11-11 22:18:20 +01:00
Thomas Lübking
0788890233 re-detect triple-buffering after compositor resume
and also hint the proper blocking condition (if turning
off swap control)

The detection vars are global, but the swap control requirement
is not preserved, so the detection must re-occur.

Alternatively (and better) the swap control should be saved
and re-applied, but there's trouble on initial detection

CCBUG: 343184
REVIEW: 125659
2015-11-11 22:15:41 +01:00
l10n daemon script
4924e9479b 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-11-11 10:36:31 +00:00
Martin Gräßlin
4ebba6e134 [wayland] Don't pass keyboard events to Unmanaged windows
The way it was implemented it allowed an X11 unmanaged window to become
a key logger. Basically as soon as there was an unmanaged window it got
all key events. This problem was discovered through the xembed-sni-proxy
which broke key input to all Wayland windows in a Plasma/Wayland session.

With this change Unmanaged windows don't get any key events at all. This
might break some applications as e.g. context menus are using override
redirect windows. A test with Qt applications shows that the menus are
still functional and the events are delivered correctly internally.

If applications show problems with this change, we might need to weaken
the restriction.
2015-11-11 11:00:59 +01:00
Martin Gräßlin
ac1dbac8b1 Handle conflicts between epoxy and manually resolved function pointers
For the functions from GL_FOO_robustness we want to resolve it by
ourselves in order to add a custom implementation if it's not available.
Unfortunately once epoxy.h is included this breaks as epoxy defines the
names and so through the preprocessor epoxy always wins.

So we need different names: all functions from robustness get a "kwin"
prefix and the usage is changed everywhere in kwin source code.

REVIEW: 125883
2015-11-11 08:04:29 +01:00
Martin Gräßlin
fa6fbbdfc1 [wayland] Destroy input method connection after process finished
More cleanup.
2015-11-10 14:38:45 +01:00
Martin Gräßlin
0bf51d99f6 [wayland] Destroy our internal wayland connection from server side
More cleanup.
2015-11-10 14:27:43 +01:00
Martin Gräßlin
3f4e733468 [wayland] Ensure we can tear down ShellClient after Workspace is destroyed
This can happen during tear down of the internal shell clients.
2015-11-10 14:27:03 +01:00
Martin Gräßlin
affcbac7e7 [wayland] Destroy Xwayland's ClientConnection on tear down
We need to destroy the ClientConnections we create. Also we need
to disconnect our Xwayland error handling before destroying it, otherwise
it would trigger the abort for crashing Xwayland.
2015-11-10 14:21:48 +01:00
Martin Gräßlin
f75e53af60 [wayland] Ensure to not call into x11 on Compositor tear-down
During Compositor tear down Xwayland is already destroyed. Thus it
doesn't make sense to try to delete the support properties: either
it freezes in xcb or it crashes because the connection is null.

At the same time we also ensure that the connection internally is
reset to null. Note: the one in kwinglobals.h caches and could cause
use-after-free errors. Any tear-down code must be migrated to
kwinApp()->x11Connection().
2015-11-10 13:54:26 +01:00
Martin Gräßlin
acb0dfd893 [wayland] Don't leak our internal client connection thread object
Thanks ASAN!
2015-11-10 11:43:30 +01:00
Martin Gräßlin
8175562a7a [wayland] Fix cleanup handling on tear down
ASAN righly complained: we need to delete our Wayland objects before
we destroy the internal client connection. Solved by better setting
parent relationships in the QPA plugin and correctly delete objects
in destroy of internal client connection.
2015-11-10 11:35:00 +01:00
Martin Gräßlin
51b44f4a87 [autotests/wayland] Fix with Qt 5.6
Test need to disable HighDPI, otherwise they crash.
2015-11-10 10:58:33 +01:00