platform/upstream/weston.git
10 years agotests: add role conflict sub-surface vs. wl_shell_surface
Pekka Paalanen [Wed, 1 Oct 2014 13:34:48 +0000 (16:34 +0300)]
tests: add role conflict sub-surface vs. wl_shell_surface

Add tests for triggering the role conflict when a wl_surface is already
a wl_shell_surface and then attempted to be made into a sub-surface, and
vice versa.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
10 years agocompositor: send error for surface role resets
Pekka Paalanen [Wed, 1 Oct 2014 12:02:41 +0000 (15:02 +0300)]
compositor: send error for surface role resets

With the more accurate definition of wl_surface roles in Wayland,
enforce the restriction: a role is always set permanently, and
attempting to change it is a protocol error.

This patch is based on Jasper's patch:
http://lists.freedesktop.org/archives/wayland-devel/2014-August/016811.html

The difference in this patch compared to his are:

- send role errors on the interface whose request triggers it, not on
  wl_surface

- an interface could have several requests assigning different roles,
  cannot use wl_interface as the unique key; use an arbitary string
  instead

- ensure in window-manager.c that create_shell_surface() ->
  create_common_surface() is never called with surface->configure set,
  to avoid compositor abort

- use wl_resource_post_no_memory() where appropriate instead of
  hand-rolling it with wl_resource_post_error()

Ideally we would not add weston_surface::role_name field, but use
weston_surface::configure. At the moment this is not possible though,
because at least shell.c uses several different roles with the same
configure function. Drag'n'drop uses two configure functions for the
same role. The configure hook is also reset in several places,
which is not good for role tracking.

This patch overlooks the wl_surface roles assigned in privileged
extensions: screensaver, panel, background, lock, input panel.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
10 years agoprotocol: add role error code to xdg_shell
Pekka Paalanen [Wed, 1 Oct 2014 11:01:59 +0000 (14:01 +0300)]
protocol: add role error code to xdg_shell

Needed for properly reporting role violations from
xdg_shell.get_xdg_surface and .get_xdg_popup.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Acked-by: Jason Ekstrand <jason.ekstrand@intel.com>
10 years agoshell: don't crash on create_common_surface() failure
Pekka Paalanen [Wed, 1 Oct 2014 11:03:56 +0000 (14:03 +0300)]
shell: don't crash on create_common_surface() failure

Noticed while reading code, that create_common_surface() may return
NULL, and callers of its direct callers check for NULL, but the
intermediate function in between would crash.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoclients: add presentation-shm demo
Pekka Paalanen [Wed, 24 Sep 2014 02:08:49 +0000 (22:08 -0400)]
clients: add presentation-shm demo

This started as a copy of simple-shm.c before it was converted to
xdg_shell.

This demo excercises the presentation feedback interface in five
different modes:

- A continuous repaint loop triggered by frame callbacks, and using
  immediate commits, just gathering presentation feedback and computing
  some time intervals for statistics.

- The same as above, except with 1s sleep before actually repainting as
  a response to frame callback. This tests how well the compositor can
  do a repaint from idle state (not continuously repainting), assuming
  nothing else is causing repaints.

- A continuous repaint loop triggered by 'presented' events rather than
  by frame callbacks. If Weston uses an appropriate scheduling
  algorithm, this mode achieves the smallest possible frame latency
  (below one output refresh period).

In all modes, all frames are pre-rendered at startup, so no rendering
happens during the animation.

[Louis-Francis Ratté-Boulianne: split queuing feature]

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
10 years agotests: presentation test, simple
Pekka Paalanen [Wed, 24 Sep 2014 02:08:48 +0000 (22:08 -0400)]
tests: presentation test, simple

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agocompositor-drm: deliver frame seq for feedback
Pekka Paalanen [Wed, 24 Sep 2014 02:08:47 +0000 (22:08 -0400)]
compositor-drm: deliver frame seq for feedback

Add 'msc' field to weston_output to maintain the refresh counter, and
use it in presentation_feedback.presented.

Make compositor-drm update the per-output refresh counter with the
values reported by DRM. If the DRM reported value jumps backwards,
assume it wrapped around once.

Other backends do not update weston_output::msc, and there
presentation_feedback will always deliver refresh counter as zero.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
v3 Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>

10 years agocompositor: implement presentation_feedback
Pekka Paalanen [Wed, 24 Sep 2014 02:08:46 +0000 (22:08 -0400)]
compositor: implement presentation_feedback

Implement the presentation.feedback request, and the
presentation_feedback protocol interface. Feedback information is
delivered to clients as the backend reports it, except the refresh
counter (MSC) which is always reported as zero.

Changes in v4:

* add 'flags' argument to 'presented' event without implementation

Changes in v5:

* remove the 'destroy' method implementation for feedback objects
  [Pekka Paalanen: do not leak struct feedback.]

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
v3 Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>

10 years agocompositor: set and use the presentation clock everywhere
Pekka Paalanen [Wed, 24 Sep 2014 02:08:45 +0000 (22:08 -0400)]
compositor: set and use the presentation clock everywhere

Add presentation clock setters that verify the given clock actually
works. Offer an automatic choice of a software fallback clock, when a
backend has to always use clock_gettime() to approximate the
presentation time.

The DRM backend already queried the DRM about the clock id, just let the
DRM backend set the presentation clock from that.

For all other backends which do not get a timestamp from the driver,
call the software clock setter to choose a suitable clock.

Report the chosen clock via presentation.clock_id event to clients.

In finish_frame(), upgrade the argument from uint32_t milliseconds to
struct timespec which can accurately hold the presentation clock values.
This will be needed when weston_output_finish_frame() starts to send out
presentation_feedback.presented events.

While at it, replace gettimeofday() calls with clock_gettime() using the
chosen presentation clock, so we manufacture presentation timestamps
from the presentation clock when the gfx drivers cannot give us a proper
timestamp.

Rpi patch is more verbose due to not having the compositor pointer
available in rpi_flippipe_update_complete(). Explicitly carry the clock
id with flippipe so it is available in the thread.

Changes in v4:

* rpi debug build fix

v4 Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
v3 Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>

10 years agoweston-info: report presentation clock
Pekka Paalanen [Wed, 24 Sep 2014 02:08:44 +0000 (22:08 -0400)]
weston-info: report presentation clock

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
v3 Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>

10 years agocompositor: add stub implementation of presentation interface
Pekka Paalanen [Wed, 24 Sep 2014 02:08:43 +0000 (22:08 -0400)]
compositor: add stub implementation of presentation interface

You can bind to the global interface, and it delivers a fake clock id.
All requests on it raise an error.

Changes in v4:

* queuing methods were extractracted for a later series

[Louis-Francis Ratté-Boulianne: split queuing feature]

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
10 years agoprotocol: add presentation extension v5
Pekka Paalanen [Wed, 24 Sep 2014 02:08:42 +0000 (22:08 -0400)]
protocol: add presentation extension v5

Add accurate presentation timing features to Wayland: queueing and
feedback.

This specification is based on the draft written by Frederic Plourde
<frederic.plourde@collabora.co.uk> and redesigned by Pekka Paalanen.

The RFC v2 version is from
http://lists.freedesktop.org/archives/wayland-devel/2014-January/012988.html

Changes in v3:

* associate presentation time to current surface contents

This implements the suggestion from
http://lists.freedesktop.org/archives/wayland-devel/2014-February/013066.html

which prevents surface content from jumping backwards in time if a
client retroactively queues an update with a target time in the past.

* use 64-bit tv_sec in presentation

The time_t type used in struct timespec could be almost anything. POSIX
probably defines it to be an integer, but not the size. Apparently it is
usually 'long', which makes it 64-bit on x86_64.

To be able to fully represent timespec values returned by clock_gettime,
change the protocol to use 64 bits for the tv_sec part.

* define an error for invalid tv_nsec

This allow us to rely on the normalized timestamp form.

* define some interactions with sub-surfaces

Sub-surface cached state updates (synchronized mode) are designed
especially for resizing. As queued updates are not meant to produce any
resizing-like effects, they also do not trigger any sub-surface
operations.

* add sub-headings as xml comments

* queued update cannot map

Because before mapping, the surface has no main output assigned. An
immediate commit is needed anyway, to be able to set all the surface
state, which a queued update cannot touch.

* frame callbacks are not queued

It is not known when queueing frame callbacks would be useful.

Changes in v4:

* remove mentions of the queuing feature

The specification has been split and the queuing feature will be added
back in another version of the extension.

* add flags argument to 'presented' event

Describe the nature of how the update was presented to screen and the
characteristics of the feedback information. No flags have been
defined for now.

* add a protocol error code for invalid flags

Changes in v5:

* remove the destroy method for the feedback object

The protocol object should instead be automatically destroyed after
a 'presented' or 'discarded' event has been triggered.

* some grammatical corrections to the specification

[Louis-Francis Ratté-Boulianne: split the spec in two parts]

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
v3 Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>

10 years agoshell: fix weston_output_mode_switch() usage
Derek Foreman [Fri, 19 Sep 2014 19:43:23 +0000 (14:43 -0500)]
shell: fix weston_output_mode_switch() usage

Calling weston_output_mode_switch() with WESTON_MODE_SWITCH_RESTORE_NATIVE
will result in the mode being set "back" to the passed in mode - so the
passed mode should be the native mode.

Additionally, weston_output_mode_switch() should be called when
output->original_mode is non-NULL (which indicates we had a temporary
mode set).  The comparison to current_mode results in a lot of
log chatter.

Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoclients: Maximize window when double touch on title bar
Xiong Zhang [Thu, 12 Jun 2014 03:06:26 +0000 (11:06 +0800)]
clients: Maximize window when double touch on title bar

Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
10 years agocosmetic: Move WL_EXPORT out of header files
Derek Foreman [Thu, 18 Sep 2014 21:46:49 +0000 (16:46 -0500)]
cosmetic: Move WL_EXPORT out of header files

Most of the code only puts WL_EXPORT in .c files.  Remove the few
instances in header files.

If it's missing form the associated .c, put it there instead.

10 years agocosmetic: Remove prototype for nonexistent function
Derek Foreman [Thu, 18 Sep 2014 21:46:48 +0000 (16:46 -0500)]
cosmetic: Remove prototype for nonexistent function

10 years agoconfigure.ac: bump version to 1.6.90
Pekka Paalanen [Mon, 22 Sep 2014 07:02:17 +0000 (10:02 +0300)]
configure.ac: bump version to 1.6.90

Open master for new features again.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoconfigure.ac: bump version to 1.6.0 1.6.0
Pekka Paalanen [Fri, 19 Sep 2014 10:40:14 +0000 (13:40 +0300)]
configure.ac: bump version to 1.6.0

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoeditor: do not crash when text input manager is not available
Olivier Blin [Tue, 16 Sep 2014 17:13:17 +0000 (19:13 +0200)]
editor: do not crash when text input manager is not available

[Pekka Paalanen: whitespace fix]

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agokeyboard: do not crash when input panel is not available
Olivier Blin [Tue, 16 Sep 2014 17:13:16 +0000 (19:13 +0200)]
keyboard: do not crash when input panel is not available

[Pekka Paalanen: whitespace fix]

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agocompositor-x11: Rename the output make to "weston-X11"
Jason Ekstrand [Mon, 15 Sep 2014 19:10:27 +0000 (12:10 -0700)]
compositor-x11: Rename the output make to "weston-X11"

Previously all outputs in the X11 backend had the make "xwayland" which is
confusing.  Now they have something that makes a little more sense.

10 years agowindow: Don't needlessly sync parent and geometry
Ondřej Majerech [Sat, 13 Sep 2014 14:35:45 +0000 (16:35 +0200)]
window: Don't needlessly sync parent and geometry

When a toytoolkit client redraws, the toolkit syncs the parent and
geometry. If a client redraws often (such as the terminal drawing a huge
amount of output), this can spam the compositor with requests and may
result in the client's eventual being killed.

We don't need to send requests for changing the geometry or parent if
these haven't changed. So remember the last geometry and parent, and
update them only if needed.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83297
Signed-off-by: Ondřej Majerech <majerech.o@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoconfigure.ac: bump version 1.5.93 for rc2 1.5.93
Pekka Paalanen [Fri, 12 Sep 2014 09:45:08 +0000 (12:45 +0300)]
configure.ac: bump version 1.5.93 for rc2

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agolibinput: default to INFO log level
Pekka Paalanen [Fri, 12 Sep 2014 09:07:43 +0000 (12:07 +0300)]
libinput: default to INFO log level

Set the default logging level from libinput to INFO. This matches better
the behaviour of the old input backend, and prints the found input
devices into Weston's log.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Jonas Ådahl <jadahl@gmail.com>
10 years agolibinput-device: Don't get initial key states
Jonas Ådahl [Thu, 11 Sep 2014 21:35:58 +0000 (23:35 +0200)]
libinput-device: Don't get initial key states

Initial key state is no pressed keys, and the libinput_device_get_keys
function was deprecated in libinput 0.6.0.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
10 years agolibinput: normalize WL_CALIBRATION before passing it to libinput
Peter Hutterer [Tue, 9 Sep 2014 03:02:25 +0000 (13:02 +1000)]
libinput: normalize WL_CALIBRATION before passing it to libinput

WL_CALIBRATION, introduced in weston-1.1, requires the translation component
of the calibration matrix to be in screen coordinates. libinput does not have
access to this and it's not a very generic way to do this anyway. So with
the libinput backend, WL_CALIBRATION support is currently broken (#82742).
This cannot be fixed in libinput without changing its API for this specific
use-case.

This patch lets weston take care of WL_CALIBRATION. It takes the original
format and normalizes it before passing it to libinput. This way libinput
still does the coordinate transformation, weston just needs to provide the
initial configuration.

Note that this needs an updated libinput, otherwise libinput will try to
transform coordinates as well.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82742
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agocompositor: Don't free an uninitialised pointer.
Ondřej Majerech [Thu, 11 Sep 2014 13:53:15 +0000 (15:53 +0200)]
compositor: Don't free an uninitialised pointer.

When backend_init returns NULL, we goto out_signals, which wants to
free(modules), but in this particular code path, modules hasn't been
initialised leading to a "Double-free or corruption" error message.
Initialising modules to NULL makes the free a no-op in this scenario.

Signed-off-by: Ondřej Majerech <majerech.o@gmail.com>
Reviewed-by: Ryo Munakata <ryomnktml@gmail.com>
10 years agoimage: don't print redundant error
Bill Spitzak [Wed, 20 Aug 2014 01:13:11 +0000 (18:13 -0700)]
image: don't print redundant error

This error is printed by load_image() now

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoload_image: always print a message on failure if filename is not empty
Bill Spitzak [Wed, 20 Aug 2014 01:13:10 +0000 (18:13 -0700)]
load_image: always print a message on failure if filename is not empty

It was rather inconsistent before. This may help users figure out why
backgrounds and icons don't show up. A better api where the error can
be queried might be nice, but this seems sufficient for current Weston use.

[Pekka Paalanen: removed one stray space.]

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoparse_options: fail on more malformed options
Bill Spitzak [Wed, 20 Aug 2014 01:13:09 +0000 (18:13 -0700)]
parse_options: fail on more malformed options

Fail on trailing text after numbers, such as --width=100mm

Fail on any text after booleans, such as --flag=false

Also fixed reading of memory after the null terminator of a long
option with no = sign in it.

[Pekka Paalanen: some whitespace style fixes.]

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agocosmetic: update comments that refer to weston_surface_update_transform()
Derek Foreman [Wed, 10 Sep 2014 20:37:33 +0000 (15:37 -0500)]
cosmetic: update comments that refer to weston_surface_update_transform()

weston_surface_update_transform() no longer exists, except in comments.

Fix that.

[Pekka Paalanen: don't lose the full comment in compositor-drm.c.]

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoPartially revert "xdg-shell: Add show_window_menu request"
Pekka Paalanen [Wed, 10 Sep 2014 12:10:30 +0000 (15:10 +0300)]
Partially revert "xdg-shell: Add show_window_menu request"

This reverts the parts of commit 81ff075bf48c55cd07e37784e20c310fa52ed926
that touch window.c.

This brings the toytoolkit window context menus back, until someone
implements the xdg-shell equivalent in the compositor.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82972
Acked-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoxdg-shell: fix maximizing in multi-head setup
Marek Chalupa [Mon, 1 Sep 2014 15:20:33 +0000 (17:20 +0200)]
xdg-shell: fix maximizing in multi-head setup

Set the right position of maximized window. Up until now we ignored
output's "position" and were using only the working area
of output which is in output-relative coordinates. This led to
showing the maximized window always on the first output.

This, along with the previous patch, fixes
https://bugs.freedesktop.org/show_bug.cgi?id=82967

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoxdg-shell: update shsurf->output when maximizing
Marek Chalupa [Mon, 8 Sep 2014 10:34:20 +0000 (12:34 +0200)]
xdg-shell: update shsurf->output when maximizing

shsurf->output is the output that user expects the shell surface
is on. When maximizing, we don't have any explicit setting of the output
like in the case of fullscreening, so set the output to the one that
the surface is currently on. In the case that the surface is not mapped yet,
(if it ever happens) use the same heuristics as for fullscreening.

This fixes the size sent with configure event, when maximizing a window.
The size is now picked up by the correct output, but the maximized
window position is still wrong. [Pekka Paalanen]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82967
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoinput: Schedule pointer sprite repaint when cursor is set
Jonas Ådahl [Mon, 8 Sep 2014 17:33:41 +0000 (19:33 +0200)]
input: Schedule pointer sprite repaint when cursor is set

If a cursor was set with wl_pointer.set_cursor but not in combination
with an action that has the side effect of damaging the region where the
cursor is positioned, it would not be drawn. This patch explicitly
schedules a repaint of the pointer sprite when it is set.

clickdot is updated to illustrate the bug; when moving the pointer over
clickdot, the pointer is hidden. When not having moved the pointer for
500 ms it is made visible using wl_pointer.set_pointer.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agocompositor: fix memory corruption when removing an output
Giulio Camuffo [Sat, 6 Sep 2014 13:18:02 +0000 (16:18 +0300)]
compositor: fix memory corruption when removing an output

The destructor set on the wl_output resources needs the weston_output
to be allocated, because it removes the resource from its list.
So unset the destructor on all the resources when destroying an
output.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agomain: don't leak option strings
Ryo Munakata [Fri, 5 Sep 2014 22:32:51 +0000 (07:32 +0900)]
main: don't leak option strings

[Pekka Paalanen: fix a long line]

Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agocompositor: extract choose_default_backend and create_listening_socket
Ryo Munakata [Fri, 5 Sep 2014 22:32:05 +0000 (07:32 +0900)]
compositor: extract choose_default_backend and create_listening_socket

Extract these two new functions from main() to improve readability.
Refactoring only, no functioncal changes.

[Pekka Paalanen: commit message]

Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agocompositor: remove unused signal
Giulio Camuffo [Fri, 5 Sep 2014 20:26:33 +0000 (23:26 +0300)]
compositor: remove unused signal

The move_signal in weston_output isn't used, and not even initialized,
so anything trying to listen to it will crash on wl_signal_add().
Instead of it, the 'output_moved_signal' in weston_compositor is
used, so remove it.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoFix a copy-paste error in weston_surface_commit_state
Jason Ekstrand [Sat, 6 Sep 2014 16:01:28 +0000 (09:01 -0700)]
Fix a copy-paste error in weston_surface_commit_state

10 years agoconfigure.ac: bump version to 1.5.92 for rc1 1.5.92
Pekka Paalanen [Fri, 5 Sep 2014 12:05:56 +0000 (15:05 +0300)]
configure.ac: bump version to 1.5.92 for rc1

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agofix asprintf warnings
Pekka Paalanen [Fri, 5 Sep 2014 11:45:09 +0000 (14:45 +0300)]
fix asprintf warnings

Fix recently introduced compiler warnings:

desktop-shell/shell.c: In function 'shell_configuration':
desktop-shell/shell.c:588:10: warning: ignoring return value of
'asprintf', declared with attribute warn_unused_result [-Wunused-result]

src/screenshooter.c: In function ‘screenshooter_binding’:
src/screenshooter.c:291:10: warning: ignoring return value of
‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]

src/text-backend.c: In function ‘text_backend_configuration’:
src/text-backend.c:944:10: warning: ignoring return value of ‘asprintf’,
declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoxdg-shell: handle clients launched in fullscreen
Marek Chalupa [Tue, 2 Sep 2014 09:35:12 +0000 (11:35 +0200)]
xdg-shell: handle clients launched in fullscreen

When client is lauched in fullscreen, it is placed on the
first output, because it is not mapped and
shell_surface_set_output() therefore sets default output.

Since we have no better way how to position newly created windows,
(http://lists.freedesktop.org/archives/wayland-devel/2014-May/thread.html#14568)
set the output to the one that has currently focus. Priority has
the touch focus, then pointer and then keyboard focus.

This fixes bug
https://bugs.freedesktop.org/show_bug.cgi?id=69780

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agomatrix-test: fix units in report
Derek Foreman [Thu, 4 Sep 2014 19:31:30 +0000 (14:31 -0500)]
matrix-test: fix units in report

The matrix-test speed tests are calculated in ns but some printed the
units as us

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agotouch-input: Don't dereference NULL pointer during full screen fade
Derek Foreman [Thu, 4 Sep 2014 15:23:05 +0000 (10:23 -0500)]
touch-input: Don't dereference NULL pointer during full screen fade

If a full screen program is fading out and a touch start happens, it
will result in a NULL pointer dereference when weston_touch_set_focus
tries to derefernce view->surface->resource.

Instead, this patch sets the focus to NULL, which should be the
same as if the program was destroyed during the touch anyway.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=78706
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoclients: Maximize window when double click on title bar
Xiong Zhang [Thu, 12 Jun 2014 03:06:25 +0000 (11:06 +0800)]
clients: Maximize window when double click on title bar

Signed-off-by: Xiong Zhang <panda0626@gmail.com>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoxwm: Do not activate override redirect windows
Boyan Ding [Sat, 30 Aug 2014 02:33:23 +0000 (10:33 +0800)]
xwm: Do not activate override redirect windows

We shouldn't do WM-y things on an O-R window, including setting input
focus to it.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=81273
Signed-off-by: Boyan Ding <stu_dby@126.com>
Tested-by: Ryo Munakata <ryomnktml@gmail.com>
Acked-by: Christopher Michael <cp.michael@samsung.com>
10 years agodesktop-shell: implement touch popup grabs
Jonny Lamb [Wed, 20 Aug 2014 09:27:10 +0000 (11:27 +0200)]
desktop-shell: implement touch popup grabs

Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agopixman-renderer: copy_to_hw_buffer: don't leak output_region
Ryo Munakata [Wed, 3 Sep 2014 16:56:53 +0000 (01:56 +0900)]
pixman-renderer: copy_to_hw_buffer: don't leak output_region

This was reported by Valgrind.

Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agopixman-renderer: fail to zoom more gracefully
Derek Foreman [Mon, 1 Sep 2014 15:33:28 +0000 (10:33 -0500)]
pixman-renderer: fail to zoom more gracefully

When zoom is activated in the pixman rendered the log is filled with warnings
and all rendering stops.  With this patch the warning is generated once and
rendering continues without zooming.

Closes bug 80258

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=80258
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoxwm: Check whether the seat is NULL when needed in weston_wm_handle_button
Boyan Ding [Wed, 3 Sep 2014 09:25:30 +0000 (17:25 +0800)]
xwm: Check whether the seat is NULL when needed in weston_wm_handle_button

XCB and wayland input event handling exists together in xwm, which can
cause problems. weston_wm_handle_button is called via XCB events, while
it calls weston_wm_pick_seat_for_window, which uses info from compositor
(pure wayland). It is also true in setting and removing flags of frames.
Races can happen in between, when resize of moving flag of the frame is
still set while the button has been released, the picked seat will be
NULL in weston_wm_handle_button, causing crash. We can safely ignore
moving or resizing if this happens. The same applies to c06a180d.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=82827
Signed-off-by: Boyan Ding <stu_dby@126.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agocompositor: add an option to set the default numlock value
Giulio Camuffo [Thu, 28 Aug 2014 16:44:10 +0000 (19:44 +0300)]
compositor: add an option to set the default numlock value

Add a new "numlock-on" option in the [keyboard] section of weston.ini
which, if set to true, is used to enable the numlock of the keyboards
attached at startup.

Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agocompositor: add a way to change the keyboard locks
Giulio Camuffo [Thu, 28 Aug 2014 16:44:09 +0000 (19:44 +0300)]
compositor: add a way to change the keyboard locks

This adds a function weston_keyboard_set_locks() which can be used to
change the state of the num lock and the caps locks, changing the leds too.
Only the evdev and libinput backends supports this, since it doesn't make
sense for embedded sessions.

Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoshell: quit weston, if weston-desktop-shell dies early
Pekka Paalanen [Thu, 28 Aug 2014 08:41:26 +0000 (11:41 +0300)]
shell: quit weston, if weston-desktop-shell dies early

If weston-desktop-shell dies soon after launch, or maybe cannot be
executed at all, let weston exit rather than letting the user stare at a
black screen.

But, do not exit weston, if weston-desktop-shell dies later, as the user
may already have apps open, and those apps would likely still function
correctly. This gives the user the opportunity to save his work and
close the apps properly.

This should make one class of "I see only black screen" failures obvious.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
10 years agopixman-renderer: free shadow buffer on renderer destruction
Arnaud Vrac [Mon, 25 Aug 2014 18:56:52 +0000 (20:56 +0200)]
pixman-renderer: free shadow buffer on renderer destruction

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agodesktop-shell: properly set background widget as opaque
Arnaud Vrac [Mon, 25 Aug 2014 18:56:49 +0000 (20:56 +0200)]
desktop-shell: properly set background widget as opaque

Toytoolkit resets the opaque region which was set manually using the
wayland protocol directly, so use the widget API instead.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agosimple-egl: fix opaque and 16 bits mode options
Arnaud Vrac [Mon, 25 Aug 2014 18:56:48 +0000 (20:56 +0200)]
simple-egl: fix opaque and 16 bits mode options

In those cases we were writing to the wrong EGL config attribute.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agomulti-resource: remove an unnecessary call of wl_display_get_fd()
Ryo Munakata [Thu, 28 Aug 2014 09:35:27 +0000 (18:35 +0900)]
multi-resource: remove an unnecessary call of wl_display_get_fd()

Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agosimple-shm: remove an unnecessary call of wl_display_get_fd()
Ryo Munakata [Tue, 26 Aug 2014 12:59:41 +0000 (21:59 +0900)]
simple-shm: remove an unnecessary call of wl_display_get_fd()

Reviewed-by: Nils Chr. Brause <nilschrbrause@gmail.com>
10 years agocompositor: leave no zombie behind
Pekka Paalanen [Wed, 27 Aug 2014 10:31:26 +0000 (13:31 +0300)]
compositor: leave no zombie behind

When SIGCHLD fires, we may have more than one zombie to be collected.
Run waitpid() in a loop until no more zombies are found, and clean them
all up.

It looks like the SIGCHLD signalfd does not trigger again for remaining
zombies, so we need the loop.

This works around a crash in text_backend_notified_destroy, which ends
up using stale input_method.client if the sigchld handler is not called.
The crash could be triggered by removing both weston-desktop-shell and
weston-keyboard, so that both would try to respawn and give up, and then
quitting Weston.

Cc: rawoul@gmail.com
Cc: Boyan Ding <stu_dby@126.com>
Cc: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
10 years agoshell: fix race on desktop-shell exit
Pekka Paalanen [Wed, 27 Aug 2014 09:11:53 +0000 (12:11 +0300)]
shell: fix race on desktop-shell exit

The desktop shell plugin registers both a wl_client destroy signal
listener, and a sigchld handler, when launching weston-desktop-shell.
However, nothing guarantees in which order do the wl_client destructor
and the sigchld handler run.

Luckily, the sigchld handler cannot interrupt any code, because we
handle the signal via signalfd, which means it is handled like any event
in the compositor's main event loop.

Still, shell.c has a race, that when lost, can cause a crash, as
described in bug #82957.

If the sigchld handler happens to run first, it will try to launch a new
weston-desktop-shell without removing the destroy listener from the old
wl_client first. This leads to list corruption, that may cause a crash
when the old wl_client gets destroyed.

Simply removing the destroy listener in the sigchld handler is not
enough, because respawning sets shell->child.client pointer, and if
the wl_client destructor runs after, it will reset it to NULL.

OTOH, the wl_client destroy handler cannot reset shell->child.process,
because that would cause the sigchld handler in weston core to not find
the process tracker anymore, and report that an unknown process exited.

Turns out, that to make everything work, we would need to wait for both
the wl_client destructor and the sigchld handler to have run, before
respawn. This gets tricky.

Instead, solve the problem by removing shell->child.process. Use the new
weston_client_start() which automatically creates and manages the struct
weston_process. The shell does not need to know about the process exit,
it only needs to know about the client disconnect. Weston-desktop-shell
will never attempt to reconnect, and it would not work even if it did,
so disconnect is equivalent to weston-desktop-shell exiting.

This should permanently solve the race for weston-desktop-shell.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82957
Cc: Boyan Ding <stu_dby@126.com>
Cc: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
10 years agocompositor: add weston_client_start()
Pekka Paalanen [Wed, 27 Aug 2014 09:03:38 +0000 (12:03 +0300)]
compositor: add weston_client_start()

weston_client_start() is a new wrapper around weston_client_launch(),
that does the process tracking on its own, and logs the process exit
status.

When users of weston_client_start() want to know when the process exits,
they should hook into the wl_client destroy signal. This works for cases
where the client is not expected to disconnect without exiting.

As wl_client destructor and the sigchld handler run in arbitary order,
it is usually difficult for users to maintain both struct weston_process
and a struct wl_client pointer. You would need to wait for both
destructor and handler to have run, before attempting to respawn the
client.

This new function relieves the caller from the burden of maintaining the
struct weston_process, assuming the caller is only interested in client
disconnects.

Cc: Boyan Ding <stu_dby@126.com>
Cc: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
10 years agowm: Don't subtract the margins from the configured size
Jasper St. Pierre [Wed, 27 Aug 2014 13:38:33 +0000 (09:38 -0400)]
wm: Don't subtract the margins from the configured size

When we moved the configure event size to being based on the window
geometry, we changed the coordinates of the configure request to being
frame geometry based. Frame geometry includes titlebar and border, but
not shadow margins.

Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agodesktop-shell: fix invalid memory access when shell execution fails
Arnaud Vrac [Mon, 25 Aug 2014 18:56:46 +0000 (20:56 +0200)]
desktop-shell: fix invalid memory access when shell execution fails

In this case wl_client_add_destroy_listener() was called with a NULL
client, which is invalid.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agonested: add missing egl extension declaration
Arnaud Vrac [Mon, 25 Aug 2014 18:56:45 +0000 (20:56 +0200)]
nested: add missing egl extension declaration

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agowindow: unbind egl surface and context on surface release
Arnaud Vrac [Mon, 25 Aug 2014 18:56:43 +0000 (20:56 +0200)]
window: unbind egl surface and context on surface release

Binding null read and write surfaces to an egl context is not standard

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoDocument output/scale configuration option in the weston.ini man page.
Magnus Hoff [Mon, 25 Aug 2014 11:22:11 +0000 (13:22 +0200)]
Document output/scale configuration option in the weston.ini man page.

v2: Different, hopefully better, wording. This patch entirely replaces
the previous similar patch I sent.

v3: Now including the correct patch. Please disregard the "v2" mail.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agodesktop-shell: Replace magic constants with named ones
Ondřej Majerech [Thu, 21 Aug 2014 13:47:22 +0000 (15:47 +0200)]
desktop-shell: Replace magic constants with named ones

Signed-off-by: Ondřej Majerech <majerech.o@gmail.com>
Reviewed-by: Nils Chr. Brause <nilschrbrause@gmail.com>
10 years agoprotocol: fix a wrong word in wl_viewport.set_source
Pekka Paalanen [Wed, 27 Aug 2014 12:46:22 +0000 (15:46 +0300)]
protocol: fix a wrong word in wl_viewport.set_source

Obvious this affects the source, not destination.

Reported-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoxwayland: Clean up the WM properly if X server crashes
Dima Ryazanov [Thu, 19 Jun 2014 08:03:31 +0000 (01:03 -0700)]
xwayland: Clean up the WM properly if X server crashes

The X cleanup code uses wxs->wm to check if the WM has been created - but that
variable was never initialized. So if X crashes, the WM doesn't get destroyed,
causing a crash when it tries to repaint a window.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoconfigure.ac: require libwayland 1.5.91
Pekka Paalanen [Tue, 26 Aug 2014 10:26:13 +0000 (13:26 +0300)]
configure.ac: require libwayland 1.5.91

Compositor needs the wl_surface error enums and the keyboard repeat info
protocol added in 1.5.91.

weston-info, window.c, and Weston's wayland backend need also the
keyboard repeat info.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoconfigure.ac: Bump version to 1.5.91 for the alpha release 1.5.91
Pekka Paalanen [Fri, 22 Aug 2014 15:09:54 +0000 (18:09 +0300)]
configure.ac: Bump version to 1.5.91 for the alpha release

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agotests: allow running make check without make install
Derek Foreman [Thu, 21 Aug 2014 16:32:38 +0000 (11:32 -0500)]
tests: allow running make check without make install

desktop shell and weston keyboard both refer to themselves prefixed by
LIBEXECDIR, however this is only valid once installed.  make check will
currently either fail or run pre-existing versions.

This patch adds a way to override that location by setting the env var
WESTON_BUILD_DIR - which is then set by the test env script so make check
will test the versions in the build directory regardless of whether they're
installed or not.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agobuild: do not run xwayland test for distcheck
Pekka Paalanen [Wed, 20 Aug 2014 09:11:04 +0000 (12:11 +0300)]
build: do not run xwayland test for distcheck

The Xwayland test has been broken ever since the migration to the
stand-alone Xwayland server binary.

Disable the test, so 'make distcheck' can actually run.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Boyan Ding <stu_dby@126.com>
10 years agobuild: use AM_DISTCHECK_CONFIGURE_FLAGS
Pekka Paalanen [Wed, 20 Aug 2014 09:08:37 +0000 (12:08 +0300)]
build: use AM_DISTCHECK_CONFIGURE_FLAGS

According to
http://www.gnu.org/software/automake/manual/html_node/Checking-the-Distribution.html
the DISTCHECK_CONFIGURE_FLAGS is for the user, while
AM_DISTCHECK_CONFIGURE_FLAGS is the one to use in Makefile.am.

Make it so.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Boyan Ding <stu_dby@126.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
10 years agoxdg-shell: bump experimental protocol version
Pekka Paalanen [Thu, 21 Aug 2014 14:47:20 +0000 (17:47 +0300)]
xdg-shell: bump experimental protocol version

The experimental versioning has not been updated when it was supposed
to. Let's try to be better at it now, as xdg-shell is close to have its
first stable version.

Bump the version now to bring the world into the same exact version.

There may be some protocol changes still coming, but we try to land them
before 1.6 gets out. Those changes will bump the experimental version
again as needed.

When 1.6.0 is released, the experimental version will no longer be
bumped, and no incompatible protocol changes will be made. Xdg-shell.xml
file will move to Wayland in 1.7.0, drop the experimental versioning,
and become stable.

Cc: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoweston-test: check if resource is not NULL
Marek Chalupa [Fri, 11 Jul 2014 10:33:02 +0000 (12:33 +0200)]
weston-test: check if resource is not NULL

and post client_no_memory if is...

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoscreen-share: Add screen-share command to weston.ini man page
Andrew Wedgbury [Thu, 26 Jun 2014 15:31:43 +0000 (16:31 +0100)]
screen-share: Add screen-share command to weston.ini man page

This adds a description of the screen-share command configuration key to the
weston.ini man page.

[Pekka Paalanen: removed the sentence about default value, because the
default value is empty, and AFAIU cannot work.]

Signed-off-by: Andrew Wedgbury <andrew.wedgbury@realvnc.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agodesktop-shell: use panel location to calculate correct sizes and ranges
Jonny Lamb [Wed, 20 Aug 2014 13:53:20 +0000 (15:53 +0200)]
desktop-shell: use panel location to calculate correct sizes and ranges

Now the client can let us know where the panel is using
desktop_shell.set_panel_position, we can correctly calculate where to
put new views and how big maximized views should be.

Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agodesktop-shell: add set_panel_position to help place views onscreen
Jonny Lamb [Wed, 20 Aug 2014 13:53:19 +0000 (15:53 +0200)]
desktop-shell: add set_panel_position to help place views onscreen

Panels are always assumed to be on the top edge of the output. If this
is not the case views will be placed under the panel, wherever it is,
and maximize doesn't use the correct space allocated for views.

By telling the server on which edge the panel is located, it can
correctly calculate where to put new views and how big maximized views
should be.

[Pekka Paalanen: the user of this protocol so far is Maynard.]

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoweston.ini.man: Add libinput section
Jonas Ådahl [Tue, 19 Aug 2014 19:56:12 +0000 (21:56 +0200)]
weston.ini.man: Add libinput section

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
10 years agobuild: cliptest uses also vertex-clipping.h
Pekka Paalanen [Wed, 20 Aug 2014 08:58:47 +0000 (11:58 +0300)]
build: cliptest uses also vertex-clipping.h

Add it to the list of source files.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agocliptest: sync calculate_edges with master copy
Pekka Paalanen [Wed, 20 Aug 2014 07:35:26 +0000 (10:35 +0300)]
cliptest: sync calculate_edges with master copy

The master copy of calculate_edges() lives nowadays in gl-renderer.c.
Copy it verbatim from gl-renderer.c into cliptest.c.

Update cliptest.c for the following changes that happened in Weston
core, vertex.clipping.c, and gl-renderer.c:
- replace GLfloat with float
- introduction of weston_view, here replacing weston_surface
- API change of weston_view_to_global_float

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoDon't underrun the vertex array of empty polygons
Ondřej Majerech [Tue, 19 Aug 2014 13:59:45 +0000 (15:59 +0200)]
Don't underrun the vertex array of empty polygons

This silences the following warning:
  src/vertex-clipping.c:196:22: warning: array subscript is below array
  bounds [-Warray-bounds]
    ctx->prev.x = src->x[src->n - 1];

[Pekka Paalanen: the src->n < 2 comparison comes from the fact that a
polygon with 0 or 1 points is not a polygon. A polygon with 2 points is
still degenerate, but at least it has two edges that can be clipped.]

Signed-off-by: Ondřej Majerech <oxyd.oxyd@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoRemove duplicated code from cliptest.c
Ondřej Majerech [Tue, 19 Aug 2014 13:59:44 +0000 (15:59 +0200)]
Remove duplicated code from cliptest.c

Signed-off-by: Ondřej Majerech <oxyd.oxyd@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoDon't protect xkb_*_unref from NULL
Ran Benita [Tue, 19 Aug 2014 20:59:52 +0000 (23:59 +0300)]
Don't protect xkb_*_unref from NULL

Since xkbcommon-0.3.0, which is required by weston, a NULL argument
doesn't do anything.

Signed-off-by: Ran Benita <ran234@gmail.com>
10 years agoReplace deprecated xkbcommon symbols with current names
Ran Benita [Tue, 19 Aug 2014 20:59:51 +0000 (23:59 +0300)]
Replace deprecated xkbcommon symbols with current names

These symbols (xkb_map_* and others) were replaced in xkbcommon with more
consistent names. See the header xkbcommon/xkbcommon-compat.h for how
the old names map to the new.

The new names have been available since the first stable xkbcommon
release (0.2.0).

Signed-off-by: Ran Benita <ran234@gmail.com>
10 years agoconfigure.ac: use libinput by default
Pekka Paalanen [Tue, 19 Aug 2014 10:09:00 +0000 (13:09 +0300)]
configure.ac: use libinput by default

Libinput is stabilizing soon, so let's flip the default switch now. The
old input code will still be carried as an option for a while.

Cc: Peter Hutterer <peter.hutterer@who-t.net>
Cc: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Acked-by: Jonas Ådahl <jadahl@gmail.com>
10 years agocairo-util: Draw solid titlebar for frames with only buttons
Boyan Ding [Tue, 5 Aug 2014 07:22:04 +0000 (15:22 +0800)]
cairo-util: Draw solid titlebar for frames with only buttons

Previously geometry was changed to leave space for titlebar if a frame
has only buttons but no title. This patch fixes theme_render_frame to
avoid transparent titlebar.

Signed-off-by: Boyan Ding <stu_dby@126.com>
10 years agoxwm: check whether the picked seat can be NULL
Boyan Ding [Sun, 6 Jul 2014 03:44:58 +0000 (11:44 +0800)]
xwm: check whether the picked seat can be NULL

The seat picked in weston_wm_window_handle_moveresize can sometimes
be NULL when it is (somehow) triggered with all buttons released.

This patch checks whether the seat is NULL to avoid NULL dereference.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=80837
Signed-off-by: Boyan Ding <stu_dby@126.com>
10 years agocliptest: Avoid use of uninitialized memory when regions don't intersect
Derek Foreman [Mon, 18 Aug 2014 21:13:41 +0000 (16:13 -0500)]
cliptest: Avoid use of uninitialized memory when regions don't intersect

Prevent attempting to draw the intersection polygon when it contains no
vertices.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agoweston-scaler --help works even if not run inside wayland
Bill Spitzak [Fri, 8 Aug 2014 20:00:00 +0000 (13:00 -0700)]
weston-scaler --help works even if not run inside wayland

10 years agoweston-image --help works. Also help if no filename is given
Bill Spitzak [Fri, 8 Aug 2014 19:59:59 +0000 (12:59 -0700)]
weston-image --help works. Also help if no filename is given

10 years agoweston-editor --help works
Bill Spitzak [Fri, 8 Aug 2014 19:59:58 +0000 (12:59 -0700)]
weston-editor --help works

10 years agoweston-dnd --help works
Bill Spitzak [Fri, 8 Aug 2014 19:59:57 +0000 (12:59 -0700)]
weston-dnd --help works

10 years agoweston-cliptest --help works. You must use -b to run benchmark
Bill Spitzak [Fri, 8 Aug 2014 19:59:56 +0000 (12:59 -0700)]
weston-cliptest --help works. You must use -b to run benchmark

10 years agoweston-terminal --help and other command-line options
Bill Spitzak [Fri, 8 Aug 2014 19:59:55 +0000 (12:59 -0700)]
weston-terminal --help and other command-line options

Option array existed but was unused. Added --font-size.

10 years agoMade weston-screensaver --help work
Bill Spitzak [Fri, 8 Aug 2014 19:59:54 +0000 (12:59 -0700)]
Made weston-screensaver --help work

10 years agoMade weston-subsurfaces --help work
Bill Spitzak [Fri, 8 Aug 2014 19:59:53 +0000 (12:59 -0700)]
Made weston-subsurfaces --help work

10 years agoMade weston-nested --help work
Bill Spitzak [Fri, 8 Aug 2014 19:59:52 +0000 (12:59 -0700)]
Made weston-nested --help work