platform/upstream/weston.git
9 years agoremove trailing whitespaces
Michael Vetter [Fri, 15 May 2015 15:17:47 +0000 (17:17 +0200)]
remove trailing whitespaces

Remove trailing whitespaces because they are not needed and jumping to
the end of al ine should do just that and not jump to the whitespace.

9 years agolauncher-util: Force all weston_launcher_open()s to use O_CLOEXEC
Derek Foreman [Fri, 1 May 2015 16:46:36 +0000 (11:46 -0500)]
launcher-util: Force all weston_launcher_open()s to use O_CLOEXEC

Really, there's pretty much no time we'd ever want O_CLOEXEC unset,
as it will likely result in leaking fds to processes that aren't
interested in them or shouldn't have them.

This also removes the (now unused) code from weston_logind_open() that
could drop O_CLOEXEC.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agologind: actually close fd in weston_launcher_close()
Derek Foreman [Thu, 30 Apr 2015 19:37:03 +0000 (14:37 -0500)]
logind: actually close fd in weston_launcher_close()

You had one job...

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: David Herrmann <dh.herrmann@gmail.com> [implicit from v1
comment]
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxwm: Fix the window decoration hints.
Dima Ryazanov [Mon, 4 May 2015 02:56:37 +0000 (19:56 -0700)]
xwm: Fix the window decoration hints.

Enable all hints by default. This fixes the "Maximize" button in apps that
don't set any hints - e.g., xclock or Firefox. (There's still a problem, though:
"decorate" is sometimes treated as a boolean, sometimes as a bitmask.)

Handle MWM_DECOR_ALL correctly. It looks like it's supposed to invert the values
of the rest of the flags.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
Reviewed-By: Giulio Camuffo <giuliocamuffo@gmail.com>
9 years agoRDP compositor: fixes for multiple connections, mstsc and FreeRDP master compilation
Hardening [Mon, 11 May 2015 21:19:02 +0000 (22:19 +0100)]
RDP compositor: fixes for multiple connections, mstsc and FreeRDP master compilation

This patch fixes the problem reported on the mailing list
(http://lists.freedesktop.org/archives/wayland-devel/2015-January/019575.html).
All certificate and key paths were not copied when given to FreeRDP, so they
were freed when the peer was disconnecting. And so the next connection was failing.

All the initialization stuffs have been moved to the activate callback, as when it is
called the peer is ready for graphics.

We also differ the creation of the seat, so that a seat is initialized only the
peer really do the activation sequence. That helps when mstsc just connects to see
the certificate, ask if the certificate should be trusted, and then reconnects.

This patch also adds configuration settings for recent versions of FreeRDP that
comes with everything disabled. This makes remoteFx functionnal again.

The patch also handles the skipCompression flag for last FreeRDP versions, that
allows to skip bulk compression for surfaces that have been already compressed by
the remoteFx or NS codec.

This also fixes the compilation against FreeRDP master with callback that now return
BOOL.

Signed-off-by: Hardening <rdp.effort@gmail.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoprotocol: Improve formatting of input method and text protocols
Jonas Ådahl [Wed, 17 Sep 2014 20:49:04 +0000 (22:49 +0200)]
protocol: Improve formatting of input method and text protocols

To make it more readable, add an empty line between each request and
event.

Also comes with a bonus indentation fix.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
9 years agoman: use Xwayland instead of Xorg
Giulio Camuffo [Sun, 10 May 2015 08:29:33 +0000 (11:29 +0300)]
man: use Xwayland instead of Xorg

9 years agotext-input: Replace model with input
Derek Foreman [Fri, 8 May 2015 22:08:41 +0000 (17:08 -0500)]
text-input: Replace model with input

commit 78d00e45cc renamed text_model to text_input

This cleans up remaining uses of the word "model"

Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
9 years agotext: Fix text-input for multi-seat
Derek Foreman [Fri, 8 May 2015 22:08:40 +0000 (17:08 -0500)]
text: Fix text-input for multi-seat

Multi-seat configurations currently break the text-backend, crashing
weston.  This is an attempt to clean up any crashes and have somewhat
sensible input panel behavior with multi-seat.

Store a link to the manager that created a text_input, use this to
ensure that only a single panel gets popped up at a time, since there
is only one manager.

Replace deactivate_text_input with deactivate_input_method: multiple
input methods may focus the same text_input, so deactivating a text_input
is weird in multi-seat and confusing to perform.

In destroy_input_method_context set the context's input_method's context
pointer to NULL to prevent a dangling pointer.

Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
9 years agoxwm: make X windows of type 'utility' inactive
Giulio Camuffo [Wed, 29 Apr 2015 16:00:48 +0000 (19:00 +0300)]
xwm: make X windows of type 'utility' inactive

Skype's popup notifications use this type.

9 years agodesktop-shell: set the current size in the first 'resizing' configure event
Ryo Munakata [Sat, 2 May 2015 12:44:04 +0000 (21:44 +0900)]
desktop-shell: set the current size in the first 'resizing' configure event

Weston has sent the first 'resizing' configure event with width=height=0.
But resizing to that size doesn't make sense.
Instead, we now send the current width and height of the surface at the beginning
of resizing.

Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
9 years agocompositor: send the output_created signal after inserting it in the list
Giulio Camuffo [Wed, 6 May 2015 18:41:57 +0000 (21:41 +0300)]
compositor: send the output_created signal after inserting it in the list

The compositor's output_created signal used to be sent in weston_output_init()
which the backend call before putting the output in the output_list.
This caused problems when creating a new view in a listener to that signal,
because weston_view_assign_output() doesn't yet know the new output exists.
To fix this add a new weston_composito_add_output() func which adds the
output in the list and later sends the signal, and make the backends call
that.

9 years agoeditor: implement Cut,Copy,Paste
Manuel Bachmann [Sun, 29 Mar 2015 23:57:44 +0000 (01:57 +0200)]
editor: implement Cut,Copy,Paste

weston-editor is the only stock client spawning the virtual
keyboard ; which means it may be the only client able to
obtain some special characters (depending on the user's
keyboard layout).

If we implement Cut, Copy and Paste, the user has now a way
to copy such characters to other useful clients (such as
weston-terminal). Plus, it demonstrates text data exchange
between two clients of different nature.

Functionality is implemented in a right-click menu and the
Ctrl+Shift+X/C/V bindings, just as in weston-terminal.

Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Tested-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoconfigure.ac: bump to version 1.7.91 for the alpha release 1.7.91
Bryce Harrington [Thu, 7 May 2015 02:00:02 +0000 (19:00 -0700)]
configure.ac: bump to version 1.7.91 for the alpha release

9 years agotests: Fix Samsung copyright assignment on xwayland test
Bryce Harrington [Tue, 5 May 2015 18:16:51 +0000 (11:16 -0700)]
tests:  Fix Samsung copyright assignment on xwayland test

9 years agoxdg-shell: Specify fullscreen size-mismatch handling
Jonas Ådahl [Tue, 7 Apr 2015 08:42:27 +0000 (16:42 +0800)]
xdg-shell: Specify fullscreen size-mismatch handling

We cannot rely on the client to provide a surface filling the output so
we must specify what happens with the outputs area that is not covered
completely.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxdg-shell: Specify the meaning of 0x0 window geometry in configure
Jonas Ådahl [Tue, 7 Apr 2015 04:07:56 +0000 (12:07 +0800)]
xdg-shell: Specify the meaning of 0x0 window geometry in configure

Some times the compositor needs to send a configure request but without
having any clue about what size the surface should have. Examples
include unmaximizing a surface that was mapped as maximized, or an
initial state which doesn't have any size expectations.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxdg-shell: Some xdg_popup clarifications
Jonas Ådahl [Thu, 2 Apr 2015 07:25:53 +0000 (15:25 +0800)]
xdg-shell: Some xdg_popup clarifications

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxdg-shell: Some minor clarifications
Jonas Ådahl [Thu, 2 Apr 2015 07:16:14 +0000 (15:16 +0800)]
xdg-shell: Some minor clarifications

Mention set_window_geometry in configure documentation.

Add a strategic "For instance" to clarify what is just an example.

Clarify that the arguments of set_window_geometry are in the surface
local coordinate space.

Point out that the client needs to destroy a dismissed popup.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxdg-shell: Fix a couple of typos
Jonas Ådahl [Thu, 2 Apr 2015 06:47:13 +0000 (14:47 +0800)]
xdg-shell: Fix a couple of typos

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoxdg-shell: Document that xdg_surface.set_window_geometry needs a commit
Jonas Ådahl [Wed, 18 Mar 2015 09:18:20 +0000 (17:18 +0800)]
xdg-shell: Document that xdg_surface.set_window_geometry needs a commit

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxdg-shell: Require a buffer and a wl_surface.commit for mapping a window
Jonas Ådahl [Wed, 18 Mar 2015 09:08:23 +0000 (17:08 +0800)]
xdg-shell: Require a buffer and a wl_surface.commit for mapping a window

Require the client to have attached (either previously committed, or
newly) a buffer to the corresponding wl_surface, and that the window
will not be potentially mapped until calling wl_surface.commit after
having created the window. This is required to make valid double
buffered xdg_surface state possible when creating a window.

Currently there is no double buffered state in xdg_popup, but it should
behave the same as xdg_surface, and for making it future proof in case
we want to add double buffered state to xdg_popup.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxdg-shell: Move xdg_shell.get_xdg_popup errors to xdg_shell
Jonas Ådahl [Wed, 18 Mar 2015 08:37:47 +0000 (16:37 +0800)]
xdg-shell: Move xdg_shell.get_xdg_popup errors to xdg_shell

They are errors that may be as a result of calling get_xdg_popup on an
xdg_shell, not a result of calling a request on xdg_popup.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxdg-shell: Require proper object tree destruction
Jonas Ådahl [Wed, 18 Mar 2015 08:20:51 +0000 (16:20 +0800)]
xdg-shell: Require proper object tree destruction

Require all child objects to be destroyed before the parent. In other
words, all popups and surfaces created by one xdg_shell instance needs
to be destroyed before the xdg_shell object, otherwise a protocol error
is raised.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agotests: fix typo
Derek Foreman [Fri, 1 May 2015 19:30:20 +0000 (14:30 -0500)]
tests: fix typo

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
9 years agodata-device: send the selection to all the wl_data_device resources of a client
Giulio Camuffo [Fri, 1 May 2015 09:59:36 +0000 (12:59 +0300)]
data-device: send the selection to all the wl_data_device resources of a client

As we do for the input interfaces such as wl_pointer, we must send the
selection event to all the wl_data_device resources the client created for
a specified seat.

Reviewed-by: Daniel Stone <daniels@collabora.com>
9 years agodata-device: add a function to send the selection to a client
Giulio Camuffo [Fri, 1 May 2015 09:59:35 +0000 (12:59 +0300)]
data-device: add a function to send the selection to a client

This commit adds a new exported function, weston_seat_send_selection(),
which sends the current selection to a specified client. This is
useful e.g. to implement a clipboard manager as a special client.

Reviewed-by: Daniel Stone <daniels@collabora.com>
9 years agoclipboard: don't crash if the source client does not send a mime type
Giulio Camuffo [Thu, 30 Apr 2015 21:13:55 +0000 (00:13 +0300)]
clipboard: don't crash if the source client does not send a mime type

Reviewed-by: Daniel Stone <daniels@collabora.com>
9 years agotouch: Make weston_touch_set_focus() take a touch instead of a seat
Derek Foreman [Thu, 30 Apr 2015 21:45:41 +0000 (16:45 -0500)]
touch: Make weston_touch_set_focus() take a touch instead of a seat

The other set_focus() functions take the relevant type instead of a seat
already, so this is consistent.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
9 years agocompositor: change weston_surface::destroy_signal argument
Pekka Paalanen [Fri, 17 Apr 2015 11:23:38 +0000 (14:23 +0300)]
compositor: change weston_surface::destroy_signal argument

Pass 'this' weston_surface as the data argument to
weston_surface::destroy_signal listeners. The old &surface->resource was
really just an offsetted pointer to the weston_surface anyway. And,
because 'resource' happened to be the first member in struct weston_surface,
it was actually 'this' weston_surface.

The argument type was accidentally changed in commit
26ed73cee858956f6af07c3e4bb49b5514f17b8b from wl_resource* to
wl_resource**.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agocompositor: inert wl_surface objects do not exist
Pekka Paalanen [Fri, 17 Apr 2015 11:00:24 +0000 (14:00 +0300)]
compositor: inert wl_surface objects do not exist

There is no valid case, where you would actually destroy a
weston_surface, while leaving the wl_surface protocol object in
existence. Therefore, inert wl_surface objects do not exist, except
because of bugs.

To catch such bugs, check that the resource is really NULL before
actually destroying the weston_surface.

We actually used to have this check, but it was removed by:

commit 9dadfb53526bc97d62dc01c165e8b6f722f7ea5a
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Jul 8 13:49:36 2013 -0400

    compositor: Eliminate marshalling warning for leave events

However, the invariant was put back in:

commit 0d379744d34e616fea840272deda6b7027f79f55
Author: Giulio Camuffo <giuliocamuffo@gmail.com>
Date:   Fri Nov 15 22:06:15 2013 +0100

    compositor: set weston_surface:resource to NULL when destroyed

So apparently the issue fixed by 9dadfb53 was fixed another way later.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: set an initial value for ivi-surface.
Nobuhiko Tanibata [Mon, 27 Apr 2015 08:02:54 +0000 (17:02 +0900)]
ivi-shell: set an initial value for ivi-surface.

Especially, the size of destination rectagle is set to (1,1).
This is because the size will be used for caluculating scale and not to
be 0 to avoid 0 dividing.

I also remark this as FIXME. This shall be fixed at ivi-layout-tansition.c.
In new invoded application, its property is initilized by (0,0)
destination rectangle. So transition fucntion always calculates its scale
as inf at first frame of fade-in with new invoked application. To fix this,
restructing transition function is ideally needed.

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: remove unnecesary code in ivi_shell_surface_configure
Nobuhiko Tanibata [Mon, 27 Apr 2015 08:02:35 +0000 (17:02 +0900)]
ivi-shell: remove unnecesary code in ivi_shell_surface_configure

This method should not update weston_view directly. This shall be done by
controller via ivi_layout_*.

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: fit source rectangle of ivi-surface to the size of application content.
Nobuhiko Tanibata [Mon, 27 Apr 2015 08:00:25 +0000 (17:00 +0900)]
ivi-shell: fit source rectangle of ivi-surface to the size of application content.

When application changes the size of its content, UI shall fit the source
rectangle, view area, to the size of its content to show whole content.

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: remove unnecesary assignment of fail safe value.
Nobuhiko Tanibata [Mon, 27 Apr 2015 07:57:26 +0000 (16:57 +0900)]
ivi-shell: remove unnecesary assignment of fail safe value.

Scale is calculated as float and to be inf. It shall be avoided by,
ivi_layout_surface_set_source/destination_rectangle. So output log and
then return this method to use prevous scale for fail safe.

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: remove unnecesary code in ivi_layout_surface_configure
Nobuhiko Tanibata [Mon, 27 Apr 2015 07:54:01 +0000 (16:54 +0900)]
ivi-shell: remove unnecesary code in ivi_layout_surface_configure

ivi_layout_surface_configure is called from ivi-shell when configure
listener of weston surface is triggered. This function shall do,
- emit signal to hmi-controller to notify the configuration change

Other unnecesary logics are cleaned up.

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell: support surface screen shot of ivi_layout by using weston_surface_copy_content
Nobuhiko Tanibata [Mon, 20 Apr 2015 17:13:15 +0000 (02:13 +0900)]
ivi-shell: support surface screen shot of ivi_layout by using weston_surface_copy_content

The reason why the result is not output in the method is that it avoids
to have dependency on CAIRO. If user want to output it to file, user
shall link CAIRO on its controller.

ivi_layout_surface_get_size is also supported here because user needs
stride to call ivi_layout_surafce_dump.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agonotes: Don't manipulate lists while tranversing the list
Bryce Harrington [Tue, 14 Apr 2015 20:43:06 +0000 (13:43 -0700)]
notes: Don't manipulate lists while tranversing the list

9 years agodesktop-shell: Remove the panel popup
Dima Ryazanov [Wed, 8 Apr 2015 18:51:58 +0000 (11:51 -0700)]
desktop-shell: Remove the panel popup

It doesn't work anymore, and it never did anything useful.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agodesktop-shell: Require a popup parent to be a shell surface
Dima Ryazanov [Wed, 8 Apr 2015 18:51:57 +0000 (11:51 -0700)]
desktop-shell: Require a popup parent to be a shell surface

Currently, the shell crashes if the parent is not a shell surface. Instead,
send an error to the client.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agobuild: fix setuid check
Derek Foreman [Fri, 10 Apr 2015 16:55:27 +0000 (11:55 -0500)]
build: fix setuid check

At least in some shells test needs 3 arguments for string comparison

if test $foo=yes ...

will always be true.

if test $foo = yes ...

will perform a string comparison.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-By: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxwm: Fix a weston crash when a window surface is created after unmap
Derek Foreman [Thu, 9 Apr 2015 19:48:22 +0000 (14:48 -0500)]
xwm: Fix a weston crash when a window surface is created after unmap

If windows are created and quickly destroyed it's possible that they'll be
on the unpaired window list at the time of surface creation.  The surface
destroy listener for that surface isn't properly freed and a crash happens
some time later.

This patch removes the window from the unpaired list during unmap, so we
should never get to the destroy handler with a surface destroy listener set.

Just in case there's another path to that failure, I've also removed the
surface destroy listener in the destory handler.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agobuild: give explicit error when unable to setuid on install.
Jon A. Cruz [Fri, 10 Apr 2015 00:52:56 +0000 (17:52 -0700)]
build: give explicit error when unable to setuid on install.

Added build error message when 'make install' is run as non-root
and the --disable-setuid-install configuration option has not been
used.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxwm: Add and use helper function for looking up windows in the hash table
Derek Foreman [Thu, 9 Apr 2015 15:51:22 +0000 (10:51 -0500)]
xwm: Add and use helper function for looking up windows in the hash table

This lets us verify that all callers are actually testing for a
successful hash lookup at compile time.

All current users of hash_table_lookup are converted to the new
wm_lookup_window() and the appropriate success check is added.
This fixes any call sites that used to assume a successful return
and dereference a NULL pointer.

This closes http://bugs.freedesktop.org/show_bug.cgi?id=83994
The xwayland test has been failing because weston crashes due to
a hash lookup failure and a subsequent dereference of the returned
NULL pointer.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agotests: add ivi_layout stand-alone test module
Pekka Paalanen [Fri, 27 Mar 2015 09:55:21 +0000 (11:55 +0200)]
tests: add ivi_layout stand-alone test module

This is the ivi_layout stand-alone test controller module that does not
require any clients to run. Therefore it is much simpler than
ivi_layout-test-plugin.c and does not need a matching part in
ivi_layout-test.c.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: ivi_layout test infrastructure
Pekka Paalanen [Wed, 25 Mar 2015 10:50:31 +0000 (12:50 +0200)]
tests: ivi_layout test infrastructure

Testing the ivi_layout API requires two things:
- the tests must be written as a controller module to access the API
- the tests need a helper client to create some objects that can then be
  managed via the API

This patch adds all the infrastructure and two different kinds of
example tests.

Internal ivi-shell (ivi_layout) API tests are listed as ivi-*.la files
in TESTS in Makefile.am. Weston-tests-env detects these, and runs Weston
with ivi-shell, and loads the given module as a controller module, not
as a normal plugin.

The test controller module ivi-*.la will launch a helper client. For
ivi-layout-test.la the helper client is ivi-layout.ivi.

The helper client uses the weston-test-runner framework to fork and exec
each TEST with a fresh connection to the compositor.

The actual test is triggered by the weston_test_runner protocol
interface, a new addition to weston-test.xml. The helper client uses
weston_test_runner to trigger a test, and the server side of the
interface is implemented by the test controller module
(ivi-layout-test.la).

The server side of weston_test_runner uses the same trick as
weston-test-runner.h to gather a list of defined tests. A test is
defined with the RUNNER_TEST macro.

If a test defined by RUNNER_TEST succeeds, an event is sent to the
helper client that it can continue (or exit). If a test fails, a fatal
protocol error is sent to the helper client.

Once the helper client has iterated over all of its tests, it signals
the batch success/failure via process exit code. That is cought in the
test controller module, and forwarded as Weston's exit code.

In summary: each ivi_layout test is a combination of a client side
helper/setup and server side actual tests.

v2: Load weston-test.so, because create_client() needs it.

v3: add a comment about IVI_TEST_SURFACE_ID_BASE.

v4: Rebased to upstream weston-tests-env changes.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com> (v2)
9 years agotests: add a basic ivi-shell test
Pekka Paalanen [Mon, 23 Mar 2015 11:55:06 +0000 (13:55 +0200)]
tests: add a basic ivi-shell test

This simply tests that Weston starts with ivi-shell, and ivi_application
is present.

Changes in v3:
- Rebased to upstream weston-tests-env changes.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com> (v2)
9 years agogl-renderer: fix configless_context check
Pekka Paalanen [Wed, 8 Apr 2015 14:02:22 +0000 (17:02 +0300)]
gl-renderer: fix configless_context check

EGL_MESA_configless_context is a display extension. The query for client
extensions was overwriting the pointer, so it was being searched from
the client extensions instead.

Fix any confusion here by moving all client extension checks into
another function. Drop a useless cast.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
9 years agogl-renderer: check EGL_EXT_platform_base in supports()
Pekka Paalanen [Wed, 8 Apr 2015 14:02:21 +0000 (17:02 +0300)]
gl-renderer: check EGL_EXT_platform_base in supports()

An EGL implementation may support client extensions without supporting
EGL_EXT_platform_base. In such a case, we should return 0 to fall back
to the old eglGetDisplay() way.

Cc: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
9 years agogl-renderer: fix EGL initialization steps
Manuel Bachmann [Wed, 8 Apr 2015 14:02:20 +0000 (17:02 +0300)]
gl-renderer: fix EGL initialization steps

Some DRI drivers, including VMware vmwgfx, do not support
calling eglQueryString() with a EGL_NO_DISPLAY parameter.
Just as we do in gl_renderer_supports(), which returns 0
but does not fail in this case, do not fail in
gl_renderer_setup_egl_extensions().

Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
[Pekka: split the patch]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
9 years agoxwm: fix extra break
Derek Foreman [Tue, 7 Apr 2015 17:12:13 +0000 (12:12 -0500)]
xwm: fix extra break

The first break in TYPE_WM_PROTOCOLS was almost certainly intended to be
nested within the if statement.

Even if it wasn't, it makes sense there.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoivi-shell/weston.ini: fix paths
Pekka Paalanen [Tue, 24 Mar 2015 12:09:57 +0000 (14:09 +0200)]
ivi-shell/weston.ini: fix paths

If you do an out-of-tree build, all the images will be left in the
srcdir. Fix their paths.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
9 years agobuild: generate weston-ivi.ini for tests
Pekka Paalanen [Tue, 24 Mar 2015 11:51:05 +0000 (13:51 +0200)]
build: generate weston-ivi.ini for tests

The ivi-shell / hmi-controller cannot run without a properly populated
config file. Generate a config file especially for tests, which includes
paths to the build dirs.

The generated file will be used by following patches adding ivi-shell
tests.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
9 years agotests: Prefer bracket form of test command for consistency
Bryce Harrington [Fri, 3 Apr 2015 02:16:56 +0000 (19:16 -0700)]
tests: Prefer bracket form of test command for consistency

Also use variable default assignment to eliminate an if clause

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agotests: Cleanup test log filenames
Bryce Harrington [Fri, 3 Apr 2015 02:16:53 +0000 (19:16 -0700)]
tests: Cleanup test log filenames

The log files were being named like:

surface-global-test.la-log.txt
surface-global-test.la-serverlog.txt
surface-test.la-log.txt
surface-test.la-serverlog.txt
text.weston-log.txt
text.weston-serverlog.txt

For consistency, omit the test filename's extension (.la/.so).

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agotests: Keep track of basename
Bryce Harrington [Fri, 3 Apr 2015 02:16:52 +0000 (19:16 -0700)]
tests: Keep track of basename

basename returns the filename without path information (but with
the file extension).  We can get this more efficiently via shell
variables.

Also, for the socket name, use the test's name without the file
extension.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
[Pekka: rebased without "tests: Support --config to enable tests to
override config defaults".]

9 years agocompositor: Help text for --config
Bryce Harrington [Fri, 3 Apr 2015 02:16:50 +0000 (19:16 -0700)]
compositor: Help text for --config

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agocompositor-wayland: ignore frame callback's time
Pekka Paalanen [Thu, 2 Apr 2015 13:26:06 +0000 (16:26 +0300)]
compositor-wayland: ignore frame callback's time

Weston running the Wayland backend is nested. The parent compositor uses
an unknown clock for the frame callback timestamps. This is quite likely
a different clock from what the nested Weston chose as its presentation
clock.

This means we cannot reasonably read the presentation clock and assume
it has any relation to the timestamp got from the frame callback. In
fact, this was seen to cause absurd repaint delays, trigger the insanity
check, reduce fraterate, etc. problems, because we assume we can read
the clock and compute the remaining repaint delay.

As we can't use the timestamp, ignore it, and read our own presentation
clock instead.

The X11 backend does not suffer from this, because there the parent
window system never provides us any timestamps, so we always read our
own clock.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Giulio Camuffo <giuliocamuffo@gmail.com>
9 years agoxwayland: Stack windows on top when activating them
Jasper St. Pierre [Sun, 22 Mar 2015 17:14:49 +0000 (10:14 -0700)]
xwayland: Stack windows on top when activating them

Now that we've removed the XYToWindow handler in Xwayland, we actually
have to stack windows properly. This stacks windows on top when
activating them.

Note that for a fully robust Xwayland implementation, we'll need a
complete stack tracker implementation, unfortunately.

Reviewed-by: Daniel Stone <daniels@collabora.com>
9 years agoivi-layout: abort without controller_module_init
Pekka Paalanen [Thu, 26 Mar 2015 13:47:29 +0000 (15:47 +0200)]
ivi-layout: abort without controller_module_init

When loading a controller module, if we do not find a
controller_module_init symbol, return failure to the caller instead of
ignoring the failure.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
9 years agoivi-shell: add cmdline option for controller module
Pekka Paalanen [Fri, 20 Mar 2015 13:53:53 +0000 (15:53 +0200)]
ivi-shell: add cmdline option for controller module

This will be useful for tests, where we use --no-config, but ivi-shell
needs load the controller module from somewhere.

We are not making hmi-controller.so the default, because this patch
should allow running the tests also with another controller.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
9 years agotests: rename client_create to create_client_and_test_surface
Pekka Paalanen [Thu, 26 Mar 2015 10:56:10 +0000 (12:56 +0200)]
tests: rename client_create to create_client_and_test_surface

A more descriptive name to not be confused with create_client().

v2: Rebased: fix also devices-test.c.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
9 years agotests: introduce create_client()
Pekka Paalanen [Thu, 26 Mar 2015 10:49:35 +0000 (12:49 +0200)]
tests: introduce create_client()

Introduce a new helper create_client(), which creates and initializes
the client struct, but does not create a wl_surface.

This will be useful for ivi-shell tests.

v2: Rebased, and restored the dependency to weston-test.so, since seat
handling requires it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
9 years agotests: add tests for devices handling
Marek Chalupa [Mon, 30 Mar 2015 13:21:29 +0000 (09:21 -0400)]
tests: add tests for devices handling

Test misc races when adding/releasing devices

v2.: use one roundtrip after releasing devices
     add touch support

v3.: remove useless checks
     add few comments
     repeat tests 30 times instead of 100 times
     (it took too long, 30 is enough)

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agotests: implement touch in test-helpers
Marek Chalupa [Mon, 30 Mar 2015 13:20:07 +0000 (09:20 -0400)]
tests: implement touch in test-helpers

Let the client bind to wl_touch. Since we have our own seat,
we know that the compositor will have wl_touch capability.

v2: rebased due to changes in previous commit

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agotests: use special seat
Marek Chalupa [Mon, 30 Mar 2015 13:17:40 +0000 (09:17 -0400)]
tests: use special seat

When running on different backends, we don't know what devices
the backend provides. Create new seat for tests that contains
everything what we need. This is also first step in adding
touch support for tests.

v2: do not add devices in wl_seat.name event. Collect first
    all wl_seats and then pick the one that we need and
    destroy the rest. The effect is the same, but this code
    is better understandable.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agotests: fix handling globals
Marek Chalupa [Mon, 30 Mar 2015 10:37:56 +0000 (06:37 -0400)]
tests: fix handling globals

We used hard-coded version 1 for all globals. For testing
newer methods and events we need use the current version
of global. This patch fixes this and adds missing
event handlers (for the events that were added in
versions > 1)

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoweston-test: add device_{release/add} into protocol
Marek Chalupa [Mon, 30 Mar 2015 10:37:55 +0000 (06:37 -0400)]
weston-test: add device_{release/add} into protocol

This request simulates device creation/destruction from evdev (libinput)

v2: added support for touch. Touch is not supported yet,
    but better be prepared

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxwm: tell the shell the pid of the X clients
Giulio Camuffo [Tue, 27 Jan 2015 17:10:37 +0000 (19:10 +0200)]
xwm: tell the shell the pid of the X clients

All the surfaces from all the X clients share the same wl_client so
wl_client_get_credentials can't be used to get the pid of the X
clients.
The shell may need to know the pid to be able to associate a surface
with e.g. a DBus service.

[Pekka: fixed trivial merge conflicts.]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agotoytoolkit: fix EGL surface creation for lazy drivers
Manuel Bachmann [Sun, 29 Mar 2015 06:17:01 +0000 (08:17 +0200)]
toytoolkit: fix EGL surface creation for lazy drivers

Some DRI drivers, including VMware vmwgfx, do not support
calling eglQueryString() with a EGL_NO_DISPLAY parameter.

Allow toytoolkit to create EGL surfaces with them, by
falling back to the old creation method.

Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agonested-client: fix typo
Manuel Bachmann [Sat, 28 Mar 2015 06:06:40 +0000 (07:06 +0100)]
nested-client: fix typo

Should be "client" instead of "nclient".

Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agotoytoolkit: fix new EGL extensions fallback typedefs
Manuel Bachmann [Sat, 28 Mar 2015 06:05:48 +0000 (07:05 +0100)]
toytoolkit: fix new EGL extensions fallback typedefs

The dummy typedefs for "get_platform_display()" and
"create_platform_window()" were badly defined, which
prevented building Weston on older systems.

Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoterminal: add "Minimize" to context menu
Pekka Paalanen [Fri, 27 Mar 2015 13:48:54 +0000 (15:48 +0200)]
terminal: add "Minimize" to context menu

Terminal is a nice app that support fullscreening. To be able to test
minimizing of a fullscreen app, add an entry to the context menu. That
is the only way to minimize, as window frame is not there when
fullscreen.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agodesktop-shell: remove dead unminimization code
Manuel Bachmann [Mon, 16 Feb 2015 10:52:13 +0000 (11:52 +0100)]
desktop-shell: remove dead unminimization code

The "set_minimized(surface, 0)" function call was never
used anywhere, and not really respecting naming
conventions.

Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agocompositor: add option to specify a weston.ini
Pekka Paalanen [Tue, 24 Mar 2015 13:56:20 +0000 (15:56 +0200)]
compositor: add option to specify a weston.ini

Add a command line option to specify a file to be read instead of
weston.ini.

IVI-shell testing will at least temporarily need to specify a config
file, because it cannot run without. That is why this is being added,
but should be convenient for everybody, too.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoPass config file from compositor to everything
Pekka Paalanen [Tue, 24 Mar 2015 13:56:19 +0000 (15:56 +0200)]
Pass config file from compositor to everything

We have the Weston command line option '--no-config' which is meant to
prevent loading weston.ini at all. It works for Weston itself, but it
does not work for any clients that also want to read weston.ini.

To fix that, introduce a new environment variable WESTON_CONFIG_FILE.
Weston will set it to the absolute path of the config file it loads.
Clients will load the config file pointed to by WESTON_CONFIG_FILE. If
the environment variable is set but empty, no config file will be
loaded. If the variable is unset, things fall back to the default
"weston.ini".

Note, that Weston will only set WESTON_CONFIG_FILE, it never reads it.
The ability to specify a custom config file to load will be another patch.

All programs that loaded "weston.ini" are modified to honour
WESTON_CONFIG_FILE.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agocompositor: move code into load_configuration()
Pekka Paalanen [Tue, 24 Mar 2015 13:56:18 +0000 (15:56 +0200)]
compositor: move code into load_configuration()

Move the config file loading code from main() to its own function.

No functional changes.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoshared: fail reading a directory as a config file
Pekka Paalanen [Tue, 24 Mar 2015 13:56:17 +0000 (15:56 +0200)]
shared: fail reading a directory as a config file

open() will happily open directories and other non-normal files.
Attempting to parse them as config files makes no sense, so check that
the opened file is indeed a regular file.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agotests: use MODDIR in weston-tests-env
Pekka Paalanen [Tue, 24 Mar 2015 13:56:16 +0000 (15:56 +0200)]
tests: use MODDIR in weston-tests-env

Make a little short-hand for the module directory.

This also cleans up the redefinition of BACKEND in the script.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agocompositor: postpone unhandled option check
Pekka Paalanen [Tue, 24 Mar 2015 13:56:15 +0000 (15:56 +0200)]
compositor: postpone unhandled option check

Move the code that checks for unhandled command line options only after
all the module loading. We pass argc, argv to all module loaders, so
modules might want to have command line options, but you cannot use them
if the check is too early.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agopixman-renderer: use pre-computed inverse output matrix
Derek Foreman [Tue, 24 Mar 2015 16:36:16 +0000 (11:36 -0500)]
pixman-renderer: use pre-computed inverse output matrix

We've already computer the inverse of the output matrix, so we
don't need to calculate it again here.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agozoom: fix zoom
Derek Foreman [Tue, 24 Mar 2015 16:36:15 +0000 (11:36 -0500)]
zoom: fix zoom

Right now zoom only works on the output at 0, 0 because it's adding
the output corner co-ordinates to global co-ordinates that already
include the output offset.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agocompositor: fix weston_output_transform_coordinate
Derek Foreman [Tue, 24 Mar 2015 16:36:14 +0000 (11:36 -0500)]
compositor: fix weston_output_transform_coordinate

weston_output_transform_coordinate() was supposed to convert from device
co-ordinates to global co-ordinates.

Commit 0f67941c broke that by converting from global to device instead,
which just magically works ok for single untransformed outputs (where the
transformation is identity)

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agocompositor: Create the inverse of the output matrix
Derek Foreman [Tue, 24 Mar 2015 16:36:13 +0000 (11:36 -0500)]
compositor: Create the inverse of the output matrix

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoxwayland: Correct input for undecorated clients
Jasper St. Pierre [Sun, 22 Mar 2015 04:24:43 +0000 (21:24 -0700)]
xwayland: Correct input for undecorated clients

We were correctly handling decorated and fullscreen clients, but left
uninitialized values in the input region for undecorated clients. Fix
this behavi-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoinput: Don't recreate the cursor sprite when only the hotspot changes
Derek Foreman [Mon, 23 Mar 2015 15:55:32 +0000 (10:55 -0500)]
input: Don't recreate the cursor sprite when only the hotspot changes

Currently we unmap and re-map the cursor when the hotspot changes which
causes spurious enter/leave events.

This changes the pointer_set_cursor() logic to avoid this.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoplatform: rename create_egl_window to create_egl_surface
Jonny Lamb [Tue, 24 Mar 2015 12:12:09 +0000 (13:12 +0100)]
platform: rename create_egl_window to create_egl_surface

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoplatform: remove global variables
Jonny Lamb [Tue, 24 Mar 2015 12:12:08 +0000 (13:12 +0100)]
platform: remove global variables

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoplatform: provide platform_base fallbacks and remove ifdefs
Jonny Lamb [Tue, 24 Mar 2015 12:12:07 +0000 (13:12 +0100)]
platform: provide platform_base fallbacks and remove ifdefs

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agonested-client: include platform.h
Jonny Lamb [Tue, 24 Mar 2015 12:12:06 +0000 (13:12 +0100)]
nested-client: include platform.h

Missed because buliding nested clients requires cairo-glesv2.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agogl-renderer: provide platform_base fallbacks and remove ifdefs
Jonny Lamb [Tue, 24 Mar 2015 12:12:05 +0000 (13:12 +0100)]
gl-renderer: provide platform_base fallbacks and remove ifdefs

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agogl-renderer: call supports() automatically in create()
Jonny Lamb [Tue, 24 Mar 2015 12:12:04 +0000 (13:12 +0100)]
gl-renderer: call supports() automatically in create()

This means compositors don't need to call supports() manually and
create() will just return -1 in the failure case as before. This also
means we can deal with the case of eglGetProcAddress returning
non-NULL but not actually being available at runtime.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agocompositor-{drm, wayland, x11}: remove useless tests for ->supports
Jonny Lamb [Tue, 24 Mar 2015 12:12:03 +0000 (13:12 +0100)]
compositor-{drm, wayland, x11}: remove useless tests for ->supports

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agogl-renderer: move all EGL_PLATFORM_* defines here
Jonny Lamb [Tue, 24 Mar 2015 12:12:02 +0000 (13:12 +0100)]
gl-renderer: move all EGL_PLATFORM_* defines here

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agogl-renderer: fix build with --disable-egl
Jonny Lamb [Tue, 24 Mar 2015 12:12:01 +0000 (13:12 +0100)]
gl-renderer: fix build with --disable-egl

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agocompositor-{drm, x11, wayland}: stop including EGL headers here
Jonny Lamb [Tue, 24 Mar 2015 12:12:00 +0000 (13:12 +0100)]
compositor-{drm, x11, wayland}: stop including EGL headers here

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
9 years agoman: update weston's shells
Pekka Paalanen [Fri, 20 Mar 2015 13:59:01 +0000 (15:59 +0200)]
man: update weston's shells

Tablet shell is long gone. Might as well list what we have now.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
9 years agoclients & tests: use eglCreatePlatformWindowSurfaceEXT when supported
Jonny Lamb [Fri, 20 Mar 2015 14:26:53 +0000 (15:26 +0100)]
clients & tests: use eglCreatePlatformWindowSurfaceEXT when supported

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agogl-renderer: use eglCreatePlatformWindowSurfaceEXT to get EGLSurfaces
Jonny Lamb [Fri, 20 Mar 2015 14:26:52 +0000 (15:26 +0100)]
gl-renderer: use eglCreatePlatformWindowSurfaceEXT to get EGLSurfaces

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
9 years agoclients & tests: use eglGetPlatformDisplayEXT when supported
Jonny Lamb [Fri, 20 Mar 2015 14:26:51 +0000 (15:26 +0100)]
clients & tests: use eglGetPlatformDisplayEXT when supported

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>