Use the fullscreen-shell protocol XML from the wayland-protocols
installation, and remove the one we provide ourself.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Also rename focus to has_focus to be slightly less confusing.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
mmap() function expects to be passed a void pointer as the address
here. Passing NULL is technically more correct than passing 0.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
commit e76f185 stopped using visuals with "native visual id" == 0
This broke some systems, so we now try 0 as a worst case fallback if
everything else has failed.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Don't only send motions and buttons but also axis events through the
pointer grab interface.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
When trying to do sceen recording using the screenshooter, no screen data
was ever processed because the rpi-renderer never set the previous frames
damage area.
Update the rpi-renderer to copy the necessary data.
Signed-off-by: Shinya Saito <ssaito@igel.co.jp>
Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Add new configuration argument to the backend_init() function, which
will replace the current argc, argv, and config arguments.
After each backend is converted individually the unused parameters
will be removed.
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit introduces the structs weston_backend_config and
weston_backend_output_config, to prepare for the new config
system for the backends.
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
vt_source is never added to an event loop in this launcher, but
it's potentially removed.
Let's just remove the variable entirely.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
CLOCK_BOOTTIME is a relatively new* feature that may not actually be
present everywhere (I'm looking at you wheezy). Since our use of it
is actually only cosmetic, I've just ifdef'd if.
* No it isn't.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
In commit 70d337dfd we changed one cursor size test from a hard coded 64,64
to the actual device provided width, height.
The test in drm_assign_planes remained fixed at 64, 64.
The simple-shm test ended up being small enough to fit into a cursor plane
by one test, but too large by the test in drm_assign_planes. We'd assign
to the cursor plane but not keep a reference.
weston-simple-shm would disappear and be replaced with the previous
cursor image.
This partially "fixes" T3361.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
The screenshooter encoder wrote the output from either top-to-bottom or
bottom-to-top, depending on the Y-flip setting, but wcap-decode only
decodes from bottom-to-top. Make the encoder always output from
bottom-to-top, to match the decoder, and flip the input (source)
according to the Y-flip setting.
Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
We're going to need this on device removal in the future, so pull it out
into a separate function now.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
When new client registers touch listener, it was added to focus resource list.
At this point if another client "without" touch listener is in focus then
subsequent touch events are sent to new client with another client's resources
causing new client to stop rendering.
Now new client is added to resource list by default and it'll be added to focus
resource list only if its in focus.
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Free move before return if animation is null.
Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Calling weston_compositor_destroy() on a pointer returned by
weston_compositor_create() should be always valid, even if the
compositor does not have yet a backend.
Signed-off-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Systemd notifications support was converted into loadable
module, so systemd-notify.h header is not needed.
Signed-off-by: Egor Starkov <egor.starkov@ge.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
[Pekka: manually applied]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This mirrors what 5ffb440c3f did for
compositor-x11, and allows testing without having to restart the
compositor-drm everytime.
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Add systemd status and watchdog notification support.
Feature is not compiled by default and can be enabled by
"--enable-systemd-notify" configuration flag. It compiles
into module "systemd-notify.so" and can be loaded by
adding it in weston.ini like any other module, i.e.
"modules=systemd-notify.so". Watchdog timeout equals to
half of timeout defined by "WATCHDOG_USEC" environment
variable, which is set by "WatchdogSec=" setting in
service file.
Signed-off-by: Egor Starkov <egor.starkov@ge.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
We really don't want to deal with sighups and pids. It's far easier
to just deal with the client destroyed signal to respawn the input method.
Inspiration taken from Pekka's commit 826dc14ec4
This fixes a potential crash on shutdown. If the input method client
pointer is still set (sighup handler hasn't run) but the client is
already destroyed, a call to text_backend_destroy() will try to destroy
the client a second time resulting in a segfault.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
The binding is only used for preventing launch, and we've already got the
pid for that.
With multiple seats there are multiple bindings, so if the most recent
binding unbinds it will clear the pointer, so using it like this is risky
anyway.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Previously we tried to launch the input method every time a seat was
created, and the launch function would notice it was running and not
bother to actually launch.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
In the launcher split up patch WESTON_LAUNCHER_SOCK was accidentally
changed to WESTON_LAUNCH_SOCK
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
weston_compositor_create() should just create idle timer but not arm it,
because idle-time setting is not ready at this point.
Remove idle timer first update in weston_compositor_create() since
idle_time variable is not set at this point. Idle timer is armed
properly later in weston_compositor_wake().
Signed-off-by: Egor Starkov <egor.starkov@ge.com>
[Pekka: tweaked commit message]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
In the time since this code was written, logind has gained new APIs to
handle VT switching automatically and activate sessions. Switch to that.
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
We now have a launcher interface and distinct implementations for
logind, weston-launch, and direct DRM, each in their own files.
This helps up clean up the spaghetti code into something that's
hopefully a bit more understood. There should be no functional
changes here.
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
update: Dropped redundant free() in weston_launcher_destroy()
strncpy only adds null terminating bytes if the source string is smaller
than the destination string. Since this function relies on the string
being null terminated when checking its contents, we better make sure
there is at least a \0 as the last character.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Result of 'calloc' is converted to a pointer of type 'unsigned int', which is
incompatible with sizeof operand type 'int'
Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
When running with the RPi backend, Weston now segfaults at startup on the
line:
flippipe->clk_id = output->base.compositor->presentation_clock;
in `rpi_flippipe_init()`.
This is because `output->base.compositor` is NULL. This problem did not
exist on 1.8.0, and it looks like it may have been introduced by 954f183e2f.
This commit ensures that the `compositor` is initialised in `rpi_backend`
and that flippipe init uses the compositor pointer from backend.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91885
Signed-off-by: John Sadler <deathofathousandpapercuts@gmail.com>
Changes in v2:
- fix summary to not break the build
- use output->backend->compositor in rpi_flippipe_init() instead of
output->base.compositor. The latter is set by weston_output_init()
which gets called later than rpi_flippipe_init().
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: John Sadler <deathofathousandpapercuts@gmail.com>
Really not sure why this was even here - it worked because
we were dividing by 1.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This reverts commit 6858383d51.
The main reason for the original patch was a regression on the Intel
drivers causing compositor framerate to drop to half during cursor
updates or motion. The Intel problem was fixed in
2e7f43c41c
The fix is included in Linux 4.1-rc6 and 4.0.5.
The comment in the original patch is still true, but arguably the
possible minor glitches with cursor updates are less bad than not using
cursor planes at all.
Cc: nerdopolis <bluescreen_avenger@verizon.net>
Cc: Daniel Stone <daniel@fooishbar.org>
Cc: Giulio Camuffo <giuliocamuffo@gmail.com>
Cc: David FORT <contact@hardening-consulting.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
When running with the RPi backend, Weston sefaults during shutdown. This is
due to the fact that `compositor->backend` is never initialised, and there
is no NULL check prior to calling `destroy()`.
This commit fixes the issue by making `rpi_backend_create()` intialise
`compositor->backend` - just like the X11 backend does.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91886
Signed-off-by: John Sadler <deathofathousandpapercuts@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit works-around a serious issue when running with the RPi backend.
When an EGL client shuts down and destroys it's EGL window, Weston dies with
a segmentation fault in the above function (because `buffer` is now NULL).
The addition of a simple NULL check avoids the problem.
This is a minor re-formatting of the patch already submitted here:
http://patchwork.freedesktop.org/patch/34885
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85167
Signed-off-by: John Sadler <deathofathousandpapercuts@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Bumping libdrm requirement by 3 years just for output connector name
constants was a bit much. Fix the problem introduced in
89c49b3060 by conditionally using the new
additions.
Both VIRTUAL and DSI came in the same libdrm commit
566c3ce877a4be72697e15cdfc421ce965f7c37d, so we check only for DSI.
This patch also reverts faee330c5e.
Reported-by: Eugen Friedrich <friedrix@gmail.com>
Cc: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
Clean up display connection via eglTerminate() in case of EGL
initialisation error.
Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>