Commit graph

5300 commits

Author SHA1 Message Date
Bryce Harrington f89cd51e0c releasing: Update release docs in regards to the wayland versioned dependency 2016-05-24 12:34:44 -07:00
Bryce Harrington 46f1f0516c build: Define wayland prereq version
Establishes a single variable for defining the libwayland version
requirements, where we have versioned checks.  Enforces the same version
dependency between libwayland-client and libwayland-server.  Developers
typically only test the greater version of the two, so if they're
different it masks cases that don't get tested adequately.  So this sets
wayland-client's required version to 1.10, same as for the server.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Tested-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-05-24 11:08:21 -07:00
Emmanuel Gil Peyrot 28834b6472 desktop-shell: Don’t reconfigure an already fullscreen surface
When we receive an wl_shell_surface::set_fullscreen request for a
surface that was already fullscreen, don’t do anything if the
parameters are the same as the initial request.

This prevents bogus or malicious clients from being able to always stay
on front by flooding the compositor with set_fullscreen requests after
the user has put them in the background with a mod+tab.

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-19 17:52:46 -07:00
Bryce Harrington e6da35d067 ivi: Fix spellings in comments 2016-05-19 17:35:02 -07:00
Emmanuel Gil Peyrot 1764d22f91 zunitc: use platform-independent macros for integer formatting
Fixes warnings and potential issues on 32-bit platforms, tested only on
ARM but I’d expect the same issue on i686.

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-19 17:15:56 -07:00
FORT David 8a120690a1 compositor: use generated constant instead of hardcoded value
Use SINCE macros instead of the hardcoded version value.

Signed-off-by: David Fort <contact@hardening-consulting.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-19 16:57:16 -07:00
FORT David 2d4aa83fe1 rdp: Fix the ContextNew callback with recent FreeRDP versions
Since a quite long time FreeRDP expect the ContextNew callback to return TRUE
when it succeeds. Without this we have some arbitrary failures (most probably
when eax is 0 at the end of the function).

Signed-off-by: David Fort <contact@hardening-consulting.com>
2016-05-19 16:19:08 -07:00
FORT David 58b63ab7f1 rdp: allow to compile against FreeRDP 2.0
FreeRDP 2.0 is about to be released, this allows to compile against this version.
The detection is adjusted to prefer FreeRDP 2 against version 1.x.

Signed-off-by: David Fort <contact@hardening-consulting.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-19 14:48:17 -07:00
Bryce Harrington 0887956e4d configure.ac: bump to version 1.10.92 for the beta release 2016-05-17 22:10:30 -07:00
Emmanuel Gil Peyrot b8347e3a45 compositor-drm: Prevent a crash in the pixman renderer
When pixman is used and no connector could be found (or any other
error), drm_backend_create() tried to destroy a gbm_device that would
only be created in init_egl(), resulting in a segfault.

Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-17 17:57:40 +03:00
Emmanuel Gil Peyrot a62138bf90 compositor-drm: Write a name in the mode generated from a modeline
The current behaviour leaves the name empty, making it somewhat harder
to determine the characteristics of this mode from a debugger.

Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
[Pekka: wrap long line (ybakos)]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-17 17:57:29 +03:00
Emmanuel Gil Peyrot 373c1084cb compositor-drm: Remove unused output reference in drm_fb
Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-17 17:03:23 +03:00
Pekka Paalanen 130ae6e7d6 compositor: surface and view output comment fixes
weston_surface::output and weston_view::output as used for different
purposes. Only the surface output is used for frame callbacks.

The uses of the view output are much more vague and hard to describe.

Also fix a comment mistake in weston_surface_assign_output().

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
[Pekka: more verbose on the compositor.h comments]
2016-05-17 13:39:16 +03:00
Pekka Paalanen 20c7e55943 compositor: fix comments about weston_compositor::surface_list
a7af70436b converted the surface list into
a view list. There is no weston_compositor::surface_list anymore.

It looks like weston_surface::output's comment about surface list does
not apply to view list. Still, many places assume weston_surface::output
is not NULL when processing "visible" surfaces, e.g. those reachable via
the view list.

The comment on weston_view::output is updated. It seems there is no
longer any requirement for it to be NULL if the view is not in
view_list.

weston_view::link is documented to be in weston_compositor::view_list,
and weston_compositor::view_list is documented to contain weston_views.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
[Pekka: removed also the other "Must be NULL" comment.]
2016-05-17 13:31:33 +03:00
Pekka Paalanen 901ac32d9a eventdemo: use %u for uint32_t printing
I was confused why timestamp was printed negative. This fixes it, and
others while at it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net>
2016-05-16 15:01:45 +03:00
Pekka Paalanen 0baffb0fd3 eventdemo: do not print axis events if not requested
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net>
Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
2016-05-13 11:18:10 +03:00
Pekka Paalanen 10e92db1d3 eventdemo: use zalloc
Zero-initialize the struct, just in case.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net>
Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
2016-05-13 11:18:10 +03:00
Pekka Paalanen 43864990a2 eventdemo: do not print pointer frames alone
Print pointer frames only if any pointer related events are printed
first.

This avoids flooding the output with "pointer frame" just because of
motion. You can test this with e.g.
  $ ./weston-eventdemo --log-button

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net>
Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
2016-05-13 11:17:39 +03:00
Bryce Harrington 6bc52540c0 data: Some client icons
This adds an alternate weston terminal icon and icons for the flower and
editor clients.  The original Inkscape SVG file is included.

Example screenshot:
  http://www.bryceharrington.org/Files/weston-icons.png

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-05-12 17:54:53 -07:00
Pekka Paalanen edcb312abb ivi-layout: clarify get_layers_under_surface doc
This is derived from the implementation. I was not sure whether "under"
referred to object relationships or region intersections.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
2016-05-12 11:49:03 +03:00
Pekka Paalanen 6a20950ea2 ivi-shell-user-interface: ignore all but first seat
This client should support binding to multiple seats, but as it does
not, make a quick and dirty fix to ignore all seats beyond the first
one.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
2016-05-12 11:49:03 +03:00
Benoit Gschwind 5375384545 main: let load_wayland_backend() clean up on error
weston_wayland_backend_config_release() does not bother reinitializing
the structure, it simply frees what is there. This leads to a structure
containing garbage, which might be a surprise.

Require, that if load_wayland_backend_config() fails, the caller must
call weston_wayland_backend_config_release() regardless.

Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
[Pekka: rewrote commit message]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-11 13:43:52 +03:00
Benoit Gschwind 44e302b77d main: rename new_config arg of weston_wayland_backend_config_add_new_output
Rename new_config to config to follow legacy naming scheme.

Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-11 13:43:36 +03:00
Benoit Gschwind e48ab5f51b main: rename new_config arg of weston_wayland_backend_config_release
Rename new_config to config to follow legacy naming scheme.

Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-11 13:43:19 +03:00
Benoit Gschwind 68d6a6c4e7 main: rename wayland_backend_config_release function
Rename the wayland_backend_config_release function to
weston_wayland_backend_config_release to follow legacy naming scheme.

Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
[Pekka: rebased]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-11 13:43:06 +03:00
Benoit Gschwind 390af6d7ee main: rename wayland_backend_config_add_new_output function
Rename wayland_backend_config_add_new_output to
weston_wayland_backend_config_add_new_output to follow the legacy naming
scheme.

Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
[Pekka: rebased]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-11 13:42:50 +03:00
Benoit Gschwind 55a2288e40 main: replace and remove new_config in load_wayland_backend_config
Remove the unseless intermediate variable new_config in the function
load_wayland_backend_config, replacing it by the renamed parameter
'config'.

Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
[Pekka: Squashed in "compositor-wayland: rename out_config arg of load_wayland_backend_config".]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-11 13:42:39 +03:00
Benoit Gschwind 6c1cd2fd05 main: rename load_wayland_backend_config arg "config" to wc
Rename the load_wayland_backend_config arg "config" to use this name for
another variable in the following patch. It also follow the legacy
naming scheme.

Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-11 13:41:55 +03:00
Benoit Gschwind 3ff10da571 compositor-wayland: move configuration parsing to weston main.c
Move function load_wayland_backend_config,
wayland_backend_config_add_new_output, wayland_backend_config_release,
weston_wayland_output_config_init from compositor-wayland.c to main.c.
Not a single character is changed in those functions.

Create a glue function load_wayland_backend to use moved functions and
following the new load_*_backend style.

Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Acked-by: Quentin Glidic <sardemff7+git@sardemff7.net>
[Pekka: removed left-over entry from load_backend().]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-11 12:26:50 +03:00
Benoit Gschwind e091b45b60 compositor-wayland: add versionning to config structure
The patch use temporary code that prepare the patch:
"compositor-wayland: move configuration parsing to weston main.c"

Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-05-11 12:26:08 +03:00
Benoit Gschwind 5dfce19c89 compositor-wayland: rename misleading output arg of weston_wayland_output_config_init
Rename the misleading output argument to output_config in the
weston_wayland_output_config_init function.

Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-05-11 12:26:00 +03:00
Benoit Gschwind 37c6a1f275 compositor-wayland: rename wayland_output_init_from_config
Rename wayland_output_init_from_config to weston_wayland_output_config_init
to prepare the following patch :
"compositor-wayland: move configuration parsing to weston"

Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
[Pekka: drop a useless comment]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-11 12:25:51 +03:00
Benoit Gschwind 676841d617 compositor-wayland: fix spacing and lines wraping
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
[Pekka: squashed with "compositor-wayland: fix too long lines".]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-05-11 12:24:57 +03:00
Giulio Camuffo 1c0e40d9a2 drm: port the drm backend to the new init api
Preparing for libweston and for the separation of the code base into
libweston vs. weston the compositor, we must remove all uses
weston_config structures from the backends. We have decided that all
option and config input happens in the compositor (main.c), and
configuration is passed in for the backends as structs.

Most other backends have already converted, and this patch converts the
DRM-backend to the libweston-style init API.

The libweston-style init API includes a header for each backend (here
compositor-drm.h) defining the configuration interface. The compositor
(main.c) prepares a configuration struct to be passed through libweston
core to the backend during initialization.

A complication with the DRM-backend is that outputs can be hotplugged,
and their configuration needs to be fetched from the compositor
(main.c). For this, the config struct contains a callback member. The
output configuration API is subject to change later, this is just a
temporary API to get libweston forward.

As weston_compositor's user_data was not previously used for anything,
and the output configuration callback needs data, the user_data is set
to the 'config' pointer. This pointer is only used in
drm_configure_output() in main.c.

[Bryce: lots of stuff and rebasing]
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
[Pekka: write commit message]
[Pekka: squash in "drm: Don't hang onto the backend config object
post-backend_init" from Bryce Harrington]
[Pekka: drop the compositor.h hunk]
[Pekka: do not #include inside extern "C"]
[Pekka: remove incorrect comment about weston_drm_backend_config
ownership.]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-10 15:23:03 +03:00
Pekka Paalanen 59987fa172 compositor: refactor into convert_size_by_transform_scale()
There were two copies of code applying transform and scale to size.
Refactor the code to use just one copy in a new function.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-06 14:38:09 +03:00
Pekka Paalanen 04baea58fe compositor: constify weston_surface_build_buffer_matrix()
Makes it easier to see that it does not change weston_surface state
implicitly.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-06 14:35:28 +03:00
Bryce Harrington 2f783018ff releasing: Correct documentation for script name
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-04 14:58:50 -07:00
Benoit Gschwind 639322a447 compositor-wayland: put configuration structure in separate header
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
[Pekka: moved #include out of extern "C".]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-04 15:40:56 +03:00
Benoit Gschwind cd63b3ea51 compositor-wayland: split backend_init
Extract configuration parsing from init_backend function. The new
init_backend start by generating the configuration structure from
configuration file with separated function and then use this structure
to load the backend.

Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
[Pekka: rebased]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-04 15:40:56 +03:00
Benoit Gschwind 830b7882f1 compositor-wayland: split wayland_output_create_for_config
The splitting intend to separate configuration parsing from output
setup.

Introduces struct weston_wayland_backend_output_config.

Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
[Pekka: squashed "wayland-backend: define output configuration
structure" into this.]
[Pekka: fix fullscreen output scale back to 1.]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-04 15:40:56 +03:00
Benoit Gschwind 244ff799fb compositor-wayland: move config parsing in create_cursor
Move configuration parsing from create_cursor to backend_init. Use newer
configuration structure to initialize the cursor in create_cursor.

Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-04 15:40:56 +03:00
Benoit Gschwind 3a49b51f8e compositor-wayland: use new config struture to create backend
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-04 15:40:56 +03:00
Benoit Gschwind 079b626919 compositor-wayland: fix memory leak of display_name
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-04 15:40:56 +03:00
Benoit Gschwind 37a6807905 compositor-wayland: create a basic config structure to use in new init API
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-04 15:40:56 +03:00
Daniel Stone d62004efca libinput: Remove unused static values
default_seat and default_seat_name are not used anywhere in this file.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-05-04 17:16:39 +08:00
Quentin Glidic 63225cf252 weston.pc: Properly specify Requires.private
We include wayland-server.h, pixman.h and xkbcommon.h in compositor.h,
but they are not required for linking if the plugin doesn’t use them.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Daniel Stone <daniels@collabora.com>
2016-05-04 10:14:11 +01:00
Bryce Harrington 870b16466f configure.ac: bump to version 1.10.91 for the alpha release 2016-05-03 18:35:32 -07:00
Quentin Glidic 5c20195e7a compositor.h: Add shell_interface.get_output_work_area
This will allow plugins to be aware of e.g. panels, to avoid covering
them with other surfaces.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-03 15:45:24 +03:00
Bryce Harrington aa258985e9 x11: Fix incorrect output counting logic
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-03 01:34:23 -07:00
Benoit Gschwind e16acabf7a x11: port the x11 backend to the new init api
Use a "well" defined structure to configure x11-backend and move configuration
file parsing inside the weston compositor code.

Enforce destruction of all backend config objects after initialization.
Since the backend config struct versioning implies that there we expect
potential future descrepancy between main's definition of the config
object and the backend's, don't allow the backend to hang onto the
config object outside the initialization scope.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net>
Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
2016-05-03 01:24:28 -07:00