weston/clients
Pekka Paalanen fdca95c7db window: handle insufficient buffer space
It is quite possible for os_create_anonymous_file() to fail when trying
to allocate a new wl_shm buffer. Propagate this failure out from
shm_surface_prepare. Most parts of toytoolkit are already avoiding NULL
cairo surfaces.

If cairo surface allocation fails, do not try to call the widget redraw
functions, those are not prepared to deal with NULL. Also do not
schedule a frame callback, this allows us to retry drawing the next
time.

If redraw fails for the main_surface of a window, restore the widget
geometry to what the compositor currently is showing. This keeps the
window visual appearance in sync with application state, so interacting
with the application does not break too badly.

If the very first draw of any window fails, then forcefully exit the
program. E.g. if weston-desktop-shell fails to allocate buffers for the
unlock dialog, w-d-s exits, and weston unlocks the screen automatically.

This patch allows e.g. weston-terminal to stop from enlarging while
resizing, if new sized buffers can no longer the allocated. Even then,
the application stays usable, as it can often repaint in the last
successful size. It does not crash, and the user is able to resize it
smaller, too.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-12-02 16:20:58 -08:00
..
.gitignore protocol: move sub-surfaces to Wayland 2013-11-15 16:23:17 -08:00
calibrator.c Add touch support for wl_shell_surface_move 2013-08-16 10:56:00 -07:00
clickdot.c Rename frame_create and frame_set_child_size with a window_ prefix 2013-10-13 22:12:16 -07:00
cliptest.c Rename frame_create and frame_set_child_size with a window_ prefix 2013-10-13 22:12:16 -07:00
desktop-shell.c window, desktop-shell: deal with output unplug on client side 2013-10-23 22:36:37 -07:00
dnd.c distinguish touch screen and pointer dnd in client 2013-11-25 16:32:12 -08:00
editor.c Rename frame_create and frame_set_child_size with a window_ prefix 2013-10-13 22:12:16 -07:00
eventdemo.c Rename frame_create and frame_set_child_size with a window_ prefix 2013-10-13 22:12:16 -07:00
flower.c westoy: Remove window_touch_move 2013-11-13 16:37:36 -08:00
fullscreen.c westoy: Remove window_touch_move 2013-11-13 16:37:36 -08:00
gears.c Rename invocations of frame_create that were missed by ee7fefcf 2013-10-21 21:04:08 -07:00
glmatrix.c Add signedness warning flag and fix fallout 2012-03-30 11:52:39 -04:00
image.c westoy: Remove unused support for window parents 2013-11-13 16:43:03 -08:00
keyboard.c keyboard: Add rudimentary touch support to keyboard. 2013-09-03 22:49:16 -07:00
Makefile.am clients: Add a new weston-stacking demo 2013-12-02 11:44:50 -08:00
matrix3.xpm clients: import glmatrix.c and matrix3.xpm 2011-11-18 14:45:04 +02:00
multi-resource.c multi-resource: Don't include non-existing xmalloc.h 2013-10-10 19:21:05 -07:00
nested-client.c nested-client: Exit if we fail to create the nested client struct 2013-10-10 16:50:18 -07:00
nested.c Rename frame_create and frame_set_child_size with a window_ prefix 2013-10-13 22:12:16 -07:00
resizor.c terminal: Add context menu with new terminal/copy/paste 2013-10-23 16:52:05 -07:00
screenshot.c screenshooter: Add missing newline and use program_invocation_short_name 2013-08-12 22:15:38 -07:00
simple-egl.c simple-egl: Add support for using a 16 bpp EGLConfig 2013-10-15 22:03:41 -07:00
simple-shm.c Add more missing config.h #includes 2013-08-26 14:59:14 -07:00
simple-touch.c clients: remove superfluous call 2013-09-13 15:12:23 -07:00
smoke.c Add touch support for wl_shell_surface_move 2013-08-16 10:56:00 -07:00
stacking.c clients: Add a new weston-stacking demo 2013-12-02 11:44:50 -08:00
subsurfaces.c Rename frame_create and frame_set_child_size with a window_ prefix 2013-10-13 22:12:16 -07:00
tablet-shell.c tablet-shell: Avoid leaking icon or path strings from invalid launcher section 2013-10-10 16:50:18 -07:00
terminal.c terminal: add touch screen selection support 2013-11-25 11:26:00 -08:00
transformed.c westoy: Remove window_touch_move 2013-11-13 16:37:36 -08:00
view.c westoy: Remove unused support for window parents 2013-11-13 16:43:03 -08:00
weston-info.c weston-info: Handle shm formats better 2013-11-20 13:54:00 -08:00
weston-simple-im.c Add more missing config.h #includes 2013-08-26 14:59:14 -07:00
window.c window: handle insufficient buffer space 2013-12-02 16:20:58 -08:00
window.h clients: Add window_is_transient() helper to the toy toolkit window 2013-12-02 11:44:50 -08:00
wscreensaver-glue.c screensaver: fix decoding of transparency in xpm files 2012-09-06 21:08:12 -04:00
wscreensaver-glue.h Never include wayland-util.h directly 2011-11-22 09:35:14 -05:00
wscreensaver.c Rename invocations of frame_create that were missed by ee7fefcf 2013-10-21 21:04:08 -07:00
wscreensaver.h Add signedness warning flag and fix fallout 2012-03-30 11:52:39 -04:00