diff -Nru wayland-0.89.0~git20120624.67e16be8/ChangeLog wayland-0.94.90+git20120630.9de9e39f/ChangeLog --- wayland-0.89.0~git20120624.67e16be8/ChangeLog 2012-06-24 12:05:48.000000000 +0000 +++ wayland-0.94.90+git20120630.9de9e39f/ChangeLog 2012-06-30 07:34:08.000000000 +0000 @@ -1,9 +1,52 @@ -commit db41854782d173cf33658a99ca2978a71c7c8ee1 +commit 6aff752626906907a3981cd4660941fca2a94b62 Author: Rico Tzschichholz -Date: Sun Jun 24 14:05:37 2012 +0200 +Date: Sat Jun 30 09:33:53 2012 +0200 Add debian tree from origin/ubuntu +commit 9de9e39f87adfce1ea9755e394928756254c0ba2 +Author: Kristian Høgsberg +Date: Thu Jun 28 22:01:58 2012 -0400 + + Allocate client proxy automatically for new objects + + When the server send a new object ID, the client used to have to allocate + the proxy manually and without type-safety. We now allocate the proxy + in a client-side post-processing step on the incoming closure. + +commit c30ad0d9da08a95246471483bfc66410a4153564 +Author: Ander Conselvan de Oliveira +Date: Thu Jun 28 18:08:03 2012 +0300 + + protocol: Change wording of pointer.set_cursor() + + Change the description of pointer.set_cursor() so that a client without + pointer focus but that currently owns the pointer surface can update the + hotspot using it. + +commit ae6f3001a51cce102422e4ccbeb394fe90945a12 +Author: Kristian Høgsberg +Date: Wed Jun 27 10:30:08 2012 -0400 + + wl_shell: Don't require that parent surfaces are wl_shell_surfaces + + The set_transient and set_popup requests take a wl_shell_surface as + the parent surface argument. We don't need the parent surface to be + a shell surface and this restricts the types of surfaces we can use + the transient and popup surface types on. + +commit 7e71c38b98296843b8f3f24efd507e98f1f10c57 +Author: Kristian Høgsberg +Date: Mon Jun 25 18:09:00 2012 -0400 + + configure.ac: Bump version to 0.94.90 + +commit 9afb5f61f8e77f33c63e17f54720f12f9c40287c +Author: Kristian Høgsberg +Date: Fri Jun 22 14:38:12 2012 -0400 + + Send modifier event to pointer focus when it changes too + commit 67e16be8aa9408d77dc291d9accb238fb9422c94 Author: Kristian Høgsberg Date: Fri Jun 22 12:20:00 2012 -0400 diff -Nru wayland-0.89.0~git20120624.67e16be8/config.sub wayland-0.94.90+git20120630.9de9e39f/config.sub --- wayland-0.89.0~git20120624.67e16be8/config.sub 2012-06-24 12:05:47.000000000 +0000 +++ wayland-0.94.90+git20120630.9de9e39f/config.sub 2012-06-30 07:34:08.000000000 +0000 @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2012-04-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -225,6 +225,12 @@ -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -1537,6 +1543,9 @@ c4x-* | tic4x-*) os=-coff ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; diff -Nru wayland-0.89.0~git20120624.67e16be8/configure wayland-0.94.90+git20120630.9de9e39f/configure --- wayland-0.89.0~git20120624.67e16be8/configure 2012-06-24 12:05:46.000000000 +0000 +++ wayland-0.94.90+git20120630.9de9e39f/configure 2012-06-30 07:34:07.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for wayland 0.89.0. +# Generated by GNU Autoconf 2.69 for wayland 0.94.90. # # Report bugs to . # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='wayland' PACKAGE_TARNAME='wayland' -PACKAGE_VERSION='0.89.0' -PACKAGE_STRING='wayland 0.89.0' +PACKAGE_VERSION='0.94.90' +PACKAGE_STRING='wayland 0.94.90' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=wayland' PACKAGE_URL='http://wayland.freedesktop.org/' @@ -1339,7 +1339,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures wayland 0.89.0 to adapt to many kinds of systems. +\`configure' configures wayland 0.94.90 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1409,7 +1409,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of wayland 0.89.0:";; + short | recursive ) echo "Configuration of wayland 0.94.90:";; esac cat <<\_ACEOF @@ -1524,7 +1524,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -wayland configure 0.89.0 +wayland configure 0.94.90 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1893,7 +1893,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by wayland $as_me 0.89.0, which was +It was created by wayland $as_me 0.94.90, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2244,11 +2244,11 @@ WAYLAND_VERSION_MAJOR=0 -WAYLAND_VERSION_MINOR=89 +WAYLAND_VERSION_MINOR=94 -WAYLAND_VERSION_MICRO=0 +WAYLAND_VERSION_MICRO=90 -WAYLAND_VERSION=0.89.0 +WAYLAND_VERSION=0.94.90 ac_config_headers="$ac_config_headers config.h" @@ -2722,7 +2722,7 @@ # Define the identity of the package. PACKAGE='wayland' - VERSION='0.89.0' + VERSION='0.94.90' cat >>confdefs.h <<_ACEOF @@ -12356,7 +12356,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by wayland $as_me 0.89.0, which was +This file was extended by wayland $as_me 0.94.90, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12423,7 +12423,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -wayland config.status 0.89.0 +wayland config.status 0.94.90 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru wayland-0.89.0~git20120624.67e16be8/configure.ac wayland-0.94.90+git20120630.9de9e39f/configure.ac --- wayland-0.89.0~git20120624.67e16be8/configure.ac 2012-06-24 12:05:37.000000000 +0000 +++ wayland-0.94.90+git20120630.9de9e39f/configure.ac 2012-06-30 07:33:53.000000000 +0000 @@ -1,8 +1,8 @@ AC_PREREQ([2.64]) m4_define([wayland_major_version], [0]) -m4_define([wayland_minor_version], [89]) -m4_define([wayland_micro_version], [0]) +m4_define([wayland_minor_version], [94]) +m4_define([wayland_micro_version], [90]) m4_define([wayland_version], [wayland_major_version.wayland_minor_version.wayland_micro_version]) diff -Nru wayland-0.89.0~git20120624.67e16be8/debian/changelog wayland-0.94.90+git20120630.9de9e39f/debian/changelog --- wayland-0.89.0~git20120624.67e16be8/debian/changelog 2012-06-30 07:49:07.000000000 +0000 +++ wayland-0.94.90+git20120630.9de9e39f/debian/changelog 2012-06-30 07:49:08.000000000 +0000 @@ -1,11 +1,11 @@ -wayland (0.89.0~git20120624.67e16be8-0ubuntu0ricotz~precise) precise; urgency=low +wayland (0.94.90+git20120630.9de9e39f-0ubuntu0ricotz~precise) precise; urgency=low - * Checkout from git 20120624 (master branch) up to commit - 67e16be8aa9408d77dc291d9accb238fb9422c94 + * Checkout from git 20120630 (master branch) up to commit + 9de9e39f87adfce1ea9755e394928756254c0ba2 * Only added debian/ tree from origin/ubuntu * hook: Ignore test failures. - -- Rico Tzschichholz Sun, 24 Jun 2012 14:05:48 +0200 + -- Rico Tzschichholz Sat, 30 Jun 2012 09:34:09 +0200 wayland (0.85.0-1ubuntu2) precise; urgency=low diff -Nru wayland-0.89.0~git20120624.67e16be8/.lastcommit wayland-0.94.90+git20120630.9de9e39f/.lastcommit --- wayland-0.89.0~git20120624.67e16be8/.lastcommit 2012-06-24 12:05:37.000000000 +0000 +++ wayland-0.94.90+git20120630.9de9e39f/.lastcommit 2012-06-30 07:33:53.000000000 +0000 @@ -1 +1 @@ -commit 67e16be8aa9408d77dc291d9accb238fb9422c94 +commit 9de9e39f87adfce1ea9755e394928756254c0ba2 diff -Nru wayland-0.89.0~git20120624.67e16be8/protocol/wayland.xml wayland-0.94.90+git20120630.9de9e39f/protocol/wayland.xml --- wayland-0.89.0~git20120624.67e16be8/protocol/wayland.xml 2012-06-24 12:05:37.000000000 +0000 +++ wayland-0.94.90+git20120630.9de9e39f/protocol/wayland.xml 2012-06-30 07:33:53.000000000 +0000 @@ -474,7 +474,7 @@ that relative position during moves. - + @@ -549,7 +549,7 @@ - + @@ -777,8 +777,9 @@ Set the pointer surface, i.e., the surface that contains the pointer image. This request only takes effect if the pointer - focus for this device is one of the requesting client surfaces. - If there was a previous surface set with this request it is + focus for this device is one of the requesting client surfaces + or the surface parameter is the current pointer surface. If + there was a previous surface set with this request it is replaced. If surface is NULL, the pointer image is hidden. The parameters hotspot_x and hotspot_y define the position of diff -Nru wayland-0.89.0~git20120624.67e16be8/src/connection.c wayland-0.94.90+git20120630.9de9e39f/src/connection.c --- wayland-0.89.0~git20120624.67e16be8/src/connection.c 2012-06-24 12:05:37.000000000 +0000 +++ wayland-0.94.90+git20120630.9de9e39f/src/connection.c 2012-06-30 07:33:53.000000000 +0000 @@ -375,6 +375,7 @@ switch (message->signature[i]) { case 's': case 'o': + case 'n': extra += sizeof (void *); break; case 'a': @@ -574,7 +575,7 @@ struct wl_map *objects, const struct wl_message *message) { - uint32_t *p, *next, *end, length; + uint32_t *p, *next, *end, length, **id; int *fd; char *extra, **s; unsigned int i, count, extra_space; @@ -690,8 +691,12 @@ p++; break; case 'n': - closure->types[i] = &ffi_type_uint32; - closure->args[i] = p; + closure->types[i] = &ffi_type_pointer; + id = (uint32_t **) extra; + extra += sizeof *id; + closure->args[i] = id; + *id = p; + object = wl_map_lookup(objects, *p); if (object != NULL) { printf("not a new object (%d), " diff -Nru wayland-0.89.0~git20120624.67e16be8/src/scanner.c wayland-0.94.90+git20120630.9de9e39f/src/scanner.c --- wayland-0.89.0~git20120624.67e16be8/src/scanner.c 2012-06-24 12:05:37.000000000 +0000 +++ wayland-0.94.90+git20120630.9de9e39f/src/scanner.c 2012-06-30 07:33:53.000000000 +0000 @@ -769,6 +769,8 @@ if (is_interface && a->type == OBJECT) printf("struct wl_resource *"); + else if (!is_interface && a->type == NEW_ID) + printf("struct %s *", a->interface_name); else emit_type(a); diff -Nru wayland-0.89.0~git20120624.67e16be8/src/wayland-client.c wayland-0.94.90+git20120630.9de9e39f/src/wayland-client.c --- wayland-0.89.0~git20120624.67e16be8/src/wayland-client.c 2012-06-24 12:05:37.000000000 +0000 +++ wayland-0.94.90+git20120630.9de9e39f/src/wayland-client.c 2012-06-30 07:33:53.000000000 +0000 @@ -462,6 +462,31 @@ wl_display_iterate(display, WL_DISPLAY_READABLE); } +static int +create_proxies(struct wl_display *display, struct wl_closure *closure) +{ + struct wl_proxy *proxy; + const char *signature; + uint32_t id; + int i; + + signature = closure->message->signature; + for (i = 0; signature[i]; i++) { + switch (signature[i]) { + case 'n': + id = **(uint32_t **) closure->args[i + 2]; + proxy = wl_proxy_create_for_id(&display->proxy, id, + closure->message->types[i]); + if (proxy == NULL) + return -1; + *(void **) closure->args[i + 2] = proxy; + break; + } + } + + return 0; +} + static void handle_event(struct wl_display *display, uint32_t id, uint32_t opcode, uint32_t size) @@ -484,7 +509,7 @@ closure = wl_connection_demarshal(display->connection, size, &display->objects, message); - if (closure == NULL) { + if (closure == NULL || create_proxies(display, closure) < 0) { fprintf(stderr, "Error demarshalling event\n"); abort(); } diff -Nru wayland-0.89.0~git20120624.67e16be8/src/wayland-server.c wayland-0.94.90+git20120630.9de9e39f/src/wayland-server.c --- wayland-0.89.0~git20120624.67e16be8/src/wayland-server.c 2012-06-24 12:05:37.000000000 +0000 +++ wayland-0.94.90+git20120630.9de9e39f/src/wayland-server.c 2012-06-30 07:33:53.000000000 +0000 @@ -178,6 +178,25 @@ WL_DISPLAY_ERROR, resource, code, buffer); } +static void +deref_new_objects(struct wl_closure *closure) +{ + const char *signature; + int i; + + signature = closure->message->signature; + for (i = 0; signature[i]; i++) { + switch (signature[i]) { + case 'n': + closure->args[i + 2] = *(uint32_t **) closure->args[i + 2]; + closure->types[i] = &ffi_type_uint32; + break; + } + } +} + + + static int wl_client_connection_data(int fd, uint32_t mask, void *data) { @@ -247,6 +266,8 @@ break; } + deref_new_objects(closure); + if (wl_debug) wl_closure_print(closure, object, false); @@ -532,13 +553,30 @@ } } +static struct wl_resource * +find_resource_for_surface(struct wl_list *list, struct wl_surface *surface) +{ + struct wl_resource *r; + + if (!surface) + return NULL; + + wl_list_for_each(r, list, link) { + if (r->client == surface->resource.client) + return r; + } + + return NULL; +} + static void default_grab_modifiers(struct wl_keyboard_grab *grab, uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group) { struct wl_keyboard *keyboard = grab->keyboard; - struct wl_resource *resource; + struct wl_pointer *pointer = keyboard->seat->pointer; + struct wl_resource *resource, *pr; resource = keyboard->focus_resource; if (!resource) @@ -546,6 +584,19 @@ wl_keyboard_send_modifiers(resource, serial, mods_depressed, mods_latched, mods_locked, group); + + if (pointer && pointer->focus && pointer->focus != keyboard->focus) { + pr = find_resource_for_surface(&keyboard->resource_list, + pointer->focus); + if (pr) { + wl_keyboard_send_modifiers(pr, + serial, + keyboard->modifiers.mods_depressed, + keyboard->modifiers.mods_latched, + keyboard->modifiers.mods_locked, + keyboard->modifiers.group); + } + } } static const struct wl_keyboard_grab_interface @@ -704,22 +755,6 @@ seat_send_updated_caps(seat); } -static struct wl_resource * -find_resource_for_surface(struct wl_list *list, struct wl_surface *surface) -{ - struct wl_resource *r; - - if (!surface) - return NULL; - - wl_list_for_each(r, list, link) { - if (r->client == surface->resource.client) - return r; - } - - return NULL; -} - WL_EXPORT void wl_pointer_set_focus(struct wl_pointer *pointer, struct wl_surface *surface, wl_fixed_t sx, wl_fixed_t sy)