platform/upstream/weston.git
11 years agomalloc + memset -> zalloc
Peter Hutterer [Thu, 8 Aug 2013 01:57:05 +0000 (11:57 +1000)]
malloc + memset -> zalloc

And for clients using the xmalloc helper, use xzalloc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoAdd zalloc(size_t) allocator function
Peter Hutterer [Thu, 8 Aug 2013 01:57:04 +0000 (11:57 +1000)]
Add zalloc(size_t) allocator function

Same as calloc(1, len).

11 years agocms-colord: Don't redefine _GNU_SOURCE
Armin K [Wed, 7 Aug 2013 15:45:23 +0000 (17:45 +0200)]
cms-colord: Don't redefine _GNU_SOURCE

warning: "_GNU_SOURCE" redefined [enabled by default]

See commit c228e23b

11 years agoclients: use xmalloc in more places
Brian Lovin [Wed, 7 Aug 2013 22:34:59 +0000 (15:34 -0700)]
clients: use xmalloc in more places

For the clients continue to use xmalloc() to simplify OOM-handling.

Signed-off-by: Brian Lovin <brian.j.lovin@intel.com>
11 years agogl-renderer: Only check for subimage when we have extension at compile time
Kristian Høgsberg [Wed, 7 Aug 2013 19:11:27 +0000 (12:11 -0700)]
gl-renderer: Only check for subimage when we have extension at compile time

If weston is compiled against a gl2ext.h that doesn't have the subimage
extension, but then run against a gles2 library that does provide it,
we end up disabling the glTexImage2D falback without having the subimage
code paths compiled in.

11 years agoAdd workaround for broken GL_EXT_unpack_subimage tokens
Kristian Høgsberg [Wed, 7 Aug 2013 19:05:08 +0000 (12:05 -0700)]
Add workaround for broken GL_EXT_unpack_subimage tokens

Earlier versions of gl2ext.h defined the GL_EXT_unpack_subimage tokens
without the _EXT suffix.  That's been fixed and we're using the _EXT
tokens now, but just in case we're using an older, broken header, define
the _EXT tokens manually.

11 years agogl-renderer.c: Cast wl_resource to void * to avoid warning
Kristian Høgsberg [Wed, 7 Aug 2013 18:59:54 +0000 (11:59 -0700)]
gl-renderer.c: Cast wl_resource to void * to avoid warning

The extension has been updated to take a wl_resource * now, but to avoid
warnings when compiling against older versions, just cast to void *.

11 years agogl-renderer: Test for GL_EXT_unpack_subimage not GL_UNPACK_ROW_LENGTH
Kristian Høgsberg [Wed, 7 Aug 2013 16:55:07 +0000 (09:55 -0700)]
gl-renderer: Test for GL_EXT_unpack_subimage not GL_UNPACK_ROW_LENGTH

It is defined by the mesa #include, which is just a copy of the official
Khronos header.  It's just defined in a different section than the
extension tokens.  In the mean time, the extension tokens were renamed
to add a _EXT suffix (eg GL_UNPACK_ROW_LENGTH -> GL_UNPACK_ROW_LENGTH_EXT)
and we silently failed to used the subimage extension.

11 years agonested: Update to use weston-nested-client binary name
Kristian Høgsberg [Wed, 7 Aug 2013 16:50:12 +0000 (09:50 -0700)]
nested: Update to use weston-nested-client binary name

11 years agoUse #define WL_HIDE_DEPRECATED to avoid deprecated warnings for wl_buffer
Kristian Høgsberg [Wed, 7 Aug 2013 02:27:04 +0000 (19:27 -0700)]
Use #define WL_HIDE_DEPRECATED to avoid deprecated warnings for wl_buffer

11 years agoclients: Fix typo in simple-touch and simple-shm.
Stefan Schmidt [Mon, 5 Aug 2013 12:50:50 +0000 (13:50 +0100)]
clients: Fix typo in simple-touch and simple-shm.

listenter -> listener. Better fix it now before it spreads further.

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
11 years agoDrop extraneous duplicate header includes
Bryce Harrington [Tue, 6 Aug 2013 00:37:20 +0000 (17:37 -0700)]
Drop extraneous duplicate header includes

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
11 years agorpi: Add support for SHM buffers in RGB565 format
Tomeu Vizoso [Tue, 6 Aug 2013 18:05:57 +0000 (20:05 +0200)]
rpi: Add support for SHM buffers in RGB565 format

11 years agopixman-renderer: Add support for SHM buffers in RGB565 format
Tomeu Vizoso [Tue, 6 Aug 2013 18:05:56 +0000 (20:05 +0200)]
pixman-renderer: Add support for SHM buffers in RGB565 format

11 years agogl-renderer: Add support for SHM buffers in RGB565 format
Tomeu Vizoso [Tue, 6 Aug 2013 18:05:55 +0000 (20:05 +0200)]
gl-renderer: Add support for SHM buffers in RGB565 format

11 years agowindow: Allow hinting of a preference for RGB565 when creating a window
Tomeu Vizoso [Tue, 6 Aug 2013 18:05:54 +0000 (20:05 +0200)]
window: Allow hinting of a preference for RGB565 when creating a window

And check if the renderer supports the RGB565 format for wl_shm buffers
before creating the cairo surface and requesting the buffer.

It can save quite some memory with big surfaces such as desktop
backgrounds.

11 years agocompositor: Check wl_resource_create() return value
Kristian Høgsberg [Tue, 6 Aug 2013 23:46:25 +0000 (16:46 -0700)]
compositor: Check wl_resource_create() return value

This fixes a number of call-sites to properly check for NULL and return
the no memory event when allocation fail.

11 years agodata-device.c: Handle failure to allocate offer in weston_drag_set_focus
Kristian Høgsberg [Tue, 6 Aug 2013 17:31:12 +0000 (10:31 -0700)]
data-device.c: Handle failure to allocate offer in weston_drag_set_focus

If we fail to allocate and send the offer, don't send the drag enter and
don't set the drag focus so we don't send motion events or leave.

11 years agodata-device.c: Handle OOM in weston_data_source_send_offer()
Kristian Høgsberg [Tue, 6 Aug 2013 17:24:04 +0000 (10:24 -0700)]
data-device.c: Handle OOM in weston_data_source_send_offer()

If we fail to allocate the resource, clean up and return NULL.

11 years agodesktop-shell: Refactor launcher configuration reading to avoid leaking
Rob Bradford [Fri, 26 Jul 2013 15:29:45 +0000 (16:29 +0100)]
desktop-shell: Refactor launcher configuration reading to avoid leaking

11 years agocompositor-x11: Don't leak the looked up name for skipped outputs
Rob Bradford [Fri, 26 Jul 2013 15:29:44 +0000 (16:29 +0100)]
compositor-x11: Don't leak the looked up name for skipped outputs

11 years agowindow: Free the allocated display if we fail to setup libxkbcommon
Rob Bradford [Fri, 26 Jul 2013 15:29:43 +0000 (16:29 +0100)]
window: Free the allocated display if we fail to setup libxkbcommon

11 years agotablet-shell: Avoid leaking the path on failed icon loading
Rob Bradford [Fri, 26 Jul 2013 15:29:42 +0000 (16:29 +0100)]
tablet-shell: Avoid leaking the path on failed icon loading

11 years agoimage: Free filename saved into structure on error path
Rob Bradford [Fri, 26 Jul 2013 15:29:41 +0000 (16:29 +0100)]
image: Free filename saved into structure on error path

11 years agocompositor-drm: Use a format width parameter for the modeline sscanf
Rob Bradford [Fri, 26 Jul 2013 15:29:40 +0000 (16:29 +0100)]
compositor-drm: Use a format width parameter for the modeline sscanf

11 years agocompositor-fbdev: Close fd used for re-enabling if that fails
Rob Bradford [Fri, 26 Jul 2013 15:29:39 +0000 (16:29 +0100)]
compositor-fbdev: Close fd used for re-enabling if that fails

The device will be opened again in fbdev_output_create().

11 years agocompositor-fbdev: Avoid dereferencing a pointer in freed memory
Rob Bradford [Fri, 26 Jul 2013 15:29:38 +0000 (16:29 +0100)]
compositor-fbdev: Avoid dereferencing a pointer in freed memory

fbdev_output_destroy will free the memory passed into in and since we
want to pass the device name into fbdev_output_create we need to save
this to an intermediate value

11 years agotty: Correctly check if the opening of the file descriptor failed
Rob Bradford [Fri, 26 Jul 2013 15:29:37 +0000 (16:29 +0100)]
tty: Correctly check if the opening of the file descriptor failed

11 years agowcap-decode: Close file descriptor when destroying the decoder
Rob Bradford [Fri, 26 Jul 2013 15:29:36 +0000 (16:29 +0100)]
wcap-decode: Close file descriptor when destroying the decoder

11 years agodrm: close the drm file descriptor when the compositor is destroyed
Rob Bradford [Fri, 26 Jul 2013 15:29:35 +0000 (16:29 +0100)]
drm: close the drm file descriptor when the compositor is destroyed

11 years agoautotools: Correctly prefix simple-egl client name
Armin K [Tue, 30 Jul 2013 09:47:03 +0000 (11:47 +0200)]
autotools: Correctly prefix simple-egl client name

11 years agoweston-launch: Fix signal mask typo
Eduardo Lima [Tue, 30 Jul 2013 17:43:41 +0000 (10:43 -0700)]
weston-launch: Fix signal mask typo

11 years agoweston-launch: Unblock our signalfd signals before execing child
Kristian Høgsberg [Tue, 30 Jul 2013 16:45:04 +0000 (09:45 -0700)]
weston-launch: Unblock our signalfd signals before execing child

Giovanni Campagna ran into this with mutter.

11 years agoclipboard: remove the weston_seat destruction listener on destroy
Rob Bradford [Wed, 24 Jul 2013 15:57:33 +0000 (16:57 +0100)]
clipboard: remove the weston_seat destruction listener on destroy

Prior to freeing the memory in which the link node for the signal is
emedded we should remove the link node from the list to prevent the list
from being corrupted.

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

11 years agotext-backend: remove the weston_seat destruction listener on destroy
Rob Bradford [Wed, 24 Jul 2013 15:57:32 +0000 (16:57 +0100)]
text-backend: remove the weston_seat destruction listener on destroy

Prior to freeing the memory in which the link node for the signal is
emedded we should remove the link node from the list to prevent the list
from being corrupted.

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

11 years agoscreenshot: Drop extraneous 'is' to improve warning msg grammar
Bryce W. Harrington [Tue, 23 Jul 2013 21:53:26 +0000 (21:53 +0000)]
screenshot: Drop extraneous 'is' to improve warning msg grammar

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
11 years agoReset touch focus in unmap
Michael Fu [Tue, 23 Jul 2013 07:51:06 +0000 (15:51 +0800)]
Reset touch focus in unmap

Otherwise, there will be race condition of visiting invalid surface data.

11 years agoxwayland: Remove transform listener when destroying the wm
Louis-Francis Ratté-Boulianne [Sat, 20 Jul 2013 04:16:45 +0000 (05:16 +0100)]
xwayland: Remove transform listener when destroying the wm

Fix a segfault occuring after the last X window was closed.

11 years agoautotools: Add an option to install demo clients
Armin K [Sun, 14 Jul 2013 15:26:23 +0000 (17:26 +0200)]
autotools: Add an option to install demo clients

This patch adds a configure option which will enable
user to install demo clients if desired. It is disabled
by default.

v2: Remove AC_DEFINE as it is not necesary

11 years agoautotools: Rename demo clients
Armin K [Sun, 14 Jul 2013 15:26:22 +0000 (17:26 +0200)]
autotools: Rename demo clients

Prefix demo clients names with weston-, so they can
be installed if user desires.

11 years agoevdev: Suport old-style single-touch touch screens
Kristian Høgsberg [Fri, 26 Jul 2013 17:43:26 +0000 (10:43 -0700)]
evdev: Suport old-style single-touch touch screens

These screens send only BTN_TOUCH and ABS_X/Y.

11 years agoevdev: Use temporary x and y coordinates when applying calibration
Kristian Høgsberg [Fri, 26 Jul 2013 17:41:43 +0000 (10:41 -0700)]
evdev: Use temporary x and y coordinates when applying calibration

Don't overwrite device->abs.x halfway through the matrix multiplication.

11 years agoevdev: Don't add output offset in evdev_process_absolute_motion()
Kristian Høgsberg [Fri, 26 Jul 2013 17:40:32 +0000 (10:40 -0700)]
evdev: Don't add output offset in evdev_process_absolute_motion()

We do that in weston_output_transform_coordinate() now.

11 years agowindow.c: Simplify window_create()
Kristian Høgsberg [Thu, 25 Jul 2013 23:53:10 +0000 (16:53 -0700)]
window.c: Simplify window_create()

11 years agoUse xmalloc in desktop-shell.c
Kristian Høgsberg [Thu, 25 Jul 2013 23:44:45 +0000 (16:44 -0700)]
Use xmalloc in desktop-shell.c

11 years agocompositor-x11: Use assert(0) instead of return NULL for non-reachable code
Kristian Høgsberg [Thu, 25 Jul 2013 23:42:30 +0000 (16:42 -0700)]
compositor-x11: Use assert(0) instead of return NULL for non-reachable code

11 years agowindow.c: Use xmalloc for frame_create()
Kristian Høgsberg [Thu, 25 Jul 2013 23:25:15 +0000 (16:25 -0700)]
window.c: Use xmalloc for frame_create()

11 years agocliptest: Use xmalloc in cliptest
Kristian Høgsberg [Thu, 25 Jul 2013 23:24:36 +0000 (16:24 -0700)]
cliptest: Use xmalloc in cliptest

11 years agoclipboard: Fix fd leak
Kristian Høgsberg [Thu, 25 Jul 2013 23:21:41 +0000 (16:21 -0700)]
clipboard: Fix fd leak

We never closed the reading end of the pipe after copying data to the
clipboard.

11 years agoRename wl_data_offer to weston_data_offer
Kristian Høgsberg [Thu, 25 Jul 2013 23:09:37 +0000 (16:09 -0700)]
Rename wl_data_offer to weston_data_offer

Another left-over from when we moved the input structs.

11 years agoudev: Use WL_OUTPUT udev attribute for pairing touchscreens to outputs
Kristian Høgsberg [Mon, 22 Jul 2013 22:11:11 +0000 (15:11 -0700)]
udev: Use WL_OUTPUT udev attribute for pairing touchscreens to outputs

11 years agoweston-launch: Switch to regular poll
Kristian Høgsberg [Tue, 23 Jul 2013 18:43:03 +0000 (11:43 -0700)]
weston-launch: Switch to regular poll

epoll doesn't provide any convenince here and is just awkward to use.

11 years agoweston-launch: Don't start new session unless -u is given
Kristian Høgsberg [Mon, 22 Jul 2013 17:35:47 +0000 (10:35 -0700)]
weston-launch: Don't start new session unless -u is given

11 years agoweston-launch: Drop sleep_fork option
Kristian Høgsberg [Sat, 20 Jul 2013 04:26:24 +0000 (21:26 -0700)]
weston-launch: Drop sleep_fork option

11 years agoweston-launch: Move child setup and exec to its own function
Kristian Høgsberg [Sat, 20 Jul 2013 04:25:20 +0000 (21:25 -0700)]
weston-launch: Move child setup and exec to its own function

11 years agoRename wl_data_source to weston_data_source
Kristian Høgsberg [Thu, 25 Jul 2013 22:52:14 +0000 (15:52 -0700)]
Rename wl_data_source to weston_data_source

Missed this rename when we moved the input structs over from wayland.

11 years agoclipboard: Handle OOM in clipboard_source_create()
Kristian Høgsberg [Thu, 25 Jul 2013 22:32:55 +0000 (15:32 -0700)]
clipboard: Handle OOM in clipboard_source_create()

11 years agoclients: Introduce xmalloc() and use it a few places
Kristian Høgsberg [Thu, 25 Jul 2013 22:20:20 +0000 (15:20 -0700)]
clients: Introduce xmalloc() and use it a few places

For the sample clients we introduce xmalloc() to simplify OOM-handling.
This patch only converts a few callsites, but this will be our strategy
going forward.

11 years agoshared: Add out-of-memory handling to theme_create()
Kristian Høgsberg [Thu, 25 Jul 2013 22:05:35 +0000 (15:05 -0700)]
shared: Add out-of-memory handling to theme_create()

11 years agocompositor: Move weston-launch socket lookup to drm backend
Kristian Høgsberg [Tue, 23 Jul 2013 19:24:00 +0000 (12:24 -0700)]
compositor: Move weston-launch socket lookup to drm backend

This is the only backend that uses the launcher, so let's set it
up there.

11 years agoshell: Remove redundant weston_pointer field from shell_grab
Kristian Høgsberg [Mon, 22 Jul 2013 23:31:53 +0000 (16:31 -0700)]
shell: Remove redundant weston_pointer field from shell_grab

This is already in weston_grab.

11 years agoevdev: Use weston_output_transform_coordinate for evdev touch screens
Kristian Høgsberg [Mon, 22 Jul 2013 22:09:30 +0000 (15:09 -0700)]
evdev: Use weston_output_transform_coordinate for evdev touch screens

11 years agocompositor: Move device coordinate transform helper to compositor.c
Kristian Høgsberg [Mon, 22 Jul 2013 21:33:42 +0000 (14:33 -0700)]
compositor: Move device coordinate transform helper to compositor.c

This function transform input coordinates from output space to
compositor space and is useful for X input as well as touch screen input.

11 years agosimple-touch: Attach buffer before posting damage
Kristian Høgsberg [Mon, 22 Jul 2013 21:32:41 +0000 (14:32 -0700)]
simple-touch: Attach buffer before posting damage

11 years agoweston-launch: Ignore sighup
Kristian Høgsberg [Mon, 22 Jul 2013 18:59:18 +0000 (11:59 -0700)]
weston-launch: Ignore sighup

When our session terminates all processes get a SIGHUP.  We need to ignore
that in weston-launch and stay around to help weston shut down properly.

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

11 years agoBump version to 1.2.0 1.2.0 upstream/1.2.0
Kristian Høgsberg [Sat, 13 Jul 2013 05:30:00 +0000 (01:30 -0400)]
Bump version to 1.2.0

11 years agowindow: Disregard motion events outside our current surface dimensions
Rob Bradford [Thu, 11 Jul 2013 18:41:27 +0000 (19:41 +0100)]
window: Disregard motion events outside our current surface dimensions

It is possible to receive a motion event that was generated by the
compositor based on a pick of a surface of old dimensions. This was
triggerable on toytoolkit clients when minimising. The new window
dimensions were propagated through the widget hierarchy before the event
was dispatched.

This issue was triggering a segfault due to the focussed widget being
lost as the client code tried to identify which widget should have the
focus using co-ordinates outside the dimensions of the surface.

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

11 years agoeditor: Support shift-left/right for selecting text
Rob Bradford [Thu, 11 Jul 2013 15:00:00 +0000 (16:00 +0100)]
editor: Support shift-left/right for selecting text

If the shift modifier is active then we don't make the cursor and the
anchor the same and as a result we develop a selection in the direction
that the arrow key gets pressed in.

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

11 years agoshell: Respect output transformation for input panel surface
Rob Bradford [Thu, 11 Jul 2013 12:20:53 +0000 (13:20 +0100)]
shell: Respect output transformation for input panel surface

Rather than using the dimensions in the mode we can use the recently
added output width and height members which are updated to reflect any
output rotation.

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

11 years agowindow: Allow popup menu when the window is maximised
Rob Bradford [Thu, 11 Jul 2013 09:35:55 +0000 (10:35 +0100)]
window: Allow popup menu when the window is maximised

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

11 years agowcap: Fix README typo
Peng Wu [Thu, 11 Jul 2013 07:19:53 +0000 (15:19 +0800)]
wcap: Fix README typo

11 years agoconfigure.ac: Set automake conditional after testing for colord pkg
Yanko Kaneti [Wed, 10 Jul 2013 16:01:36 +0000 (12:01 -0400)]
configure.ac: Set automake conditional after testing for colord pkg

11 years agoBump versionto 1.1.91 1.1.91
Kristian Høgsberg [Tue, 9 Jul 2013 23:51:54 +0000 (19:51 -0400)]
Bump versionto 1.1.91

11 years agoclients/editor.c: Draw cursor at correct verical position
Peter Maatman [Sat, 6 Jul 2013 18:55:54 +0000 (20:55 +0200)]
clients/editor.c: Draw cursor at correct verical position

With this patch, the editor cursor now moves up and down correctly
instead of having the top part stuck on the first line.

11 years agoclients/editor.c: Ignore ESC key
Peter Maatman [Sat, 6 Jul 2013 18:42:59 +0000 (20:42 +0200)]
clients/editor.c: Ignore ESC key

Otherwise, editor would print the "unknown UTF-8 glyph" boxes.

11 years agotablet-shell: Avoid infinite loop when unlocking
Rob Bradford [Tue, 9 Jul 2013 11:12:50 +0000 (12:12 +0100)]
tablet-shell: Avoid infinite loop when unlocking

weston_compositor_wake will fire the signal that the unlock handler is
setup as the listener for. Instead lets change the state to HOME which
unlocks.

11 years agotablet-shell: Fix copy and paste error in unlock handler
Rob Bradford [Tue, 9 Jul 2013 11:12:49 +0000 (12:12 +0100)]
tablet-shell: Fix copy and paste error in unlock handler

The signal handler was using the wrong member to find the containing
structure of the unlock listener.

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

11 years agoConvert to wl_global_create/destroy()
Kristian Høgsberg [Mon, 8 Jul 2013 23:03:57 +0000 (19:03 -0400)]
Convert to wl_global_create/destroy()

11 years agotests: Fix warnings in config-parser-test
Kristian Høgsberg [Mon, 8 Jul 2013 23:06:06 +0000 (19:06 -0400)]
tests: Fix warnings in config-parser-test

11 years agotests: Move config-parser.test to tests/
Quentin Glidic [Mon, 8 Jul 2013 22:06:24 +0000 (00:06 +0200)]
tests: Move config-parser.test to tests/

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
11 years agoUse the average width of ASCII glyphs for cell width
Peng Wu [Thu, 6 Jun 2013 07:32:41 +0000 (15:32 +0800)]
Use the average width of ASCII glyphs for cell width

As some CJK fonts are dual-width, calculate the average width of ASCII
glyphs and use that instead of the max_x_advance of the font.  This is
what VTE does too.

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

11 years agoinput: Remove wl_seat global when a seat is destroyed
Kristian Høgsberg [Mon, 8 Jul 2013 20:20:31 +0000 (16:20 -0400)]
input: Remove wl_seat global when a seat is destroyed

The input code was relying on compositor destruction to clean up the
global, but that doesn't work when the global comes and goes dynamically.

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

11 years agoxwayland: Don't allow resizing to 0x0 or less
Kristian Høgsberg [Mon, 8 Jul 2013 19:00:25 +0000 (15:00 -0400)]
xwayland: Don't allow resizing to 0x0 or less

X windows have to be at least 1x1 pixels.

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

11 years agoweston-launch: Fix the typo for real this time
Kristian Høgsberg [Mon, 8 Jul 2013 18:34:53 +0000 (14:34 -0400)]
weston-launch: Fix the typo for real this time

Thanks to MonkeyofDoom for point this out.  I'm still adjusting to the
fact that there's no 'd' in privilege, but I'll get over it.

11 years agocompositor: Eliminate marshalling warning for leave events
Kristian Høgsberg [Mon, 8 Jul 2013 17:49:36 +0000 (13:49 -0400)]
compositor: Eliminate marshalling warning for leave events

Don't NULL the resource pointer before calling weston_surface_destroy().
We use to have more of a distinction between compositor created surfaces
and client surfaces, and weston_surface_destroy couldn't be used for
client surfaces.  Now it all goes through weston_surface_destroy() and
we can remove the assert and the NULL-ing of resource, which caused the
marshalling warning.

11 years agoinput: check if the resource is valid in seat_get_pointer
Giulio Camuffo [Sun, 7 Jul 2013 15:38:50 +0000 (17:38 +0200)]
input: check if the resource is valid in seat_get_pointer

seat->pointer->focus->resource can be NULL, if the surface was
created with weston_surface_create.

11 years agoDocument RDP compositor options
Hardening [Sun, 7 Jul 2013 22:51:35 +0000 (00:51 +0200)]
Document RDP compositor options

Help was missing for the RDP compositor, this patch gives details
about available options.

11 years agoFix compilation with FreeRDP master
Hardening [Sun, 7 Jul 2013 22:51:34 +0000 (00:51 +0200)]
Fix compilation with FreeRDP master

context_size has been renamed to ContextSize, this patch fixes it

11 years agotests: Add .weston extension to clients tests
Quentin Glidic [Mon, 8 Jul 2013 13:33:25 +0000 (15:33 +0200)]
tests: Add .weston extension to clients tests

We can then add tests which do not use Weston in the test suite.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
11 years agoweston-launch: Fix an error message typo
Kristian Høgsberg [Mon, 8 Jul 2013 16:52:16 +0000 (12:52 -0400)]
weston-launch: Fix an error message typo

11 years agoweston-launch: Set all groups for user
Quentin Glidic [Wed, 19 Jun 2013 13:27:11 +0000 (15:27 +0200)]
weston-launch: Set all groups for user

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
https://bugs.freedesktop.org/show_bug.cgi?id=65933

11 years agocompositor: rebuild the global list if we've removed a surface from it
Rob Bradford [Wed, 26 Jun 2013 17:08:46 +0000 (18:08 +0100)]
compositor: rebuild the global list if we've removed a surface from it

The list of surfaces used by weston_compositor_pick_surface() is
maintained in list of surfaces stored on the compositor. This list is
generated from the surfaces across all the layers using
weston_compositor_build_surface_list.

When destroying a surface the surface is "unmapped" with
weston_surface_unmap which removes it from the layer list. However since
the compositor surface list was only being rebuilt when the output was
repainted a call to weston_compositor_pick_surface before the next
output repaint would use an outdated surface list containing surfaces
that have been partially destroyed.

https://bugs.freedesktop.org/show_bug.cgi?id=65986
https://bugs.freedesktop.org/show_bug.cgi?id=66173
https://bugs.freedesktop.org/show_bug.cgi?id=66198

11 years agodesktop-shell: Don't crash on output hotplug
Ander Conselvan de Oliveira [Fri, 5 Jul 2013 13:05:28 +0000 (16:05 +0300)]
desktop-shell: Don't crash on output hotplug

The panel and background were never created for hotplugged outputs and
since some parts of the code assume that they always exist that would
lead to desktop-shell client to crash in that case.

This was easier to spot when the display was locked, because Weston
respawns the shell client and the user might not notice since there is
no flicker.

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

11 years agodesktop-shell: Adapt to the new config parser API
Ander Conselvan de Oliveira [Fri, 5 Jul 2013 13:05:27 +0000 (16:05 +0300)]
desktop-shell: Adapt to the new config parser API

This lets the code for adding panel launchers and setting up the
background to be moved into panel_* and background_* functions.

Note that this changes the behavior of the default launcher. Before
this change a default launcher would be added only if there was no
config file. Now a launcher is also added if there is no valid
launcher section.

11 years agocompositor: Remove a plane from the compositor list when releasing it
Ander Conselvan de Oliveira [Fri, 5 Jul 2013 13:05:26 +0000 (16:05 +0300)]
compositor: Remove a plane from the compositor list when releasing it

Weston would crash when hot plugging/unplugging outputs using the DRM
backend due to a corrupted plane list.

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

11 years agotests: Rename xwayland_test to xwayland-test
Kristian Høgsberg [Thu, 4 Jul 2013 06:31:17 +0000 (02:31 -0400)]
tests: Rename xwayland_test to xwayland-test

Consitency.

11 years agoxwayland: Don't crash when we get configure notify for destroyed frame windows
Kristian Høgsberg [Thu, 4 Jul 2013 06:29:32 +0000 (02:29 -0400)]
xwayland: Don't crash when we get configure notify for destroyed frame windows

We can get a destroy notify for the frame window after we've removed it
from the hash table.  This turns into a NULL pointer deref when we look up
the window and try to use it for debugging printout.

Fixes the failing xwayland test case.

11 years agoshell: Always go through end_busy_cursor when ending the busy cursor grab
Kristian Høgsberg [Thu, 4 Jul 2013 05:12:17 +0000 (01:12 -0400)]
shell: Always go through end_busy_cursor when ending the busy cursor grab

11 years agoinput: Don't cache pointer grab interface between calls to focus and motion
Kristian Høgsberg [Thu, 4 Jul 2013 04:58:07 +0000 (00:58 -0400)]
input: Don't cache pointer grab interface between calls to focus and motion

The focus callback for the current grab can change the grab, so we have
to make sure we call the motion callback for the currently active grab.

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

11 years agoshell: Dont set grab cursor if desktop-shell client died
Kristian Høgsberg [Wed, 3 Jul 2013 23:24:57 +0000 (19:24 -0400)]
shell: Dont set grab cursor if desktop-shell client died

If we don't have a desktop-shell helper client, don't try to send events
to it.

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