Makefile.am | 2 clients/Makefile.am | 152 +++++++++-------- clients/calibrator.c | 17 ++ clients/clickdot.c | 4 clients/desktop-shell.c | 34 +++- clients/flower.c | 12 + clients/fullscreen.c | 12 + clients/image.c | 1 clients/nested.c | 12 - clients/screenshot.c | 26 ++- clients/simple-egl.c | 55 ++++++ clients/simple-shm.c | 6 clients/simple-touch.c | 7 clients/smoke.c | 24 ++ clients/tablet-shell.c | 2 clients/terminal.c | 4 clients/transformed.c | 12 + clients/weston-simple-im.c | 2 clients/window.c | 321 +++++++++++++++++++++++++++++++++++--- clients/window.h | 50 +++++ configure.ac | 98 ++++++++++- man/weston.ini.man | 7 src/Makefile.am | 3 src/clipboard.c | 11 + src/cms-colord.c | 1 src/cms-helper.h | 2 src/compositor-drm.c | 6 src/compositor-fbdev.c | 6 src/compositor-rdp.c | 2 src/compositor-x11.c | 71 +------- src/compositor.c | 98 ++++++++++- src/compositor.h | 7 src/data-device.c | 29 ++- src/evdev.c | 166 ++++++++++++------- src/evdev.h | 2 src/filter.h | 2 src/gl-renderer.c | 24 +- src/input.c | 33 +++ src/launcher-util.h | 2 src/pixman-renderer.h | 4 src/shell.c | 137 ++++++++++++++-- src/spring-tool.c | 2 src/text-backend.c | 1 src/tty.c | 2 src/udev-seat.c | 10 + src/udev-seat.h | 2 src/weston-egl-ext.h | 11 + src/weston-launch.c | 11 + src/xwayland/Makefile.am | 3 src/xwayland/hash.c | 2 src/xwayland/launcher.c | 10 - src/xwayland/window-manager.c | 52 ++---- src/xwayland/xwayland.h | 1 tests/Makefile.am | 3 tests/weston-test-client-helper.c | 2 wayland-scanner.mk | 8 wcap/main.c | 2 wcap/wcap-decode.c | 3 58 files changed, 1239 insertions(+), 352 deletions(-)
New commits: commit 5824af080d2477580832da990610b54fecb0710b Author: Kristian Høgsberg <k...@bitplanet.net> Date: Thu Aug 29 15:18:49 2013 -0700 configure.ac: Bump version to 1.2.2 diff --git a/configure.ac b/configure.ac index 9329755..f241ee3 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ m4_define([weston_major_version], [1]) m4_define([weston_minor_version], [2]) -m4_define([weston_micro_version], [1]) +m4_define([weston_micro_version], [2]) m4_define([weston_version], [weston_major_version.weston_minor_version.weston_micro_version]) commit 237c1c82bb0e487609a2e3e03bf33f9713cd24e0 Author: Kristian Høgsberg <k...@bitplanet.net> Date: Wed Aug 28 23:16:20 2013 -0700 shell: Make sure we have seat->pointer and seat->touch before dereferencing Either of these may not be available when we handle wl_shell_surface.move, and we need to not crash when that's the case. https://bugs.freedesktop.org/show_bug.cgi?id=68649 diff --git a/src/shell.c b/src/shell.c index c3dc347..0efdd1d 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1227,13 +1227,15 @@ shell_surface_move(struct wl_client *client, struct wl_resource *resource, struct shell_surface *shsurf = wl_resource_get_user_data(resource); struct weston_surface *surface; - surface = weston_surface_get_main_surface(seat->pointer->focus); - if (seat->pointer->button_count > 0 && seat->pointer->grab_serial == serial) { + if (seat->pointer && + seat->pointer->button_count > 0 && + seat->pointer->grab_serial == serial) { surface = weston_surface_get_main_surface(seat->pointer->focus); if ((surface == shsurf->surface) && (surface_move(shsurf, seat) < 0)) wl_resource_post_no_memory(resource); - } else if (seat->touch->grab_serial == serial) { + } else if (seat->touch && + seat->touch->grab_serial == serial) { surface = weston_surface_get_main_surface(seat->touch->focus); if ((surface == shsurf->surface) && (surface_touch_move(shsurf, seat) < 0)) commit 6048a357e2fb282a7460f01bd8d8ef90e2bbf7d9 Author: Kristian Høgsberg <k...@bitplanet.net> Date: Wed Aug 28 23:05:29 2013 -0700 gl-renderer: Use GL_UNSIGNED_SHORT for index array type GL_UNSIGNED_INT is only supported when GL_OES_element_index_uint is available (mesa implements that extension). We don't need 32-bit indices, so just use GL_UNSIGNED_SHORT. diff --git a/src/gl-renderer.c b/src/gl-renderer.c index 54da534..f43e954 100644 --- a/src/gl-renderer.c +++ b/src/gl-renderer.c @@ -856,7 +856,7 @@ texture_border(struct weston_output *output) struct weston_compositor *ec = output->compositor; struct gl_renderer *gr = get_renderer(ec); GLfloat *d; - unsigned int *p; + unsigned short *p; int i, j, k, n; GLfloat x[4], y[4], u[4], v[4]; @@ -956,7 +956,7 @@ draw_border(struct weston_output *output) glEnableVertexAttribArray(1); glDrawElements(GL_TRIANGLES, n * 6, - GL_UNSIGNED_INT, gr->indices.data); + GL_UNSIGNED_SHORT, gr->indices.data); glDisableVertexAttribArray(1); glDisableVertexAttribArray(0); commit 00ff1e1c473ea8fabf8f459c4bd32a73afb50916 Author: Samuel Iglesias Gonsalvez <sigles...@igalia.com> Date: Wed Aug 28 11:22:41 2013 +0200 configure.ac: fix broken compilation when configure with --disable-egl option Fix bug 67561: "configure with --disable-egl option breaks fbdev backend compilation" https://bugs.freedesktop.org/show_bug.cgi?id=67561 Signed-off-by: Samuel Iglesias Gonsalvez <sigles...@igalia.com> diff --git a/configure.ac b/configure.ac index 20c4ba8..9329755 100644 --- a/configure.ac +++ b/configure.ac @@ -190,7 +190,7 @@ AM_CONDITIONAL([ENABLE_FBDEV_COMPOSITOR], [test x$enable_fbdev_compositor = xyes]) AS_IF([test x$enable_fbdev_compositor = xyes], [ AC_DEFINE([BUILD_FBDEV_COMPOSITOR], [1], [Build the fbdev compositor]) - PKG_CHECK_MODULES([FBDEV_COMPOSITOR], [libudev >= 136 mtdev >= 1.1.0]) + PKG_CHECK_MODULES([FBDEV_COMPOSITOR], [libudev >= 136 mtdev >= 1.1.0 libdrm >= 2.4.30]) ]) AC_ARG_ENABLE([rdp-compositor], [ --enable-rdp-compositor],, commit c6b6e78c0d3b7e790f5c46db08868507b7b3ceb1 Author: Kristian Høgsberg <k...@bitplanet.net> Date: Wed Aug 28 22:12:24 2013 -0700 evdev: Don't transform device->abs.x/y in place We don't always get both an X and an Y event in a SYN report, so we end up transforming the coordinate we don't get twice. For example, if we only receive an ABS_X event, we transform the already transformed device->abs.y again in transform_absolute() when applying the calibration. diff --git a/src/evdev.c b/src/evdev.c index 7139989..51b99e6 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -236,33 +236,32 @@ is_motion_event(struct input_event *e) } static void -transform_absolute(struct evdev_device *device) +transform_absolute(struct evdev_device *device, int32_t *x, int32_t *y) { - int32_t x, y; - - if (!device->abs.apply_calibration) - return; - - x = device->abs.x * device->abs.calibration[0] + - device->abs.y * device->abs.calibration[1] + - device->abs.calibration[2]; - - y = device->abs.x * device->abs.calibration[3] + - device->abs.y * device->abs.calibration[4] + - device->abs.calibration[5]; - - device->abs.x = x; - device->abs.y = y; + if (!device->abs.apply_calibration) { + *x = device->abs.x; + *y = device->abs.y; + return; + } else { + *x = device->abs.x * device->abs.calibration[0] + + device->abs.y * device->abs.calibration[1] + + device->abs.calibration[2]; + + *y = device->abs.x * device->abs.calibration[3] + + device->abs.y * device->abs.calibration[4] + + device->abs.calibration[5]; + } } static void evdev_flush_motion(struct evdev_device *device, uint32_t time) { - struct weston_seat *master = device->seat; - wl_fixed_t x, y; - int slot; + struct weston_seat *master = device->seat; + wl_fixed_t x, y; + int32_t cx, cy; + int slot; - if (!(device->pending_events & EVDEV_SYN)) + if (!(device->pending_events & EVDEV_SYN)) return; slot = device->mt.slot; @@ -296,16 +295,15 @@ evdev_flush_motion(struct evdev_device *device, uint32_t time) if (device->pending_events & EVDEV_ABSOLUTE_MT_UP) { notify_touch(master, time, device->mt.slot, 0, 0, WL_TOUCH_UP); - device->pending_events &= ~EVDEV_ABSOLUTE_MT_UP; - } - if (device->pending_events & EVDEV_ABSOLUTE_MOTION) { - transform_absolute(device); - weston_output_transform_coordinate(device->output, - device->abs.x, - device->abs.y, &x, &y); - - if (device->caps & EVDEV_TOUCH) { - if (master->num_tp == 0) + device->pending_events &= ~EVDEV_ABSOLUTE_MT_UP; + } + if (device->pending_events & EVDEV_ABSOLUTE_MOTION) { + transform_absolute(device, &cx, &cy); + weston_output_transform_coordinate(device->output, + cx, cy, &x, &y); + + if (device->caps & EVDEV_TOUCH) { + if (master->num_tp == 0) notify_touch(master, time, 0, x, y, WL_TOUCH_DOWN); else commit 3dbbf321dd0a3e26eab62ad5c77aaf95a593699c Author: Pier Luigi Fiorini <pierluigi.fior...@gmail.com> Date: Fri Aug 23 23:43:23 2013 +0200 compositor.h: Don't include config.h Public headers should not include config.h. diff --git a/src/compositor.h b/src/compositor.h index 3eaac42..3437aea 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -28,8 +28,6 @@ extern "C" { #endif -#include "config.h" - #include <pixman.h> #include <xkbcommon/xkbcommon.h> #include <wayland-server.h> commit dfe4acb4e2d71731deec3c4f2fb77c92b3afbfa8 Author: Kristian Høgsberg <k...@bitplanet.net> Date: Mon Aug 26 14:43:17 2013 -0700 Add more missing config.h #includes Now that we use AC_SYS_LARGEFILE, we need to pull in config.h at least whereever we use mmap(). Fixes at least the test-suite and simple-shm on 32 bit systems. diff --git a/clients/simple-shm.c b/clients/simple-shm.c index 98102eb..0557443 100644 --- a/clients/simple-shm.c +++ b/clients/simple-shm.c @@ -21,6 +21,8 @@ * OF THIS SOFTWARE. */ +#include <config.h> + #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/clients/simple-touch.c b/clients/simple-touch.c index 9e4c60a..865b18d 100644 --- a/clients/simple-touch.c +++ b/clients/simple-touch.c @@ -21,6 +21,8 @@ * OF THIS SOFTWARE. */ +#include <config.h> + #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/clients/weston-simple-im.c b/clients/weston-simple-im.c index 56e30a7..ded6a04 100644 --- a/clients/weston-simple-im.c +++ b/clients/weston-simple-im.c @@ -20,6 +20,8 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include <config.h> + #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/src/xwayland/hash.c b/src/xwayland/hash.c index d841883..54f3de9 100644 --- a/src/xwayland/hash.c +++ b/src/xwayland/hash.c @@ -32,6 +32,8 @@ * Keith Packard <kei...@keithp.com> */ +#include <config.h> + #include <stdlib.h> #include <stdint.h> diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c index 264dc0d..0350da5 100644 --- a/tests/weston-test-client-helper.c +++ b/tests/weston-test-client-helper.c @@ -20,6 +20,8 @@ * OF THIS SOFTWARE. */ +#include <config.h> + #include <stdlib.h> #include <stdio.h> #include <string.h> diff --git a/wcap/main.c b/wcap/main.c index 1b14ce0..1e4605a 100644 --- a/wcap/main.c +++ b/wcap/main.c @@ -20,6 +20,8 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include <config.h> + #include <stdlib.h> #include <stdio.h> #include <stdint.h> diff --git a/wcap/wcap-decode.c b/wcap/wcap-decode.c index 2b9304d..87d9337 100644 --- a/wcap/wcap-decode.c +++ b/wcap/wcap-decode.c @@ -20,6 +20,8 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include <config.h> + #include <stdlib.h> #include <stdio.h> #include <stdint.h> commit 2471fac4d99b93b4557fa8fa1a417c37aba97f4a Author: Kristian Høgsberg <k...@bitplanet.net> Date: Mon Aug 26 14:35:32 2013 -0700 evdev: Initliaze device->link so we can wl_list_remove() without crashing We were testing for wl_list_empty() on a { NULL, NULL } list (which returns false) and then wl_list_remove()ing the device (which crashes). diff --git a/src/evdev.c b/src/evdev.c index 3d225bc..7139989 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -603,6 +603,7 @@ evdev_device_create(struct weston_seat *seat, const char *path, int device_fd) device->rel.dy = 0; device->dispatch = NULL; device->fd = device_fd; + wl_list_init(&device->link); ioctl(device->fd, EVIOCGNAME(sizeof(devname)), devname); devname[sizeof(devname) - 1] = '\0'; @@ -646,8 +647,7 @@ evdev_device_destroy(struct evdev_device *device) if (device->source) wl_event_source_remove(device->source); - if (!wl_list_empty(&device->link)) - wl_list_remove(&device->link); + wl_list_remove(&device->link); if (device->mtdev) mtdev_close_delete(device->mtdev); close(device->fd); commit c2bc9223482288e884f8d4553004a86eccd569e3 Author: Kristian Høgsberg <k...@bitplanet.net> Date: Thu Aug 22 16:24:15 2013 -0700 xwm: Use window->x/y for override redirect surfaces window->x/y is the coordinate of the top-level surface (whether that's the frame window or an override-redirect window) and the wayland surface should be placed there, without the t->margin offset. diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c index eb70408..1d35bb0 100644 --- a/src/xwayland/window-manager.c +++ b/src/xwayland/window-manager.c @@ -1898,7 +1898,6 @@ xserver_map_shell_surface(struct weston_wm *wm, { struct weston_shell_interface *shell_interface = &wm->server->compositor->shell_interface; - struct theme *t = window->wm->theme; if (!shell_interface->create_shell_surface) return; @@ -1920,8 +1919,8 @@ xserver_map_shell_surface(struct weston_wm *wm, return; } else { shell_interface->set_xwayland(window->shsurf, - window->x + t->margin, - window->y + t->margin, + window->x, + window->y, WL_SHELL_SURFACE_TRANSIENT_INACTIVE); } } commit 15df112a0e137a2cb24507a661ad1da5ccfbddcf Author: Kristian Høgsberg <k...@bitplanet.net> Date: Thu Aug 22 16:20:44 2013 -0700 xwm: Fix transform listener The coordinate transformation was broken (worked for first output where output->x/y was 0,0, broke on all other outputs). We can just use surface->geometry.x/y directly. We can't use the full transformation, the best we can do is to move the X window to the geometry.x/y location. Get rid of the static old_sx/sy hack as well. diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c index b4a1b7a..eb70408 100644 --- a/src/xwayland/window-manager.c +++ b/src/xwayland/window-manager.c @@ -643,11 +643,7 @@ weston_wm_window_transform(struct wl_listener *listener, void *data) struct weston_wm_window *window = get_wm_window(surface); struct weston_wm *wm = container_of(listener, struct weston_wm, transform_listener); - struct weston_output *output = surface->output; uint32_t mask, values[2]; - float sxf, syf; - int sx, sy; - static int old_sx = -1, old_sy = -1; if (!window || !wm) return; @@ -655,24 +651,15 @@ weston_wm_window_transform(struct wl_listener *listener, void *data) if (!weston_surface_is_mapped(surface)) return; - weston_surface_to_global_float(surface, output->x, output->y, - &sxf, &syf); + if (window->x != surface->geometry.x || + window->y != surface->geometry.y) { + values[0] = surface->geometry.x; + values[1] = surface->geometry.y; + mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y; - sx = (int) sxf; - sy = (int) syf; - - if (old_sx == sx && old_sy == sy) - return; - - values[0] = sx; - values[1] = sy; - mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y; - - xcb_configure_window(wm->conn, window->frame_id, mask, values); - xcb_flush(wm->conn); - - old_sx = sx; - old_sy = sy; + xcb_configure_window(wm->conn, window->frame_id, mask, values); + xcb_flush(wm->conn); + } } #define ICCCM_WITHDRAWN_STATE 0 commit 898e168bfd6c01b3613ac71c2f299c503c695f03 Author: Kristian Høgsberg <k...@bitplanet.net> Date: Thu Aug 22 16:18:17 2013 -0700 xwm: Fix configure notify handler We only get configure notify for toplevel (frame or override-redirect window) and those are the cases where we want to update window->x/y. The way the code worked, we'd exit immeidately in those cases and window->x/y would not be updated. diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c index d63b042..b4a1b7a 100644 --- a/src/xwayland/window-manager.c +++ b/src/xwayland/window-manager.c @@ -574,17 +574,10 @@ weston_wm_handle_configure_notify(struct weston_wm *wm, xcb_generic_event_t *eve configure_notify->x, configure_notify->y, configure_notify->width, configure_notify->height); - if (our_resource(wm, configure_notify->window)) - return; - window = hash_table_lookup(wm->window_hash, configure_notify->window); - /* resize falls here */ - if (configure_notify->window != window->id) - return; - weston_wm_window_get_child_position(window, &x, &y); - window->x = configure_notify->x - x; - window->y = configure_notify->y - y; + window->x = configure_notify->x; + window->y = configure_notify->y; } static void commit 721f1f070bf9151df8aeb7ca86b6f2e664b01738 Author: Kristian Høgsberg <k...@bitplanet.net> Date: Wed Aug 21 22:14:58 2013 -0700 xwm: Set _NET_WM_CM_S0 instead of relying on the xwayland module to do it Not sure why I made xwayland claim this selection, seem a little awkward in retrospect. diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c index 257c108..d63b042 100644 --- a/src/xwayland/window-manager.c +++ b/src/xwayland/window-manager.c @@ -1534,6 +1534,7 @@ weston_wm_get_resources(struct weston_wm *wm) { "WM_STATE", F(atom.wm_state) }, { "WM_S0", F(atom.wm_s0) }, { "WM_CLIENT_MACHINE", F(atom.wm_client_machine) }, + { "_NET_WM_CM_S0", F(atom.net_wm_cm_s0) }, { "_NET_WM_NAME", F(atom.net_wm_name) }, { "_NET_WM_PID", F(atom.net_wm_pid) }, { "_NET_WM_ICON", F(atom.net_wm_icon) }, @@ -1689,6 +1690,11 @@ weston_wm_create_wm_window(struct weston_wm *wm) wm->wm_window, wm->atom.wm_s0, XCB_TIME_CURRENT_TIME); + + xcb_set_selection_owner(wm->conn, + wm->wm_window, + wm->atom.net_wm_cm_s0, + XCB_TIME_CURRENT_TIME); } struct weston_wm * diff --git a/src/xwayland/xwayland.h b/src/xwayland/xwayland.h index c68a517..21b499e 100644 --- a/src/xwayland/xwayland.h +++ b/src/xwayland/xwayland.h @@ -85,6 +85,7 @@ struct weston_wm { xcb_atom_t wm_state; xcb_atom_t wm_s0; xcb_atom_t wm_client_machine; + xcb_atom_t net_wm_cm_s0; xcb_atom_t net_wm_name; xcb_atom_t net_wm_pid; xcb_atom_t net_wm_icon; commit 51175ca057d2419a78bddd76058600522d3982e3 Author: Kristian Høgsberg <k...@bitplanet.net> Date: Thu Aug 22 11:30:20 2013 -0700 Bump version to 1.2.1 diff --git a/configure.ac b/configure.ac index 156237f..20c4ba8 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ m4_define([weston_major_version], [1]) m4_define([weston_minor_version], [2]) -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]) commit fa9bfcc8de0ec2ea6675c55c1984b979c754ccc2 Author: Kristian Høgsberg <k...@bitplanet.net> Date: Thu Aug 22 12:16:51 2013 -0700 simple-egl: Handle missing EGL_EXT_buffer_age better Including src/weston-egl-ext.h breaks distcheck, so lets just copy the one EGL_EXT_buffer_age into simple-egl.c. diff --git a/clients/simple-egl.c b/clients/simple-egl.c index a557fca..1fd4137 100644 --- a/clients/simple-egl.c +++ b/clients/simple-egl.c @@ -38,13 +38,16 @@ #include <EGL/egl.h> #include <EGL/eglext.h> -#include <src/weston-egl-ext.h> - #ifndef EGL_EXT_swap_buffers_with_damage #define EGL_EXT_swap_buffers_with_damage 1 typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC)(EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); #endif +#ifndef EGL_EXT_buffer_age +#define EGL_EXT_buffer_age 1 +#define EGL_BUFFER_AGE_EXT 0x313D +#endif + struct window; struct seat; commit 6d345d30ce9e9dfe78b6f96f121eecbe89f75be3 Author: Maksim Melnikau <maxpose...@gmail.com> Date: Wed Aug 14 22:33:10 2013 +0300 add [xwayland] path weston.ini option It sets the path to the xserver to run. Signed-off-by: Maksim Melnikau <maxpose...@gmail.com> diff --git a/man/weston.ini.man b/man/weston.ini.man index 9c22b3f..79743f0 100644 --- a/man/weston.ini.man +++ b/man/weston.ini.man @@ -77,6 +77,7 @@ The section headers are: .BR "input-method " "Onscreen keyboard input" .BR "keyboard " "Keyboard layouts" .BR "terminal " "Terminal application options" +.BR "xwayland " "XWayland options" .fi .RE .PP @@ -357,6 +358,12 @@ sets the size of the terminal font (unsigned integer). The terminal shell (string). Sets the $TERM variable. .RE .RE +.SH "XWAYLAND SECTION" +.TP 7 +.BI "path=" "/usr/bin/Xorg" +sets the path to the xserver to run (string). +.RE +.RE .SH "SEE ALSO" .BR weston (1), .BR weston-launch (1), diff --git a/src/xwayland/launcher.c b/src/xwayland/launcher.c index 3228b53..32e04e9 100644 --- a/src/xwayland/launcher.c +++ b/src/xwayland/launcher.c @@ -42,6 +42,8 @@ weston_xserver_handle_event(int listen_fd, uint32_t mask, void *data) struct weston_xserver *wxs = data; char display[8], s[8]; int sv[2], client_fd; + char *xserver = NULL; + struct weston_config_section *section; if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sv) < 0) { weston_log("socketpair failed\n"); @@ -62,8 +64,11 @@ weston_xserver_handle_event(int listen_fd, uint32_t mask, void *data) snprintf(display, sizeof display, ":%d", wxs->display); - if (execl(XSERVER_PATH, - XSERVER_PATH, + section = weston_config_get_section(wxs->compositor->config, "xwayland", NULL, NULL); + weston_config_section_get_string(section, "path", &xserver, XSERVER_PATH); + + if (execl(xserver, + xserver, display, "-wayland", "-rootless", @@ -72,6 +77,7 @@ weston_xserver_handle_event(int listen_fd, uint32_t mask, void *data) "-terminate", NULL) < 0) weston_log("exec failed: %m\n"); + free(xserver); _exit(EXIT_FAILURE); default: commit 122a93850784e5fe14a66753f5e3e5b3d92c3d85 Author: Kristian Høgsberg <k...@bitplanet.net> Date: Wed Aug 21 22:14:14 2013 -0700 compositor-drm: Zero out create_arg when creating dumb framebuffers The create_arg struct has a flags member that we didn't properly set to 0. diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 88b87f8..0600ceb 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -238,6 +238,7 @@ drm_fb_create_dumb(struct drm_compositor *ec, unsigned width, unsigned height) if (!fb) return NULL; + memset(&create_arg, 0, sizeof create_arg); create_arg.bpp = 32; create_arg.width = width; create_arg.height = height; @@ -256,7 +257,7 @@ drm_fb_create_dumb(struct drm_compositor *ec, unsigned width, unsigned height) if (ret) goto err_bo; - memset(&map_arg, 0, sizeof(map_arg)); + memset(&map_arg, 0, sizeof map_arg); map_arg.handle = fb->handle; ret = drmIoctl(fb->fd, DRM_IOCTL_MODE_MAP_DUMB, &map_arg); if (ret) commit db8c5c89707c71a2498495bd18b2058b74f9ea45 Author: Kristian Høgsberg <k...@bitplanet.net> Date: Wed Aug 21 15:44:57 2013 -0700 configure.ac: Add AC_SYS_LARGEFILE for mmap()ing dumb GEM buffers We're mmap()ing buffers with 64 bit offsets coming from the DRM_IOCTL_MODE_MAP_DUMB ioctl and need to make sure mmap accepts those. diff --git a/configure.ac b/configure.ac index e305ab0..156237f 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,7 @@ AC_SUBST([WESTON_VERSION], [weston_version]) AC_CONFIG_HEADERS([config.h]) AC_USE_SYSTEM_EXTENSIONS +AC_SYS_LARGEFILE AM_INIT_AUTOMAKE([1.11 parallel-tests foreign no-dist-gzip dist-xz color-tests]) commit 61a13715bb4024da2836f50390e15e5002844d31 Author: Hardening <rdp.eff...@gmail.com> Date: Sat Aug 17 00:30:31 2013 +0200 set RDP output enabled by default (stable 1.2) This patch fixes a bug found by Marek Romanowic: the RDP peer output must be enabled by default, or we have to unfocus/focus the RDP client window to have disable/enable output messages sent (and finally receive updates). diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c index 33ec77d..99dc487 100644 --- a/src/compositor-rdp.c +++ b/src/compositor-rdp.c @@ -572,7 +572,7 @@ static void rdp_peer_context_new(freerdp_peer* client, RdpPeerContext* context) { context->item.peer = client; - context->item.flags = 0; + context->item.flags = RDP_PEER_OUTPUT_ENABLED; context->rfx_context = rfx_context_new(); context->rfx_context->mode = RLGR3; commit e78734740e8d87d3ef297b0b2cb8929c295b9409 Author: Daiki Ueno <u...@gnu.org> Date: Tue Aug 20 09:56:52 2013 +0200 autotools: Don't use wayland-scanner.m4 diff --git a/Makefile.am b/Makefile.am index 88428de..e9ecc38 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,4 +6,4 @@ SUBDIRS = shared src clients data protocol tests $(wcap_subdir) man DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install -EXTRA_DIST = weston.ini +EXTRA_DIST = weston.ini wayland-scanner.mk diff --git a/clients/Makefile.am b/clients/Makefile.am index 1f7d9dc..87b3a0e 100644 --- a/clients/Makefile.am +++ b/clients/Makefile.am @@ -254,7 +254,8 @@ endif endif -@wayland_scanner_rules@ +wayland_protocoldir = $(top_srcdir)/protocol +include $(top_srcdir)/wayland-scanner.mk if HAVE_POPPLER poppler_programs = weston-view diff --git a/configure.ac b/configure.ac index fab0b48..e305ab0 100644 --- a/configure.ac +++ b/configure.ac @@ -423,9 +423,8 @@ if test "x$have_lcms" = xyes; then fi AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes]) -m4_ifndef([WAYLAND_SCANNER_RULES], - [m4_fatal([WAYLAND_SCANNER_RULES not found. Point ACLOCAL to wayland-scanner.m4 before running autoconf/autogen])]) -WAYLAND_SCANNER_RULES(['$(top_srcdir)/protocol']) +AC_PATH_PROG([wayland_scanner], [wayland-scanner], + [AC_MSG_ERROR("wayland-scanner is needed to compile weston")]) AC_CONFIG_FILES([Makefile shared/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index d06e773..05b22d3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -312,4 +312,5 @@ BUILT_SOURCES = \ CLEANFILES = $(BUILT_SOURCES) -@wayland_scanner_rules@ +wayland_protocoldir = $(top_srcdir)/protocol +include $(top_srcdir)/wayland-scanner.mk diff --git a/src/xwayland/Makefile.am b/src/xwayland/Makefile.am index 82ad53d..d4a7988 100644 --- a/src/xwayland/Makefile.am +++ b/src/xwayland/Makefile.am @@ -35,4 +35,5 @@ BUILT_SOURCES = \ CLEANFILES = $(BUILT_SOURCES) -@wayland_scanner_rules@ +wayland_protocoldir = $(top_srcdir)/protocol +include $(top_srcdir)/wayland-scanner.mk diff --git a/tests/Makefile.am b/tests/Makefile.am index d4aa909..82bf630 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -139,4 +139,5 @@ BUILT_SOURCES = \ CLEANFILES = $(BUILT_SOURCES) -@wayland_scanner_rules@ +wayland_protocoldir = $(top_srcdir)/protocol +include $(top_srcdir)/wayland-scanner.mk diff --git a/wayland-scanner.mk b/wayland-scanner.mk new file mode 100644 index 0000000..0a72062 --- /dev/null +++ b/wayland-scanner.mk @@ -0,0 +1,8 @@ +%-protocol.c : $(wayland_protocoldir)/%.xml + $(AM_V_GEN)$(wayland_scanner) code < $< > $@ + +%-server-protocol.h : $(wayland_protocoldir)/%.xml + $(AM_V_GEN)$(wayland_scanner) server-header < $< > $@ + +%-client-protocol.h : $(wayland_protocoldir)/%.xml + $(AM_V_GEN)$(wayland_scanner) client-header < $< > $@ commit 2629672f778be4e0dc18c090b49035e43585f13e Author: Rusty Lynch <rusty.ly...@intel.com> Date: Thu Aug 15 09:10:08 2013 -0700 Add touch support for wl_shell_surface_move diff --git a/clients/calibrator.c b/clients/calibrator.c index 781475e..783cdec 100644 --- a/clients/calibrator.c +++ b/clients/calibrator.c @@ -163,8 +163,8 @@ button_handler(struct widget *widget, } static void -touch_handler(struct widget *widget, uint32_t serial, uint32_t time, - int32_t id, float x, float y, void *data) +touch_handler(struct widget *widget, struct input *input, uint32_t serial, + uint32_t time, int32_t id, float x, float y, void *data) { struct calibrator *calibrator = data; diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index b2082f3..82fe9b0 100644 --- a/clients/desktop-shell.c +++ b/clients/desktop-shell.c @@ -322,8 +322,8 @@ panel_launcher_button_handler(struct widget *widget, } static void -panel_launcher_touch_down_handler(struct widget *widget, uint32_t serial, - uint32_t time, int32_t id, +panel_launcher_touch_down_handler(struct widget *widget, struct input *input, + uint32_t serial, uint32_t time, int32_t id, float x, float y, void *data) { struct panel_launcher *launcher; @@ -334,8 +334,9 @@ panel_launcher_touch_down_handler(struct widget *widget, uint32_t serial, } static void -panel_launcher_touch_up_handler(struct widget *widget, uint32_t serial, - uint32_t time, int32_t id, void *data) +panel_launcher_touch_up_handler(struct widget *widget, struct input *input, + uint32_t serial, uint32_t time, int32_t id, + void *data) { struct panel_launcher *launcher; diff --git a/clients/flower.c b/clients/flower.c index b31d513..825c833 100644 --- a/clients/flower.c +++ b/clients/flower.c @@ -152,6 +152,16 @@ button_handler(struct widget *widget, } } +static void +touch_down_handler(struct widget *widget, struct input *input, + uint32_t serial, uint32_t time, int32_t id, + float x, float y, void *data) +{ + struct flower *flower = data; + window_touch_move(flower->window, input, + display_get_serial(flower->display)); +} + int main(int argc, char *argv[]) { struct flower flower; @@ -178,6 +188,7 @@ int main(int argc, char *argv[]) widget_set_redraw_handler(flower.widget, redraw_handler); widget_set_button_handler(flower.widget, button_handler); widget_set_default_cursor(flower.widget, CURSOR_HAND1); + widget_set_touch_down_handler(flower.widget, touch_down_handler); window_schedule_resize(flower.window, flower.width, flower.height); diff --git a/clients/fullscreen.c b/clients/fullscreen.c index bea1a15..72e2c81 100644 --- a/clients/fullscreen.c +++ b/clients/fullscreen.c @@ -278,6 +278,16 @@ button_handler(struct widget *widget, } static void +touch_handler(struct widget *widget, struct input *input, + uint32_t serial, uint32_t time, int32_t id, + float x, float y, void *data) +{ + struct fullscreen *fullscreen = data; + window_touch_move(fullscreen->window, input, + display_get_serial(fullscreen->display)); +} + +static void usage(int error_code) { fprintf(stderr, "Usage: fullscreen [OPTIONS]\n\n" @@ -340,6 +350,8 @@ int main(int argc, char *argv[]) widget_set_button_handler(fullscreen.widget, button_handler); widget_set_motion_handler(fullscreen.widget, motion_handler); -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1vt5rq-0000in...@vasks.debian.org