Commit graph

13210 commits

Author SHA1 Message Date
Martin Gräßlin
5088314e9f Drop KWIN_BUILD_DESKTOPCHANGEOSD from conig-kwin.h
Not referenced anywhere in build system.
2015-03-23 15:26:02 +01:00
Martin Gräßlin
49f58059c6 [wayland] Backends are no longer singletons
They are installed in the WaylandServer, thus we don't need an explicit
singleton accessor. If we need to differentiate we can cast.
2015-03-23 14:29:07 +01:00
Andrey Bondrov
b3a9f41fd0 Fix title height for maximized windows with Aurorae decorator 2015-03-23 23:27:09 +10:00
Martin Gräßlin
93e717b072 [wayland] Drop Wayland support in SceneXRender
It didn't get adjusted for Xwayland, so probably doesn't work any more.
The rendering mode seems not very useful if honest and it's better to
use the QPainter backend.
2015-03-23 13:47:21 +01:00
Martin Gräßlin
ee186a68c4 [wayland] Improve decision which backend to create
Both Wayland and X11 backend are bound to the --windowed flag. Which
one to create is decided whether DISPLAY or WAYLAND_DISPLAY env variables
are set with Wayland having precedence over X11. Passing the display as
command line argument overwrites the env variable and takes further
precedence. E.g. if WAYLAND_DISPLAY is exported and --x11-display
argument is provided, it will create X11 backend. Similarly there is now
a --wayland-display command line argument.

If no backend got created, kwin_wayland will exit.

The singleton variant of WaylandBackend is adjusted to take the display
as argument and pass it to the Connection.
2015-03-23 12:45:21 +01:00
Martin Gräßlin
ed504d0c50 Remove unused includes from wayland_backend.cpp 2015-03-23 10:23:10 +01:00
Martin Gräßlin
622d333c11 Do not find Wayland::Client
No longer used.
2015-03-23 10:11:57 +01:00
Martin Gräßlin
75d60d4f85 [wayland] Make Wayland::Cursor a proper optional build dep
Only needed in the Wayland backend and can easily be ifdefed there.
2015-03-23 10:10:38 +01:00
Martin Gräßlin
3c6fd0190b [tests] Only use KWayland in the waylandclienttest
No need for Wayland::Client any more - KWayland encapsulates the usage.
2015-03-23 09:54:37 +01:00
Martin Gräßlin
dce8e74eb0 Do not find Wayland::Server
Not needed, we have the KWayland wrapper.
2015-03-23 09:18:55 +01:00
Simeon Bird
1de1e80d50 Fix hang on nvidia hardware when deleting sync objects
When a sync object is deleted, the fence it is connected to must already
be signalled, or the driver will busy-wait forever.
Signal fences before deleting syncs to avoid this.

BUG: 343551
FIXED-IN: 5.3
REVIEW: 123090
2015-03-22 23:55:48 -04:00
Christophe Giboudeaux
bea55dc614 -Wmissing-include-dirs 2015-03-22 22:36:26 +01:00
Christophe Giboudeaux
0fb0176e4b Don't display anything after showing the found packages. 2015-03-22 22:25:38 +01:00
Andrey Bondrov
4922b6d1cd Fix a typo in aurorae QML code 2015-03-22 21:48:01 +10:00
Thomas Lübking
d1063b2507 Merge branch 'Plasma/5.2' 2015-03-21 01:26:53 +01:00
Thomas Lübking
e26a3db030 Fix closeview hiding: move it outside rootgeometry
The closeview is not hidden because that causes
invalid textures (apparently QML related) and
deleting/recreating causes massive I/O overhead
on effect invocation.

As last resort, the window is "hidden" by moving
it out of the root window geometry.

Jonathan, please RESPIN kwin - sorry for the trouble
... again.

BUG: 345159
REVIEW: 123035
CC: riddell@gmail.com
2015-03-21 01:22:36 +01:00
Martin Gräßlin
5764a087ee Fix build without Wayland (try 2)
Set HAVE_X11_XCB to FALSE if not building with Wayland support.
2015-03-20 16:01:04 +01:00
Martin Gräßlin
8d8c6b09ac Fix build without Wayland (try 1) 2015-03-20 15:46:24 +01:00
Martin Gräßlin
bcf5eedb0f [autotests] Drop linking against XCursor
No longer needed.
2015-03-20 15:42:29 +01:00
Martin Gräßlin
405e366815 Add safety check to InputRedirection::findToplevel
InputRedirection might be invoked to process input events prior to
Workspace being started.
2015-03-20 14:43:47 +01:00
Martin Gräßlin
9a0fd94013 Introduce AbstractBackend as base class for Wayland and X11Windowed backend
The AbstractBackend registers itself in the WaylandServer allowing
external users to easily get to the backend and not needing to test
manually which backend is used.
2015-03-20 14:41:03 +01:00
Martin Gräßlin
dae8eed3a8 Introduce a shared base class for the EGL backends
There's quite some overlap and duplicated code. This AbstractEglBackend
tries to merge the two backends a little bit again.

This also introduces an AbstractEglTexture which supports both X11 and
Wayland "pixmaps" so that EglOnXBackend can support Wayland buffers.
2015-03-20 14:08:54 +01:00
Martin Gräßlin
a1642a85d3 Allow using EGLOnXBackend with X11WindowedBackend
Mostly refactoring to not take the global X11 information (connection,
display, etc.). Adds a dedicated ctor overload which takes the
X11WindowedBackend.

SceneOpenGL is adjusted to create an EGLOnXBackend instead of Wayland one
if the X11WindowedBackend is used.
2015-03-20 14:08:54 +01:00
Martin Gräßlin
3cc1032839 [wayland] Create xcb_connection through XLib in windowed mode
Adds optional dependency to X11_XCB and gets used in X11WindowedBackend
to create an XLib Display if dependency is present.

This allows to create an EGL backend for the X11WindowedBackend.
2015-03-20 14:08:54 +01:00
Martin Gräßlin
6bf44b7db4 [wayland] Add an X11 output backend
This new backend allows to start a kwin_wayland server nested on an
X-Server by using a normal X11 window as output. This allows testing
kwin_wayland without needing to start another Wayland server first.

The behavior is triggered by using new command line arguments:
--windowed
--x11-display=<:0>

With optional --width and --height arguments.

In this mode the WaylandBackend is not created at all.

So far the backend is not fully integrated yet and only the QPainter
backend supports this mode.
2015-03-20 14:08:53 +01:00
Martin Gräßlin
c1ab92d8b4 Make it possible to use XCB::Atom with non-default xcb_connection_t
Preparation step for having an X11 backend in kwin_wayland which has
connection() point to Xwayland and another connection to the parent
X server.
2015-03-20 14:08:53 +01:00
Martin Gräßlin
e886bd7c78 Adjust to newer libinput and require at least 0.10
There was API changes regarding axis event handling.
CCBUG: 342893
2015-03-20 12:42:57 +01:00
Martin Gräßlin
7d797387d7 Add safety check for QueryTree
xcb_qeuery_tree should fail and we should not just assume that the
call succeeds.

Crash reported by Harald Sitter.
2015-03-20 12:39:33 +01:00
Martin Gräßlin
e2c422dcb5 Woraround possible broken cursor when creating mouse interception window
The xcb_cursor_t returned by xcb-cursor library might be broken. If we
set such a broken cursor directly in the create window call it will fail
with a BadCursor value causing effects to break.

This change works around this problem by creating just the window and
moving the possible breaking call into a change window call. That will
still fail, but the window is working.

In addition it performs a safety check by only installing the cursor
if it's not XCB_CURSOR_NONE.

BUG: 344006
REVIEW: 123025
2015-03-20 10:39:11 +01:00
Martin Gräßlin
3aa4c8d635 Add cursor resolving alternatives
The alternative names are taken from the xcursortheme kcm in
plasma-desktop. An example theme where they are needed is "dmz".
2015-03-20 10:39:11 +01:00
Martin Gräßlin
305387ec3a [kcmkwin/rules] Set dynamic property for x11Connection and x11RootWindow
Needed by kwinglobals which gets used internally through DetectWidget.

BUG: 345339
2015-03-20 08:19:45 +01:00
Michael Pyne
85d87297b0 Return false for a bool instead of nullptr.
Fixes compiler warning (error by default in gcc 5).

REVIEW:123077
2015-03-19 23:22:46 -04:00
Jonathan Riddell
ff321a62e3 Update version number for 5.2.2 2015-03-19 11:38:17 +01:00
Aleix Pol
f6db54618b Merge branch 'Plasma/5.2' 2015-03-19 01:15:41 +01:00
Aleix Pol
25f71d1a12 Fix build 2015-03-19 01:15:22 +01:00
Martin Gräßlin
862bb95ffb [wayland] Do not start composite timer if Workspace is not ready yet
Could cause a race during startup resulting in crash.
2015-03-18 16:27:22 +01:00
Martin Gräßlin
8b8167b565 Do not init XRenderUtils on Wayland
If something calls into XRender it would be a bug.
2015-03-18 16:24:25 +01:00
Martin Gräßlin
cd293220bb EGLImage -> EGLImageKHR
CI system didn't like EGLImage, but always liked EGLImageKHR. So let's
try whether using EGLImageKHR fixes build.
2015-03-17 10:46:50 +01:00
Martin Gräßlin
f73da18f2e [wayland] Enforce the wayland QPA
This requires a change present in Qt 5.4.2, without the startup will
freeze. A warning message is shown if the compiled Qt version is not
at least 5.4.2. It's only a warning and an ifdef as distros might
backport the required change.
2015-03-17 10:31:18 +01:00
Martin Gräßlin
371bd4c24f [wayland] Use Surface::setCursor and ::hideCursor in WaylandBackend
Replaces the low level wayland calls and also means that we no longer
need the Wayland client library. Everything wrapped in KWayland.
2015-03-17 10:20:20 +01:00
Martin Gräßlin
f600e2f6f4 [wayland] Properly handle Cursor set on focused PointerInterface
This replaces getting the Cursor through the X11CursorTracker which
is now completely dropped. The Cursor data is now passed through from
the Wayland server and forwared to the WaylandBackend.
2015-03-17 10:20:20 +01:00
Martin Gräßlin
9ca992a329 [wayland] Drop methods on Toplevel to send input events
No longer needed as InputRedirection sends input events directly
through the SeatInterface. In addition this drops the dependency on
xtest.
2015-03-17 10:20:20 +01:00
Martin Gräßlin
7bb107ba6d [wayland] Pass keyboard key press/released events to SeatInterface
Improves handling by no longer sending events with xtest.
2015-03-17 10:20:19 +01:00
Martin Gräßlin
c29f96665d [wayland] Pass pointer input events to SeatInterface
Pointer events are no longer sent through the methods on Toplevel,
but properly sent through the SeatInterface. This has the advantage
that SeatInterface properly tracks which is the focused pointer surface
and does not need to use the xtest extension.
2015-03-17 10:20:19 +01:00
Martin Gräßlin
79c49e84a4 [kwin_wayland] Pass socket file descriptor to QtWayland
WaylandServer allows to create a ClientConnection which is intended for
QtWayland. This allows us to easily identify our "own" surfaces. The
created file descriptor is set as env variable WAYLAND_SOCKET prior to
creating the Application. Wayland will unset it after connecting, so we
don't need to unset it. This removes the hack of setting and resetting
the WAYLAND_DISPLAY environment variable.
2015-03-17 10:20:19 +01:00
Martin Gräßlin
69a13a779d [kwin_wayland] Start Xwayland through socket file descriptor
Creates a socketpair in WaylandServer and creates a ClientConnection for
Xwayland. The created file descriptor is passed to Xwayland through the
WAYLAND_SOCKET env variable.
2015-03-17 10:20:19 +01:00
Martin Gräßlin
9dcd123438 [kwin_waylnad] Fix support for QtWayland's client buffer integration
QtWayland performs an eglInitialize in the main thread when for the first
time an OpenGL context/window is needed. In KWin's startup this happens
during initializing Scripting which creates a QDesktopWidget and triggers
the creation of a QWindow with a RasterGLSurface.

Calling eglInitialize in the main thread blocks as it calls wl_roundtrip.
We cannot just disable OpenGL as that would mean that we cannot use
QtQuick.

The workaround in this change is to create a QWindow with a
RasterGLSurface in a thread and call create on it. This ensures that
OpenGL gets initialized in the thread and doesn't block.
2015-03-17 10:20:19 +01:00
Martin Gräßlin
54c2c5db2d [wayland] Create SeatInterface and sync with WaylandBackend's seat
If not using libinput we get the seat information from the lower
level Wayland server: let's forward the information to our own
SeatInterface.
2015-03-17 10:20:19 +01:00
Martin Gräßlin
5b7b0f91c1 [wayland] Fix wayland cursor theme size
If our size is 0, we need to pass -1 to get the proper default size.
2015-03-17 10:20:19 +01:00
Martin Gräßlin
fafa22d0c6 [wayland] Invoke frame rendered callback on damaged windows
Introduces a new time counter on Compositor to indicate the elapsed
time sine the compositor started.
2015-03-17 10:20:19 +01:00