Add a screen sharing plugin

This adds a plugin called screen-share.so.  If the screen-share.so module
is imported, it will add the CTRL+ALT+s keybinding to start a screen
sharing session.  If you press CTRL+ALT+S, weston will spawn another copy
of weston, this time with the RDP backend, and mirrors the current screen
to it and adds any seats from RDP as aditional seats.  The current screen
is defined as the one with the mouse pointer.  Currently the CTRL+ALT+s
keybinding is hardcoded as the only way to activate screen sharing.  If, at
some point, shells want more control over the screen sharing process, the
API's should be easy to update and export to make this possible.

For security, the command and path to weston is currently hard-coded.  It
would not take much aditional code to make this configurable or to allow a
shell to launch other screen-sharing programs.  However, handling those
security issues is outside the scope of this patch so it is hard-coded for
now.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
dev
Jason Ekstrand 11 years ago committed by Kristian Høgsberg
parent f34cd2c676
commit 47928d8715
  1. 22
      Makefile.am
  2. 13
      configure.ac
  3. 1082
      src/screen-share.c

@ -700,6 +700,28 @@ nodist_fullscreen_shell_la_SOURCES = \
BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
endif
if ENABLE_SCREEN_SHARING
module_LTLIBRARIES += screen-share.la
screen_share_la_CPPFLAGS = $(AM_CPPFLAGS) -DBINDIR='"$(bindir)"'
screen_share_la_LDFLAGS = -module -avoid-version
screen_share_la_LIBADD = \
$(COMPOSITOR_LIBS) \
$(SCREEN_SHARE_LIBS) \
libshared-cairo.la
screen_share_la_CFLAGS = \
$(COMPOSITOR_CFLAGS) \
$(SCREEN_SHARE_CFLAGS) \
$(GCC_CFLAGS)
screen_share_la_SOURCES = \
src/screen-share.c
nodist_screen_share_la_SOURCES = \
protocol/fullscreen-shell-protocol.c \
protocol/fullscreen-shell-client-protocol.h
endif
if ENABLE_XWAYLAND
module_LTLIBRARIES += xwayland.la

@ -222,6 +222,18 @@ if test x$enable_rdp_compositor = xyes; then
CPPFLAGS="$SAVED_CPPFLAGS"
fi
AC_ARG_ENABLE([screen-sharing], [--enable-screen-sharing],,
enable_screen_sharing=no)
AM_CONDITIONAL([ENABLE_SCREEN_SHARING],
[test x$enable_screen_sharing = xyes])
if test x$enable_screen_sharing = xyes; then
PKG_CHECK_MODULES(SCREEN_SHARE, [wayland-client])
if test x$enable_rdp_compositor != xyes; then
AC_MSG_WARN([The screen-share.so module requires the RDP backend.])
fi
fi
AC_ARG_WITH(cairo,
AS_HELP_STRING([--with-cairo=@<:@image|gl|glesv2@:>@]
[Which Cairo renderer to use for the clients]),
@ -523,6 +535,7 @@ AC_MSG_RESULT([
RPI Compositor ${enable_rpi_compositor}
FBDEV Compositor ${enable_fbdev_compositor}
RDP Compositor ${enable_rdp_compositor}
Screen Sharing ${enable_screen_sharing}
libinput Backend ${enable_libinput_backend}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save