summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-03-10Flush the connection if we have to many marshaled fdsHEADmasterAnder Conselvan de Oliveira1-4/+26
The buffer used by wl_connection_data to receive a cmsg is 128 bytes long. This can hold at most 28 fds but when a cmsg is generated for sending the fds, there is no check for this limitation. The man page for recvmsg does not show any way of recovering from MSG_CTRUNC, that happens when the buffer supplied for cmsg is too short. Fix this by flushing the data to be written instead of generating a cmsg buffer longer than the maximum.
2012-03-05test-runner.c: Consolidate test running codeKristian Høgsberg1-16/+23
2012-03-05tests: Add demarshal testsKristian Høgsberg1-0/+77
2012-03-05tests: Add more marshal testsKristian Høgsberg1-0/+22
2012-03-05tests: Simplify connection tests a bitKristian Høgsberg1-9/+6
2012-03-05tests: Add wl_list testsKristian Høgsberg2-1/+165
2012-03-05tests: More wl_map testsKristian Høgsberg1-0/+46
2012-03-05TOOD: Frame based input doneKristian Høgsberg1-2/+0
2012-03-05tests: makefile error: missing test-runner.hGaetan Nadon1-1/+1
Detected by running distcheck Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2012-03-05scanner: Add since attributeKristian Høgsberg1-1/+22
This will help us document when a request or event was added to the protocol.
2012-03-04check: connection-test fails to link to ffiGaetan Nadon1-1/+1
This prevents distcheck from completing. Moving the -lffi at the end of the command fixes the problem. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2012-03-04publican: support out-of-source tree buildGaetan Nadon14-42/+58
When srcdir!=builddir, there is no way to tell publican that the source is in srcdir rather than builldir. The workaround is to copy the source files from srcdir to builddir. To retain the en-US final destination name, the source directory is renamed to en_US. Tested-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2012-03-04Fix distcheck where protocol.xsl was missing in the tarballGaetan Nadon2-2/+4
To reproduce, invoke distcheck from an out-of-source tree. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2012-03-04Add wl_array_for_eachKristian Høgsberg3-6/+27
2012-03-03Add tests subdir to toplevel SUBDIRS variableKristian Høgsberg1-1/+1
Artie spotted this.
2012-03-03tests: Add connection marshalling testsKristian Høgsberg1-0/+59
2012-03-02tests: Add connection testsKristian Høgsberg2-2/+145
2012-03-02test-runner: Fix warningsKristian Høgsberg1-1/+2
2012-03-02connection: Export wl_connection_queue() so we can test itKristian Høgsberg2-1/+3
2012-03-02tests: Print test status after running testKristian Høgsberg1-1/+1
This way assert output will be a line by itself, which is easier to read and lets editors such as emacs step through failed assertions.
2012-03-02tests: Add Unit tests for wl_map and wl_array data structuresKristian Høgsberg6-1/+281
We use a simple test-runner helper that runs each test in a separate process and reports the pass/fail rate at the end.
2012-03-02Terminate drag if data source is destroyedAnder Conselvan de Oliveira2-16/+41
2012-03-02server: fix event sending type mismatchesPekka Paalanen2-5/+7
These were not bugs in practice, because the first (and only) field of struct wl_surface is struct wl_resource. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-03-02server: use the event sending wrappersPekka Paalanen3-48/+32
This exposes some type mismatches that are fixed in the next commit. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-03-02scanner: emit event wrapper functions for serverPekka Paalanen2-8/+51
Generate typed wrapper functions for sending events in a server. This allows compile time type checking, unlike the existing method of calling the variadic function wl_resource_post_event(). The stuff in wayland-server.h had to be slightly reordered to have all (forward) declarations before use. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-03-01wayland-server: Destroy resource before sending out delete_id eventKristian Høgsberg1-7/+8
In some cases, we send out events from the resource destructor and those need to go out before we recycle the object ID.
2012-03-01Fix server crash when a client dies during a drag with an iconAnder Conselvan de Oliveira2-1/+19
If a client dies during a drag that it started using an icon surface, the server could crash because the icon surface is not valid anymore. Fix this by using a destroy listener to reset device->drag_surface to nil when the surface is destroyed.
2012-03-01Fix wl_data_offer source destroy listenerAnder Conselvan de Oliveira1-1/+4
The listener function implementation was getting a wrong pointer to the wl_data_offer object because the resource parameter is actually the data source and not the data offer.
2012-02-29configure.ac: Fix test-for-empty bugKristian Høgsberg1-2/+2
From Gaetan Nadon: ./configure: line 11662: test: !=: unary operator expected AM_CONDITIONAL([HAVE_XSLTPROC], [test $XSLTPROC != ""]) AM_CONDITIONAL([HAVE_PUBLICAN], [test $PUBLICAN != ""]) It shows up when you do not have publican. The usual "testing for blank" bug.
2012-02-29protocol: Clarify the documentation for the fullscreen protocolRob Bradford1-19/+34
2012-02-29Merge remote-tracking branch 'whot/publican'Kristian Høgsberg20-4/+668
2012-02-29Don't block when flushing a full protocol bufferKristian Høgsberg4-15/+39
In case the client isn't responding, this will block the compositor. Instead we flush with MSG_DONTWAIT, which lets us fill up the kernel buffer as much as we can (after not returning EPOLLOUT anymore it still can take 80k more), and then disconnect the client if we get EAGAIN.
2012-02-29Hack up distcheck for publicanPeter Hutterer1-4/+18
Publican requires a read-write source tree, see http://bugzilla.redhat.com/show_bug.cgi?id=798484 And it currently cannot build out-of-tree, so we need to copy the sources into the _build tree and generate Protocol.xml into that tree too (we'd have to do this anyway since automake creates a read-only source tree, so we can't just link). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-29Generate the docbook description for the protocol from wayland.xmlPeter Hutterer4-2/+122
Convert the wayland.xml protocol description to a docbook-compatible format and hook it up to the publican sources. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-29Hook up autotools for publicanPeter Hutterer6-1/+45
automake doesn't seem to provide a sensible method to install a directory of stuff in $(docdir). Do it manually then. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-29doc: Comment out some of the default chaptersPeter Hutterer1-0/+5
I'll leave them in for now as a template for how things looked originally, this can be removed later. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-29doc: Add architecture from the websitePeter Hutterer4-0/+319
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-29doc: Fix up title page with logo and author informationPeter Hutterer4-9/+16
Abstract taken from http://wayland.freedesktop.org Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-29doc: add publican-created doctreePeter Hutterer9-0/+154
$> publican create --name=Wayland unmodified otherwise To build the tree to target formats, use $> publican build --langs=en-US --formats=html,pdf Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-29protocol: fix make distcheckPeter Hutterer1-3/+4
Distribute all source files that we need for buildling. Plus, remove the html file on make clean. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-28Update TODOKristian Høgsberg1-39/+0
2012-02-28Allow update function to not be set in wl_display_get_fdSamuel Rødal1-1/+3
Ignore previous patch, here's the correct version. From 4e1bedaaf05b576f5191f8fe3a34904ab9707414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= <samuel.rodal@nokia.com> Date: Mon, 27 Feb 2012 15:17:20 +0100 Subject: [PATCH] Allow update function to not be set in wl_display_get_fd The same check is done in connection_update, and now with wl_display_flush() there's less need for the client to need to know the connection mask.
2012-02-28Rename client side wl_display_destroy() to wl_display_disconnect()Samuel Rødal2-2/+2
This avoids the clash with the wayland-server version with the same name, and allows linking against both wayland-client and wayland-server at the same time, which can be useful for unit testing purposes as well as for nested compositing. Without this there will be crashes as the wrong wl_display_destroy() is called.
2012-02-26util: Comments before wl_list were a bit off, fixed the example usage.Üstün Ergenoğlu1-4/+12
Signed-off-by: Üstün Ergenoğlu <ego@ustun.fi>
2012-02-23protocol.xsl: Rename stylesheet to wayland-protocol.cssKristian Høgsberg3-2/+2
Otherwise it clashes with the website stylesheet.
2012-02-23protocol: add xslt stylesheet to prettify the protocolPeter Hutterer5-2/+258
Includes rudimentary styling only. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-23protocol: fix missing hyphenation for "client-created"Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-23scanner: Remove unused variable 'len'Peter Hutterer1-1/+1
scanner.c: In function ‘desc_dump’: scanner.c:142:42: warning: unused variable ‘len’ [-Wunused-variable] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-23spec: padding bytes are undefined, state soPeter Hutterer1-1/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-23spec: typo and wording fixesPeter Hutterer1-3/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>