diff options
| author | Kristian Høgsberg <krh@bitplanet.net> | 2011-11-15 08:58:34 -0500 |
|---|---|---|
| committer | Kristian Høgsberg <krh@bitplanet.net> | 2011-11-23 16:05:58 -0500 |
| commit | eae3bcb4ccb80ef1c4dcd2f71987c1187aeb9e73 (patch) | |
| tree | a6d959f0bc06a9fcc6f0d5e50a663a743094e447 /src/connection.c | |
| parent | server: Stop special casing the compositor (diff) | |
| download | wayland-eae3bcb4ccb80ef1c4dcd2f71987c1187aeb9e73.tar wayland-eae3bcb4ccb80ef1c4dcd2f71987c1187aeb9e73.tar.gz wayland-eae3bcb4ccb80ef1c4dcd2f71987c1187aeb9e73.tar.bz2 wayland-eae3bcb4ccb80ef1c4dcd2f71987c1187aeb9e73.tar.lz wayland-eae3bcb4ccb80ef1c4dcd2f71987c1187aeb9e73.tar.xz wayland-eae3bcb4ccb80ef1c4dcd2f71987c1187aeb9e73.tar.zst wayland-eae3bcb4ccb80ef1c4dcd2f71987c1187aeb9e73.zip | |
New drag and drop / selection protocol
This commit brings a big change to the DND and copy/paste interfaces.
Most importantly the functionality is now independent of wl_shell.
The wl_shell interface is intended for desktop style UI interaction and
an optional and experimental interface.
The new interface also allows receiving the DND data multiple times or
multiple times during the drag, and the mechanism for offering and receiving
data is now shared between DND and selections.
Diffstat (limited to 'src/connection.c')
| -rw-r--r-- | src/connection.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/connection.c b/src/connection.c index 8c9a64d..f19280a 100644 --- a/src/connection.c +++ b/src/connection.c @@ -449,7 +449,7 @@ wl_connection_vmarshal(struct wl_connection *connection, closure->types[i] = &ffi_type_uint32; closure->args[i] = p; object = va_arg(ap, struct wl_object *); - *p++ = object->id; + *p++ = object ? object->id : 0; break; case 'a': @@ -493,6 +493,8 @@ wl_connection_vmarshal(struct wl_connection *connection, &dup_fd, sizeof dup_fd); break; default: + fprintf(stderr, "unhandled format code: '%c'\n", + message->signature[i - 2]); assert(0); break; } @@ -632,7 +634,7 @@ wl_connection_demarshal(struct wl_connection *connection, closure->types[i] = &ffi_type_uint32; closure->args[i] = p; object = wl_map_lookup(objects, *p); - if (*p == 0 || object != NULL) { + if (object != NULL) { printf("not a new object (%d), " "message %s(%s)\n", *p, message->name, message->signature); |
