Compare commits

...

8 Commits
main ... 1.11

Author SHA1 Message Date
Bryce Harrington
79d1925e8b configure.ac: bump to version 1.11.1 for the point release 2016-09-20 17:39:57 -07:00
Tom Hochstein
fc3dd183ed weston-launch: Handle invalid command line options
Exit the program if an unrecognized command line option is found.

Signed-off-by; Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-09-15 14:55:02 -07:00
Benoit Gschwind
e196c89d8d compositor-x11: fix title overflow in x11_backend_create_output
sprintf can overflow the fixed length title which is char[32]. This
patch change title to dynamically allocated char array using asprintf or
strdup. If one of them fail we leave returning NULL to indicate the
failure.

Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Signed-off-by: Daniel Stone <daniels@collabora.com>
2016-09-15 14:55:02 -07:00
Emmanuel Gil Peyrot
e8e4b3b4a6 Remove a wrong closing “extern "C"” in shared/xalloc.c
Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-09-15 14:55:02 -07:00
Yann E. MORIN
b5713c27c6 libweston/compositor-rdp: fix no-break space U+A0 (U8+C2A0)
There is a UTF-8 no-break space (U+A0, U8+C2A0) in the definition of
macro NSC_RESET in the case of  1.2.2 <= FreeRDP < 2.0.

This is causing build issues (\302 is 0xC2, \240 is 0xA0):
    http://autobuild.buildroot.net/results/f49/f49a9cbb7bdc5d9e05dcf0a20bd83f059e234e74/build-end.log

Fix that by using a plain, boring space U+20.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-09-15 14:55:02 -07:00
Derek Foreman
dd155bbf82 compositor-drm: Stop sending uninit data to the kernel
Valgrind noticed that we send uninit data to drmModeAddFB2.  While
the kernel should never read this (because of the plane format),
it's probably still nicer to zero the data before we send it.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-09-15 14:55:02 -07:00
Arnaud Vrac
a96e914239 fullscreen-shell: avoid access to freed data
Remove the output transform from the view transform list when its
surface is destroyed. The surface destruction also triggers the
freeing of its views, so the next access to the output transform link
could crash.

Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-09-15 14:55:02 -07:00
Derek Foreman
223c2f121a weston-editor: Close the data source after sending
We're leaking the fd when sending cut'n'paste.  Failure to close can also
makes the other end unhappy because it doesn't know the paste is finished.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-09-15 14:55:02 -07:00
8 changed files with 28 additions and 17 deletions

View File

@ -575,6 +575,8 @@ data_source_send(void *data,
if (write(fd, editor->selected_text, strlen(editor->selected_text) + 1) < 0)
fprintf(stderr, "write failed: %m\n");
close(fd);
}
static void

View File

@ -1,6 +1,6 @@
m4_define([weston_major_version], [1])
m4_define([weston_minor_version], [11])
m4_define([weston_micro_version], [0])
m4_define([weston_micro_version], [1])
m4_define([weston_version],
[weston_major_version.weston_minor_version.weston_micro_version])

View File

@ -234,6 +234,8 @@ surface_destroyed(struct wl_listener *listener, void *data)
surface_destroyed);
fsout->surface = NULL;
fsout->view = NULL;
wl_list_remove(&fsout->transform.link);
wl_list_init(&fsout->transform.link);
}
static void

View File

@ -47,8 +47,3 @@ fail_on_null(void *p, size_t size, char *file, int32_t line)
return p;
}
#ifdef __cplusplus
}
#endif

View File

@ -346,7 +346,7 @@ drm_fb_get_from_bo(struct gbm_bo *bo,
{
struct drm_fb *fb = gbm_bo_get_user_data(bo);
uint32_t width, height;
uint32_t handles[4], pitches[4], offsets[4];
uint32_t handles[4] = { 0 }, pitches[4] = { 0 }, offsets[4] = { 0 };
int ret;
if (fb)

View File

@ -57,7 +57,7 @@
# define NSC_RESET(C, W, H) nsc_context_reset(C, W, H)
# define RFX_RESET(C, W, H) rfx_context_reset(C, W, H)
#else
# define NSC_RESET(C, W, H) do { nsc_context_reset(C); C->width = W; C->height = H; } while(0)
# define NSC_RESET(C, W, H) do { nsc_context_reset(C); C->width = W; C->height = H; } while(0)
# define RFX_RESET(C, W, H) do { rfx_context_reset(C); C->width = W; C->height = H; } while(0)
#endif
#define FREERDP_CB_RET_TYPE BOOL

View File

@ -782,7 +782,7 @@ x11_backend_create_output(struct x11_backend *b, int x, int y,
{
static const char name[] = "Weston Compositor";
static const char class[] = "weston-1\0Weston Compositor";
char title[32];
char *title = NULL;
struct x11_output *output;
xcb_screen_t *screen;
struct wm_normal_hints normal_hints;
@ -800,11 +800,6 @@ x11_backend_create_output(struct x11_backend *b, int x, int y,
output_width = width * scale;
output_height = height * scale;
if (configured_name)
sprintf(title, "%s - %s", name, configured_name);
else
strcpy(title, name);
if (!no_input)
values[0] |=
XCB_EVENT_MASK_KEY_PRESS |
@ -871,9 +866,24 @@ x11_backend_create_output(struct x11_backend *b, int x, int y,
}
/* Set window name. Don't bother with non-EWMH WMs. */
xcb_change_property(b->conn, XCB_PROP_MODE_REPLACE, output->window,
b->atom.net_wm_name, b->atom.utf8_string, 8,
strlen(title), title);
if (configured_name) {
if (asprintf(&title, "%s - %s", name, configured_name) < 0)
title = NULL;
} else {
title = strdup(name);
}
if (title) {
xcb_change_property(b->conn, XCB_PROP_MODE_REPLACE, output->window,
b->atom.net_wm_name, b->atom.utf8_string, 8,
strlen(title), title);
free(title);
} else {
xcb_destroy_window(b->conn, output->window);
free(output);
return NULL;
}
xcb_change_property(b->conn, XCB_PROP_MODE_REPLACE, output->window,
b->atom.wm_class, b->atom.string, 8,
sizeof class, class);

View File

@ -703,6 +703,8 @@ main(int argc, char *argv[])
case 'h':
help("weston-launch");
exit(EXIT_FAILURE);
default:
exit(EXIT_FAILURE);
}
}