Instead of hardcoding drm-backend.so as the default if environment
presents neither Wayland nor X11, have a ./configure option to change
it. It still defaults to drm-backend.so, if not given.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Add a headless backend and a noop renderer, mainly for testing
purposes. Although no rendering is performed with this backend,
this allow some of the code paths inside Weston and shm clients
to be tested without any windowing system or any need for drm
access.
If clients don't set a cursor, they get whatever the last cursor was
before the pointer entered their window. That's a little confusing, so
set a pointer on enter to avoid that. The down-side is that simple EGL
isn't very simple anymore.
https://bugs.freedesktop.org/show_bug.cgi?id=52452
Do not build the tablet-shell client if --disable-tablet-shell is given.
Change --enable-tablet-shell to --disable-tablet-shell in ./configure
--help output, since it is enabled by default. Add a description.
Use proper quoting in the conditional.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Separate simple EGL clients from other simple clients. This allows to
build either simple-shm or simple-egl, whichever you want. We avoid
linking libEGL and GLESv2 into simple-shm, and we can build simple-shm
even if nothing provides EGL, GLESv2, or wayland-egl APIs.
Change the options in configure --help from --enable to --disable, since
these are enabled by default, and you would normally only ever give the
--disable flavor. Add descriptions.
Remove the #define BUILD_SIMPLE_CLIENTS since it is not used.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
configure.ac: The toytoolkit clients used to get libEGL linked to them
even if there was no cairo-egl. This is useless, and actually harmful on
platforms, where libEGL absolutely requires one of the GL ES libraries
to be linked in, too.
Look for EGL-related packages only for cairo-egl with toytoolkit.
window.c: protect all GL header includes with HAVE_CAIRO_EGL, since that
is the only case we can support EGL, GL, or GLESv2 at all. In the case
we do not have cairo-egl, add enough definitions to let us build the
stubs for EGL-related functions.
Remove some #ifdefs that were inside of the same #ifdef already.
These changes allow to build sorfware rendering toytoolkit clients
without any bits of EGL libs or headers.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Otherwise the user has no indication which package is missing for
CAIRO_EGL, and has to dig into config.log for it.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Modify the pkg-config check for setbacklight so that failure only
disables building setbacklight, instead of failing the whole configure.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This backend has not seen even build testing for months, presumably does
not even compile, and is starting to hinder development a little.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Benjamin Franzke <benjaminfranzke@googlemail.com>
This fix xwayland.so that was complaining about jpeg symbols from the
libshared.
Note that xwayland is not using the jpeg ones, but now that symbols are read
up front we need to link anyway.. or break apart that library.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
We don't support this anymore. weston requires a setuid helper (such as
weston-launch) to run under kms, and should never run as root itself.
Disabe the setuid warning in configure.ac since we now only install the
minimal weston-launch as setuid.
We had duplicated code in many places, using hardcoded paths for
temporary files into more than one path. Some cases did not bother with
O_CLOEXEC, and all hardcoded paths that might not exist.
Add an OS helper function for creating a unique anonymous file with
close-on-exec semantics. The helper uses $XDG_RUNTIME_DIR as the
directory for a file.
This patch unifies the buffer file creation in both Weston and the
clients.
As simple clients are better not linking to libshared, as it would
require e.g. Cairo, they pull the OS compatibility code directly.
Android does not have mkostemp(), so a configure test is added for it,
and a fallback used if it is not available.
Changes in v2:
remove all the alternate possible directory definitions and use
XDG_RUNTIME_DIR only, and fail is it is not set.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
The patch "compositor-android: fix build flags" started using GCC_CFLAGS
for C++ files, too. That lead to the following warnings when building a
C++ file:
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
cc1plus: warning: command line option "-Wmissing-prototypes" is valid
for Ada/C/ObjC but not for C++
Introduce GCC_CXXFLAGS, similar to GCC_CFLAGS, but for C++, avoiding the
problematic compiler flags.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
The Android backend provides basic EGL/GLES2 graphics, where everything
is always composited. Overlays are not used. Input is stubbed, therefore
there is no input yet.
This adds the first C++ source file into Weston compositor. The Android
gralloc and fb HAL glue code to the Android EGL library is in C++, and
there is no way to access it from plain C. We have a simple wrapper to
the required C++ class API. Android forces the C++ file name extension
to .cpp.
The android backend is compiled by default. However, all Android
specific calls are protected with #ifdef ANDROID, so it will build also
without Android headers. The binary produced without the Android build
system is useless, but allows build-testing generic Weston changes.
Therefore the android backend is not installed.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Some systems may not have execinfo.h. Add a configure test for it, and
if it is not found, make the backtrace() call a no-operation.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
There are no dependencies or requirements there that we don't already
need for weston itself. So lets just always build them.
Use check_PROGRAMS for the matrix unit test case.
weston-launch starts weston and provides mechanism
for weston to set/drop drm master, open a tty,
and read input devices without being root.
Execution is allowed for local-active sessions
or users in the group weston-launch.
mtdev library translates all multitouch based devices to the slotted evdev
protocol. It provides an uniform interface for Weston, which eases mt
implementation when dealing with a big variety of devices.
Weston on drm now directly depends on such library.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
libbacklight is 300 lines of code in one .c file, and we're relying on
udev changes that aren't yet upstream. For now, let's just keep a
copy in weston and if the Xorg DDX drivers start using libbacklight and
it becomes more widely available, we'll make it an external dependency.
DPMS kicks in only when wscreensaver is launched, in the moment that shell
call lock() for the second time. Backlight control internals are managed by
libbacklight:
http://cgit.freedesktop.org/~vignatti/libbacklight/
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>