Commit Graph

5165 Commits

Author SHA1 Message Date
Giulio Camuffo
43008c7620 main: stub the functions to load the backends with the new config system
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-23 15:23:40 -07:00
Giulio Camuffo
93daabbc71 compositor: pass the backend config struct to the backends init function
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>
2015-10-23 15:23:37 -07:00
Giulio Camuffo
e3c0d8af43 compositor: introduce structs to handle backends configuration
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>
2015-10-23 15:23:32 -07:00
Jon Cruz
ecf819b82e zunitc: made name of test fixture parameter explicit.
Instead of using the implicit name 'data', changed the test
with fixture macro ZUC_TEST_F() to use an additional value
to explicitly set the name to use for test data from the
fixture.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-23 14:57:09 -07:00
Jon Cruz
2ffb0afecb zunitc: Clarify documentation on return behavior.
* Clarify documentation on ZUC_ASSERT_* behavior in regards to return
   vs. abort()
* Added overview section on return behavior.
* Fixed spelling
* Removed outdated reference to tap function.

Changes since v1:

* Incorporated grammatical feedback.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-23 13:50:56 -07:00
Derek Foreman
46812b6e71 clients: don't discard motion if we have a grab
We discard motion outside the window on the assumption it's from before
some event that caused the window to shrink. However, if we have a grab
it's likely that this motion is actually from dragging from the inside
of the window out.

This fixes a problem where drag selecting in weston terminal behaves
oddly - it doesn't update the select region while the drag is happening
outside the window.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Tested-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-23 12:46:05 -07:00
Derek Foreman
5d13548c7e clients: try harder to discard motion after resize
If we're going to ignore motion below and to the right when coming
out of maximize, we should probably also ignore it above and to
the left.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Tested-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-23 12:45:55 -07:00
Derek Foreman
fa41eec4f7 weston-launch: Remove unused event source
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>
2015-10-23 12:34:11 -07:00
Ben Hummon
1ab9ca7e01 clients: Correct drawing glitch in stacking demo
Fix a graphics glitch in the stacking demo in which a transient
window's drop shadow is visibile within the interior of the window.

Signed-off-by: Ben Hummon <benjamin.hummon@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-10-21 16:57:47 -05:00
Derek Foreman
32838c93a5 compositor/clients: Protect CLOCK_BOOTTIME with ifdefs
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>
2015-10-21 16:44:14 -05:00
Derek Foreman
e292694277 build: Add -lrt for programs that use clock_gettime()
glibc requires this prior to 2.17, and we already do it in a few other
places.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
2015-10-21 16:40:08 -05:00
Bryce Harrington
33598ffe8d devices-test: Fix typo 'destroyes' in a comment 2015-10-20 08:35:43 -07:00
Derek Foreman
3a1580fb47 clients: track seat_version per seat, not per display
Apparently it's possible for a compositor to advertise seats with
different versions on the same connection, so this makes us more robust
against that dubious behaviour.

This also tracks the seat version we requested instead of the advertised
maximum.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: David FORT <contact@hardening-consulting.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-10-19 14:40:40 -05:00
Giulio Camuffo
49da7aeb25 libinput: remove unused #define
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-10-19 09:37:44 +08:00
Bryce Harrington
c6e6dc78c1 configure: Up the libwayland version requirement
weston commit f7bb9352 requires recent libwayland changes for providing
‘WL_POINTER_RELEASE_SINCE_VERSION’.  Increase the version requirement to
indicate that current weston git requires development version of
wayland.

NOTE: At release we should probably increase the wayland requirement for
weston to 1.10.0.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-10-15 16:19:13 -07:00
Ucan, Emre \(ADITG/SW1\)
ae2541d3f2 ivi-shell: install ivi-layout-export.h
IVI-Shell is designed to be used with other controller modules
than hmi-controller.These controller modules require
the ivi-layout-export header file to properly integrate
with the ivi-shell. The header file should be installed
when ivi-shell is enabled, because these controller modules
are not a part of the weston repository.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-15 16:14:00 -07:00
Bill Spitzak
c7ee7608ef Add commented-out option to weston.ini to set Xwayland path
User can remove the comment marks to make xwayland.so use a local
installed Xwayland server.
2015-10-15 13:42:38 -07:00
Derek Foreman
8743047112 compositor-drm: fix cursor size test in drm_assign_planes
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>
2015-10-15 10:36:18 -05:00
Tomohito Esaki
9054e4c8c4 screenshooter: correct output ordering of screencast recording when Y-flip is off
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>
2015-10-14 16:09:52 -07:00
Derek Foreman
a6714fa0fa input: Split get_udev_seat() into its own function
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>
2015-10-14 15:57:25 -07:00
Marko
61b4d3ea44 compositor-x11: Fix Weston running on a secondary X screen
When DISPLAY is anything other than #.0 weston would still use .0

Fixes
https://bugs.freedesktop.org/show_bug.cgi?id=90532
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-09 15:34:55 -05:00
Marek Chalupa
6ce78992a0 shell: fix maximizing windows on a secondary output
commit f814c5dc9 changed get_output_work_area behaviour
which broke the code for positioning maximized window.
The x position was set to 2*output->x instead of to output->x

fix https://bugs.freedesktop.org/show_bug.cgi?id=92357

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-10-09 15:24:04 -05:00
FORT David
f7bb9352f7 weston: release keyboard/touch/pointer objects
This patch adds the missing calls to release when the seat has capabilities
changes. It also fixes a missing release of the touch object and a leak with
old clients.

Signed-off-by: David FORT <contact@hardening-consulting.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-10-09 15:23:08 -05:00
Chokshi, Mitul
d669714d71 input: add new client to resource_list instead of focus_resource_list
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>
2015-10-09 11:20:41 -05:00
Giulio Camuffo
c5a011f1e0 zoom: remove temporary variables
Signed-off-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-09 11:17:41 -05:00
Giulio Camuffo
6850e7b9e1 zoom: Remove unneeded usage of wl_fixed_ts in favour of doubles
Signed-off-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-09 11:13:44 -05:00
Nicolas Guyomard
4845354cfa input-panel: Fix show_input_panel_surface crash when no surface has focus
Signed-off-by: Nicolas Guyomard <nicolas.guyomard@open.eurogiciel.org>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-07 17:13:17 -07:00
Jon Cruz
a151975347 doc: Correct absolute path in doxygen graphs.
Adds a config item to prevent doxygen from using absolute paths in
generated diagrams. This trims off the base directory during config to
leave just relative paths.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-07 17:09:09 -07:00
Derek Foreman
bdc8c721e4 cosmetic: Remove a few double semicolons
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-10-07 11:22:03 -07:00
Jonas Ådahl
bc5d849c9d desktop-shell: NULL check whether a popup parent is a shell surface
get_shell_surface(parent) may return NULL if the client passed a
unassigned wl_surface or a wl_surface with a non-shell surface role
(such as cursor role).

https://bugs.freedesktop.org/show_bug.cgi?id=92316

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-10-07 11:43:59 -05:00
Chris Michael
3f607d3e1c weston-input: Reformat weston_log line to add missing space between words
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-10-07 11:34:49 -05:00
Ben Hummon
445e44cfb2 clients: Moving and rotating transient surfaces
Transient surfaces use child/parent surfaces for stacking order. This
change resloves an issue in which attempting to move or rotate a
toplevel transient surface can move or rotate its ancestor.
2015-10-06 15:24:28 -05:00
Lucas Tanure
ed8dd4ef6a animation: Fix potential leak of memory pointed to by move
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>
2015-10-05 18:54:29 -07:00
Giulio Camuffo
3c241b18b8 main: fix destroying the compositor on error while starting
Signed-off-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-10-05 16:42:40 -05:00
Giulio Camuffo
2d24e64776 compositor: don't crash if destroying a compositor without a backend
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>
2015-10-05 16:22:13 -05:00
Chris Michael
7e17fec68d compositor-rdp: Add missing '\n' in weston_log usage
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-01 10:04:22 -07:00
Chris Michael
c262b4a94f cms-colord: Add missing '\n' in weston_log usage
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-01 10:04:21 -07:00
Chris Michael
5169a57013 screen-share: Add missing '\n' in weston_log usage
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-01 10:04:18 -07:00
Chris Michael
c083af9907 ivi-shell: Add missing '\n' in weston_log function usage
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-01 10:04:15 -07:00
Ucan, Emre (ADITG/SW1)
64635ee699 ivi-shell: introduce get_weston_view
The internal API "get_weston_view" is introduced, which returns the
weston_view of the given ivi_layout_surface. The API returns a NULL
pointer, if the ivi_layout_surface does not have any weston_view.

The weston_view is required in many places of ivi-shell implementation.
Therefore, this API will reduce lines of code. Furthermore, it will
increase the maintainability of the ivi-shell implementation.

Old way of getting the weston_view was flawed, because the views list of
the weston_surface is read without controlling the existence of the
weston_surface.  New implementation explicitly throws an error if the
weston_surface does not exist.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Tested-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
[Pekka: Line-wrapped the commit message.]
2015-10-01 12:56:32 +03:00
Ucan, Emre (ADITG/SW1)
4a18364595 ivi-shell: remove is_surface_in_layer API
This internal API is redundant, because a surface is allowed to be only
on one layer.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Tested-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
2015-10-01 12:35:49 +03:00
Ucan, Emre (ADITG/SW1)
bb4ec0a186 ivi-shell: remove is_layer_in_screen API
This internal API is redundant, because a layer is allowed to be only on
one screen.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Tested-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
2015-10-01 12:34:24 +03:00
Ucan, Emre (ADITG/SW1)
dfac375993 ivi-shell: remove struct link_layer
link_layer's sole purpose is to link a surface to multiple layers, if
the surface should be shown in multiple layers.  This can be only
achieved, if the surface has multiple weston_views with different
transformation matrices.

Current implementation assumes in many places that a ivi_surface has
only one weston_view.  Therefore, a surface can be only shown on one
layer.

Although this (a surface on multiple layers) is a nice to have feature
for ivi-shell, it is not very crucial.  In any case, it is not an easy
task to implement this feature, because it has lot of corner cases.

I removed with this patch the link_layer data structure, because it does
not have any purpose in current implementation.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Tested-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
[Pekka: Line-wrapped the commit message.]
2015-10-01 12:09:40 +03:00
Ucan, Emre (ADITG/SW1)
8a223673ad ivi-shell: remove struct link_screen
link_screen's sole purpose is to link a layer to multiple screens, if
the layer should be shown in multiple screens.  This can be only
achieved, if surfaces of the layer have multiple weston_views dedicated
to the different screens.

Current implementation assumes in many places that a ivi_surface has
only one weston_view.  Therefore, a layer can be only shown on one
screen.

Although this (a layer on multiple screens) is a nice to have feature
for ivi-shell, it is not very crucial.  In any case, it is not an easy
task to implement this feature, because it has lot of corner cases.

I removed with this patch the link_screen data structure, because it
does not have any purpose in current implementation.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Tested-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
[Pekka: Line-wrapped commit message.]
2015-10-01 12:07:39 +03:00
Derek Foreman
dcba1a10d3 xdg-shell: Clarify ack_configure behaviour
Right now many toolkits (toytoolkit, gtk+ and EFL) will send an
ack_configure request immediately in response to a configure event,
even if they're not immediately committing the surface at that time.

This leads to a situation where multiple configures receive ack_configure
before any commit happens.

There's really no reason for that sequence of events to bother a compositor,
so this just clarifies the language to make it ok.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2015-09-30 13:06:44 -07:00
Derek Foreman
0b7da01c04 cosmetic: add missing line between variable declarations and code
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-09-30 12:33:52 -07:00
Lucas Tanure
a3377cd114 ivi-layout-transition: Standardize the check for layout_transition_register
Check the return from layout_transition_register in order to fix
potential leak of memory pointed to by transition. And don't register a
null transition.

Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-09-30 12:27:56 -07:00
Giulio Camuffo
aa9747833e xwm: use always a valid 'primary view' for an X window
The xwm gets a primary view for a X window using the get_primary_view
vfunc of the shell_interface struct. Storing it is dangerous though
because it doesn't listen for its destruction so it may end up using the
old stored view pointer after that view was freed, or after the primary
view for that window was changed to another one.

Fetch the primary view just before using it every time and try to not
abuse this 'primary view' concept which may map badly to some shells:
iterate over all the views instead when it makes sense.

Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-09-29 18:22:45 -07:00
Frederico Cadete
8e1efcd40b configure.ac: add explicit enable/disable for systemd-login support
Otherwise, auto-enable depending on whether the system has the necessary
libraries.

[Updated help text as per pq suggestion -- bwh]

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-09-29 18:15:33 -07:00
Egor Starkov
94fd9a5694 compositor: remove systemd-notify.h
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>
2015-09-29 18:10:33 -07:00