Commit graph

12 commits

Author SHA1 Message Date
Martin Gräßlin
8cb78b7df6 Use KWIN_DBUS_SERVICE_SUFFIX for multi-head service name wrangling
Adjust the KWIN_DBUS_SERVICE_SUFFIX env variable in a multi-head
scenario instead of adjusting the "org.kde.kwin" DBus service which
we actually don't use in 5.x any more.

REVIEW: 122217
2015-01-27 07:25:52 +01:00
Nick Shaforostoff
607b3f0bc9 small string optimizations 2015-01-24 02:13:45 +00:00
Martin Gräßlin
09e72ce451 [kwin_wayland] Fix printing out the X11 display
std::endl was missing.
2014-11-07 14:58:21 +01:00
Martin Gräßlin
819c12819b [kwin_wayland] Do not require --display argument for starting X server
If display is not set, it won't be passed to the X command to start and
X will just pick the next free display id.
2014-11-07 14:58:09 +01:00
Martin Gräßlin
e405f1ca07 Fix --x-server argument of kwin_wayland 2014-11-05 14:41:39 +01:00
Martin Gräßlin
15a1a5b70f Add command line option to enable libinput support
kwin_wayland gains a new command line option to enable libinput support.
This is needed as logind blanks the VT when the session controller
releases the control. So a nested compositor can seriously affect the
primary session. Thus it needs a dedicated command line switch to
enable it.

By default libinput support is disabled for kwin_x11 and can be enabled
for kwin_wayland in case KWin is compiled with libinput support.
2014-10-20 14:51:24 +02:00
Martin Gräßlin
6ddded0852 [kwin_wayland] Cleanup wayland_backend.[h|cpp]
Remove no longer needed includes, turn one time slot methods into
lambdas, etc.
2014-08-27 08:57:06 +02:00
Martin Gräßlin
3185530ed6 [kwin-wayland] Create dedicated thread for wayland connection
The Wayland event queue is moved into a dedicated thread and a
new class is created for just creating the connection and listening
for events. The WaylandBackend creates the thread and uses an event
queue for the main thread.

REVIEW: 119761
2014-08-18 08:51:24 +02:00
Martin Gräßlin
12c8facc34 [kwin-wayland] Add signal handler also to main_wayland
REVIEW: 119760
2014-08-18 08:50:44 +02:00
Martin Gräßlin
65c17d32cc [kwin_wayland] Add config option to start an X Server
KWin_Wayland still needs an X-Server. To simplify the development
setup the required X-Server can be started through a command line
argument together with KWin. Unfortunately the command line arguments
processing needs to be done by hand as QCommandLineParser only allows
processing after QApplication is created which requires the started
X Server.

The nested X-Server is started by forking the application and using
execlp to load the binary. In addition a pipe is created to allow the
X-Server to write the display number to once it's ready to connect and
by that KWin is ready to create the QApplication.
2014-08-18 08:50:44 +02:00
Martin Gräßlin
670973efdb Move creating WaylandBackend into ApplicationWayland
Early creation to ensure that we can abort if there is no Wayland
display to connect to.
2014-08-18 08:50:44 +02:00
Martin Gräßlin
f9a7b94ee7 Create dedicated kwin_x11 and kwin_wayland binaries
All of kwin except the main function goes into a new (private) library
called kwin. Two new kdeinit_executables are created:
* kwin_x11
* kwin_wayland

Both only use a dedicated main_x11.cpp and main_wayland.cpp with the
main function and a KWin::Application subclass and linking the new
kwin library.

The main idea behind this is to be able to perform more sane sanity
checks. E.g. on Wayland we don't need to first test whether we can
create an X11 connection. Instead we should abort if we cannot connect
to the Wayland display. Also the multi-head checks are not needed on
Wayland, etc. etc. As most of that code is in the main function to
simplify it's better to split.

This will also make it easier to diverge more easily in future. The
Wayland variant can introduce more suited command line arguments for
example. This already started by having the --replace option only
available in X11 variant. The Wayland backend is still a window manager,
but doesn't claim the manager selection.
2014-08-18 08:50:44 +02:00