Commit Graph

891 Commits

Author SHA1 Message Date
Kristian Høgsberg
f48bd0714a tests: Add test case for freeing source with pending data 2012-03-21 10:30:19 -04:00
Bill Spitzak
81ffaa04b9 Check arguments to wl_resource_post_error in gcc
The attached patch turns on printf argument warnings for this function,
which I found was being called incorrectly at least once in the wayland
source code.
2012-03-20 16:52:17 -04:00
Üstün Ergenoğlu
ecfb79bd71 configure: Add option to disable building documentation.
Signed-off-by: Üstün Ergenoğlu <ego@ustun.fi>
2012-03-20 16:34:07 -04:00
Ander Conselvan de Oliveira
707623f0cb test: add a unit test for the event loop post dispatch check 2012-03-20 15:49:27 -04:00
Ander Conselvan de Oliveira
3c5d9694db event-loop: always do the post-dispatch check
The post-dispatch check on wl_event_loop_dispatch() was not being run
if epoll_wait returned 0 events, making the check unreliable.
2012-03-20 15:15:19 -04:00
Kristian Høgsberg
d4ae9fb5f8 TODO: Pull in updated TODO list from 1.0 roadmap email 2012-03-20 12:32:51 -04:00
Kristian Høgsberg
ccb78667b9 doc: Don't list directories in list of files to install
The find expression was listing the xml_tmp directory, because it matched
the -prune rule.
2012-03-16 09:26:05 -04:00
Ander Conselvan de Oliveira
73d4a53672 Flush the connection if we have to many marshaled fds
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-10 16:01:46 -05:00
Kristian Høgsberg
46df9232fa test-runner.c: Consolidate test running code 2012-03-05 22:29:53 -05:00
Kristian Høgsberg
4bc5a0ab2c tests: Add demarshal tests 2012-03-05 22:26:17 -05:00
Kristian Høgsberg
b2afde6f18 tests: Add more marshal tests 2012-03-05 21:53:38 -05:00
Kristian Høgsberg
d86718fc33 tests: Simplify connection tests a bit 2012-03-05 21:40:01 -05:00
Kristian Høgsberg
efab74e956 tests: Add wl_list tests 2012-03-05 21:38:25 -05:00
Kristian Høgsberg
b4351bc08e tests: More wl_map tests 2012-03-05 21:14:57 -05:00
Kristian Høgsberg
bbebd304fb TOOD: Frame based input done 2012-03-05 21:02:53 -05:00
Gaetan Nadon
c1804b5735 tests: makefile error: missing test-runner.h
Detected by running distcheck

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2012-03-05 10:57:57 -05:00
Kristian Høgsberg
814a626087 scanner: Add since attribute
This will help us document when a request or event was added to the protocol.
2012-03-05 10:31:53 -05:00
Gaetan Nadon
bb4b05bc8d check: connection-test fails to link to ffi
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-04 15:03:03 -05:00
Gaetan Nadon
7ee21abef0 publican: support out-of-source tree build
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-04 15:02:43 -05:00
Gaetan Nadon
bbddbc4829 Fix distcheck where protocol.xsl was missing in the tarball
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-04 15:01:45 -05:00
Kristian Høgsberg
8e2cac7ae4 Add wl_array_for_each 2012-03-04 13:40:49 -05:00
Kristian Høgsberg
ab0c7c58b9 Add tests subdir to toplevel SUBDIRS variable
Artie spotted this.
2012-03-03 00:40:12 -05:00
Kristian Høgsberg
87a1e59992 tests: Add connection marshalling tests 2012-03-03 00:29:21 -05:00
Kristian Høgsberg
22834deca7 tests: Add connection tests 2012-03-02 23:59:50 -05:00
Kristian Høgsberg
d2067508c1 test-runner: Fix warnings 2012-03-02 23:42:07 -05:00
Kristian Høgsberg
ac80c54f18 connection: Export wl_connection_queue() so we can test it 2012-03-02 23:38:31 -05:00
Kristian Høgsberg
e655059256 tests: Print test status after running test
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-02 22:45:28 -05:00
Kristian Høgsberg
62d2569954 tests: Add Unit tests for wl_map and wl_array data structures
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-02 18:05:33 -05:00
Ander Conselvan de Oliveira
214e343311 Terminate drag if data source is destroyed 2012-03-02 11:45:11 -05:00
Pekka Paalanen
70db367ccc server: fix event sending type mismatches
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-02 18:09:27 +02:00
Pekka Paalanen
5ee70146c6 server: use the event sending wrappers
This exposes some type mismatches that are fixed in the next commit.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-03-02 18:06:19 +02:00
Pekka Paalanen
86a5d17afe scanner: emit event wrapper functions for server
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-02 17:55:45 +02:00
Kristian Høgsberg
0d22d25b87 wayland-server: Destroy resource before sending out delete_id event
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-01 22:46:46 -05:00
Ander Conselvan de Oliveira
e7f6c509e2 Fix server crash when a client dies during a drag with an icon
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-01 11:52:05 -05:00
Ander Conselvan de Oliveira
cb3e102620 Fix wl_data_offer source destroy listener
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-03-01 11:50:53 -05:00
Kristian Høgsberg
eccc324ca8 configure.ac: Fix test-for-empty bug
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-29 12:49:42 -05:00
Rob Bradford
089c977a3b protocol: Clarify the documentation for the fullscreen protocol 2012-02-29 12:18:44 -05:00
Kristian Høgsberg
72f9fd0a57 Merge remote-tracking branch 'whot/publican' 2012-02-29 11:54:36 -05:00
Kristian Høgsberg
b26774da5b Don't block when flushing a full protocol buffer
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-29 11:07:48 -05:00
Peter Hutterer
1070579d4b Hack up distcheck for publican
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-29 12:46:01 +10:00
Peter Hutterer
a678fd53e1 Generate the docbook description for the protocol from wayland.xml
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-29 12:46:00 +10:00
Peter Hutterer
c3d56a05c6 Hook up autotools for publican
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-29 12:46:00 +10:00
Peter Hutterer
f48355cad3 doc: Comment out some of the default chapters
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-29 12:46:00 +10:00
Peter Hutterer
125289a0d7 doc: Add architecture from the website
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-29 12:46:00 +10:00
Peter Hutterer
6071b7da94 doc: Fix up title page with logo and author information
Abstract taken from http://wayland.freedesktop.org

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-29 12:46:00 +10:00
Peter Hutterer
fcddfbb769 doc: add publican-created doctree
$> 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-29 12:45:57 +10:00
Peter Hutterer
bcafc467c5 protocol: fix make distcheck
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-29 12:29:08 +10:00
Kristian Høgsberg
bf53f2033d Update TODO 2012-02-28 16:42:17 -05:00
Samuel Rødal
d224714afd Allow update function to not be set in wl_display_get_fd
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-28 14:30:39 -05:00
Samuel Rødal
bf5a8fbb98 Rename client side wl_display_destroy() to wl_display_disconnect()
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-28 14:23:58 -05:00