[PATCH weston 3/6] Introduce libweston-desktop

Pekka Paalanen ppaalanen at gmail.com
Fri Aug 12 09:17:15 UTC 2016


On Fri, 12 Aug 2016 10:44:32 +0200
Quentin Glidic <sardemff7+wayland at sardemff7.net> wrote:

> On 12/08/2016 10:41, Quentin Glidic wrote:
> > From: Quentin Glidic <sardemff7+git at sardemff7.net>
> >
> > libweston-desktop is an abstraction library for compositors wanting to
> > support desktop-like shells.
> >
> > The API is designed from xdg_shell features, as it will eventually be
> > the recommended shell for modern applications to use.
> > In the future, adding new shell protocols support will be easier, as
> > limited to libweston-desktop.
> >
> > The library versioning is the same as libweston. If one of them break
> > ABI compatibility, the other will too.  
> 
> This may need an update of the release doc? I wanted libweston-desktop 
> to basically be tied to libweston, as if they were one library, to keep 
> things simple (only one set of variables in configure.ac).
> If you have any wording suggestion or comment about that, please tell.

Hi,

well, as you do not add any new variables to configure.ac then there is
no need to update releasing.txt, since there is nothing to change or
check by the release manager.

However, README might need some words on the relationship and
versioning of libweston-desktop vs. libweston. I also believe that
distributions will package the two libraries separately, so we should
explain their interdependencies in the README.

Personally I am fine with the two libraries using the same version
number. The catch is that people breaking libweston-desktop need to
know to bump the libweston major if it has not been bumped already.

Obviously people breaking libweston will need to bump libweston major
if not bumped already too, but I haven't written that down anywhere.

> > The compositor will only ever see toplevel surfaces (“windows”), with
> > all the other being internal implementation details.
> > Thus, popups and associated grabs are handled entirely in
> > libweston-desktop.
> > Xwayland special surfaces (override-redirect) are special-cased to a
> > dedicated layer, as the compositor should not know about them.
> >
> > All the shell error checking is taken care of too, as well as some
> > specification rules (e.g. sizes constraint for maximized and fullscreen
> > surfaces).
> >
> > All the compositor has to do is define a few callbacks in the interface
> > struct, and manage toplevel surfaces.
> >
> > Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
> > Reviewed-by: Jonas Ådahl <jadahl at gmail.com>
> > Acked-by: Giulio Camuffo <giulio.camuffo at kdab.com>
> >
> > Differential Revision: https://phabricator.freedesktop.org/D1207
> > ---
> >
> > Added a line for versioning and ABI compatibility, not sure about this
> > one.
> >
> >  Makefile.am                               |  31 +-
> >  configure.ac                              |   1 +
> >  libweston-desktop/client.c                | 212 ++++++++
> >  libweston-desktop/internal.h              | 236 +++++++++
> >  libweston-desktop/libweston-desktop.c     | 234 +++++++++
> >  libweston-desktop/libweston-desktop.h     | 166 ++++++
> >  libweston-desktop/libweston-desktop.pc.in |  12 +
> >  libweston-desktop/seat.c                  | 368 ++++++++++++++
> >  libweston-desktop/surface.c               | 818 ++++++++++++++++++++++++++++++
> >  libweston-desktop/wl-shell.c              | 464 +++++++++++++++++
> >  libweston-desktop/xdg-shell-v5.c          | 798 +++++++++++++++++++++++++++++
> >  libweston-desktop/xwayland.c              | 360 +++++++++++++
> >  libweston/compositor.c                    |  37 ++
> >  libweston/compositor.h                    |  16 +
> >  14 files changed, 3752 insertions(+), 1 deletion(-)
> >  create mode 100644 libweston-desktop/client.c
> >  create mode 100644 libweston-desktop/internal.h
> >  create mode 100644 libweston-desktop/libweston-desktop.c
> >  create mode 100644 libweston-desktop/libweston-desktop.h
> >  create mode 100644 libweston-desktop/libweston-desktop.pc.in
> >  create mode 100644 libweston-desktop/seat.c
> >  create mode 100644 libweston-desktop/surface.c
> >  create mode 100644 libweston-desktop/wl-shell.c
> >  create mode 100644 libweston-desktop/xdg-shell-v5.c
> >  create mode 100644 libweston-desktop/xwayland.c
> >
> > diff --git a/Makefile.am b/Makefile.am
> > index 32627f5..217d21f 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -105,6 +105,29 @@ libweston_ at LIBWESTON_MAJOR@_la_SOURCES =			\
> >  	shared/platform.h				\
> >  	libweston/weston-egl-ext.h
> >
> > +lib_LTLIBRARIES += libweston-desktop- at LIBWESTON_MAJOR@.la
> > +libweston_desktop_ at LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
> > +libweston_desktop_ at LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
> > +libweston_desktop_ at LIBWESTON_MAJOR@_la_LIBADD = libweston- at LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
> > +libweston_desktop_ at LIBWESTON_MAJOR@_la_LDFLAGS = -version-info $(LT_VERSION_INFO)
> > +
> > +libweston_desktop_ at LIBWESTON_MAJOR@_la_SOURCES =	\
> > +	libweston-desktop/client.c			\
> > +	libweston-desktop/internal.h			\
> > +	libweston-desktop/libweston-desktop.c		\
> > +	libweston-desktop/libweston-desktop.h		\
> > +	libweston-desktop/seat.c			\
> > +	libweston-desktop/surface.c			\
> > +	libweston-desktop/wl-shell.c			\
> > +	libweston-desktop/xdg-shell-v5.c		\
> > +	libweston-desktop/xwayland.c
> > +
> > +nodist_libweston_desktop_ at LIBWESTON_MAJOR@_la_SOURCES =		\
> > +	protocol/xdg-shell-unstable-v5-protocol.c		\
> > +	protocol/xdg-shell-unstable-v5-server-protocol.h
> > +
> > +libweston-desktop- at LIBWESTON_MAJOR@.la libweston-desktop/libweston_desktop_ at LIBWESTON_MAJOR@_la-xdg-shell-v5.lo: protocol/xdg-shell-unstable-v5-server-protocol.h
> > +
> >  if SYSTEMD_NOTIFY_SUPPORT
> >  module_LTLIBRARIES += systemd-notify.la
> >  systemd_notify_la_LDFLAGS = -module -avoid-version
> > @@ -230,7 +253,10 @@ endif
> >  endif # BUILD_WESTON_LAUNCH
> >
> >  pkgconfigdir = $(libdir)/pkgconfig
> > -pkgconfig_DATA = compositor/weston.pc libweston/libweston-${LIBWESTON_MAJOR}.pc
> > +pkgconfig_DATA = \
> > +	libweston/libweston-${LIBWESTON_MAJOR}.pc \
> > +	libweston-desktop/libweston-desktop-${LIBWESTON_MAJOR}.pc \
> > +	compositor/weston.pc
> >
> >  wayland_sessiondir = $(datadir)/wayland-sessions
> >  dist_wayland_session_DATA = compositor/weston.desktop
> > @@ -251,6 +277,9 @@ libwestoninclude_HEADERS =			\
> >  	shared/config-parser.h			\
> >  	shared/zalloc.h
> >
> > +libwestoninclude_HEADERS +=			\
> > +	libweston-desktop/libweston-desktop.h
> > +
> >  westonincludedir = $(includedir)/weston
> >  westoninclude_HEADERS = compositor/weston.h
> >
> > diff --git a/configure.ac b/configure.ac
> > index 0090d71..b45d0e2 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -646,6 +646,7 @@ AC_CONFIG_FILES([Makefile libweston/version.h compositor/weston.pc])
> >  # AC_CONFIG_FILES needs the full name when running autoconf, so we need to use
> >  # libweston_abi_version here, and outside [] because of m4 quoting rules
> >  AC_CONFIG_FILES([libweston/libweston-]libweston_major_version[.pc:libweston/libweston.pc.in])
> > +AC_CONFIG_FILES([libweston-desktop/libweston-desktop-]libweston_major_version[.pc:libweston-desktop/libweston-desktop.pc.in])
> >
> >  AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD])
> >

> > diff --git a/libweston-desktop/libweston-desktop.pc.in b/libweston-desktop/libweston-desktop.pc.in
> > new file mode 100644
> > index 0000000..c118b08
> > --- /dev/null
> > +++ b/libweston-desktop/libweston-desktop.pc.in
> > @@ -0,0 +1,12 @@
> > +prefix=@prefix@
> > +exec_prefix=@exec_prefix@
> > +libdir=@libdir@
> > +includedir=@includedir@
> > +pkgincludedir=${includedir}/libweston- at LIBWESTON_ABI_VERSION@
> > +
> > +Name: libweston-desktop
> > +Description: Desktop shells abstraction library for libweston compositors
> > +Version: @WESTON_VERSION@
> > +Requires.private: libweston- at LIBWESTON_ABI_VERSION@ wayland-server
> > +Cflags: -I${pkgincludedir}
> > +Libs: -L${libdir} -lweston-desktop- at LIBWESTON_ABI_VERSION@


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160812/2fe6796c/attachment.sig>


More information about the wayland-devel mailing list