Commit Graph

6 Commits

Author SHA1 Message Date
Jonathan Marler
5ba5a86a7f launcher: remove unused enum value
Signed-off-by: Jonathan Marler <johnnymarler@gmail.com>
2021-05-15 15:40:24 +00:00
Jonathan Marler
f153c49430 launcher: fix socket message race condition
fixes issue #484 (race condition with message to/from weston launch)

The race condition occurs after weston sends the WESTON_LAUNCHER_OPEN
message to weston-launch.  The race is between when weston-launch replies
with the fd handle versus weston-launch sending an activation message.  If
weston-launch sends an activation message before sending the fd handle,
then weston will be in an invalid state.

To fix this, I modified the fd handle reply that weston-launch sends to
include a message id at the beginning, which I called
WESTON_LAUNCHER_OPEN_REPLY.  Along with this, weston now inspects the
first part of any reply to determine whether it is an activation message
or a reply to the OPEN message.  In the newly handled case that it's an
activation message, it tracks whether the latest result is a deactivate
message and stores it in a flag to be handled once the open function has
completed.

Signed-off-by: Jonathan Marler <johnnymarler@gmail.com>
2021-04-10 22:29:30 +00:00
Stefan Agner
da0cd688d6 launcher-weston-launch: avoid race condition when switching VT merge
When using weston-launch launcher deactivating the VT is sometimes
racy and leads to Weston still being displayed. The launcher-direct.c
backend makes sure that the session signal is emitted first, then DRM
master is dropped and finally the VT switch is acknowledged via
VT_RELDISP.

However, in the weston-launch case the session signal is emitted via
a socket message to the weston process, which might get handled a bit
later. This leads to dropping DRM master and acknowledging the VT
switch prematurely.

Add a socket message which allows weston to notify weston-launch that
the signal has been emitted and deactivating can be proceeded.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2020-01-30 12:11:37 +00:00
Guillaume Champagne
b4bd12b738 launcher: move weston_environment_get_fd
weston_environment_get_fd was declared in weston-launch and implemented
in compositor.c. Since the function is not used elsewhere in the code,
it is replaced by a static function in launcher-weston-launch.c

Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
2020-01-29 09:49:41 +00:00
Marius Vlad
4d79283248 libweston: Migrate weston_environment_get_fd() to weston-launch header
This is private so it doesn't belong to public libweston API header.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2019-07-18 06:43:38 +00:00
Pekka Paalanen
b5e3ea218b Rename src/ to libweston/
This clarifies what is supposed to be the libweston code.

v2: screen-share.c is already in compositor/ instead.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Tested-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
Acked-by: Benoit Gschwind <gschwind@gnu-log.net>
[Pekka: rebased]
2016-06-23 17:44:54 +03:00