Ander Conselvan de Oliveira [Thu, 24 May 2012 13:17:47 +0000 (16:17 +0300)]
wayland-cursor: remove enum wl_cursor_type
Defining a list of all cursors a theme, client or toolkit should have
is not the purpose of libwayland-cursor. The cursor type enum existed
for making lookups faster, but this kind of optmization belongs in the
toolkits.
Ander Conselvan de Oliveira [Wed, 23 May 2012 13:09:55 +0000 (16:09 +0300)]
shm: use mremap on pool resize
Yan Wang [Wed, 23 May 2012 06:14:30 +0000 (14:14 +0800)]
Wayland: Add missing extern "C"
Add extern "C" macro definition for C++.
Diego Viola [Wed, 23 May 2012 06:08:08 +0000 (02:08 -0400)]
fix typo
Kristian Høgsberg [Wed, 23 May 2012 02:41:21 +0000 (22:41 -0400)]
cursor: Fix unsigned/signed comparisons
Rob Bradford [Tue, 22 May 2012 17:48:14 +0000 (18:48 +0100)]
shm: Zero busy count for allocated buffers
This avoids a valgrind error like:
==31496== Conditional jump or move depends on uninitialised value(s)
==31496== at 0x407620: weston_buffer_post_release (compositor.c:928)
==31496== by 0x406AEB: weston_surface_attach (compositor.c:725)
==31496== by 0x409EB8: pointer_attach (compositor.c:2009)
==31496== by 0x34ECE05D63: ffi_call_unix64 (unix64.S:75)
==31496== by 0x34ECE05784: ffi_call (ffi64.c:486)
==31496== by 0x5674C4D: wl_closure_invoke (connection.c:770)
==31496== by 0x566ECCB: wl_client_connection_data (wayland-server.c:255)
==31496== by 0x56722F9: wl_event_source_fd_dispatch (event-loop.c:79)
==31496== by 0x5672C99: wl_event_loop_dispatch (event-loop.c:410)
==31496== by 0x56705FF: wl_display_run (wayland-server.c:1004)
==31496== by 0x40C775: main (compositor.c:2937)
==31496== Uninitialised value was created by a heap allocation
==31496== at 0x4A074CD: malloc (vg_replace_malloc.c:236)
==31496== by 0x5670EA7: shm_pool_create_buffer (wayland-shm.c:113)
==31496== by 0x34ECE05D63: ffi_call_unix64 (unix64.S:75)
==31496== by 0x34ECE05784: ffi_call (ffi64.c:486)
==31496== by 0x5674C4D: wl_closure_invoke (connection.c:770)
==31496== by 0x566ECCB: wl_client_connection_data (wayland-server.c:255)
==31496== by 0x56722F9: wl_event_source_fd_dispatch (event-loop.c:79)
==31496== by 0x5672C99: wl_event_loop_dispatch (event-loop.c:410)
==31496== by 0x56705FF: wl_display_run (wayland-server.c:1004)
==31496== by 0x40C775: main (compositor.c:2937)
Rob Bradford [Tue, 22 May 2012 17:48:13 +0000 (18:48 +0100)]
server: Initialise serial number counter for wl_display
This ends up propagating through and creating a valgrind error like:
==22573== Conditional jump or move depends on uninitialised value(s)
==22573== at 0x409E57: pointer_attach (compositor.c:1999)
==22573== by 0x34ECE05D63: ffi_call_unix64 (unix64.S:75)
==22573== by 0x34ECE05784: ffi_call (ffi64.c:486)
==22573== by 0x5674C45: wl_closure_invoke (connection.c:770)
==22573== by 0x566ECCB: wl_client_connection_data (wayland-server.c:255)
==22573== by 0x56722F1: wl_event_source_fd_dispatch (event-loop.c:79)
==22573== by 0x5672C91: wl_event_loop_dispatch (event-loop.c:410)
==22573== by 0x56705F4: wl_display_run (wayland-server.c:1003)
==22573== by 0x40C775: main (compositor.c:2937)
Ander Conselvan de Oliveira [Tue, 22 May 2012 12:39:41 +0000 (15:39 +0300)]
Introduce libwayland-cursor, a cursor helper library
The purpose of this library is to be the equivalent of libXcursor in
the X world. This library is compatible with X cursor themes and loads
them directly into an shm pool making it easy for the clients to get
buffer for each cursor image.
The code for handling the X cursor theme was taken from libXcursor. The
files cursor/xcursor.[ch] are a stripped down version of that library
containing only the interfaces necessary for implementing the wayland
counterpart.
Ander Conselvan de Oliveira [Tue, 22 May 2012 12:39:40 +0000 (15:39 +0300)]
shm: Add request for resizing pools
Tiago Vignatti [Mon, 21 May 2012 13:47:44 +0000 (16:47 +0300)]
protocol: use transient flags for activate or not surfaces
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Kristian Høgsberg [Wed, 16 May 2012 18:25:45 +0000 (14:25 -0400)]
doc: Update docs to refer to wl_seat instead of wl_input_device
Daniel Stone [Wed, 16 May 2012 17:44:40 +0000 (18:44 +0100)]
Convert wl_input_device to wl_seat (and friends)
wl_input_device has been both renamed and split. wl_seat is now a
virtual object representing a group of logically related input devices
with related focus.
It now only generates one event: to let clients know that it has new
capabilities. It takes requests which hand back objects for the
wl_pointer, wl_keyboard and wl_touch interfaces it exposes which all
provide the old input interface, just under different names.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Darxus [Mon, 14 May 2012 20:41:10 +0000 (16:41 -0400)]
Add missing alt attributes in publican docs.
Haven't figured out how to regenerate the html, so it's not tested.
Looks like remaining html errors will be fixed in the next publican
release: https://bugzilla.redhat.com/show_bug.cgi?id=788576
Pekka Paalanen [Tue, 15 May 2012 07:29:12 +0000 (10:29 +0300)]
tests: add noop to fixed-benchmark
I was just curious of how much the looping takes time without
conversion, so I added this.
My results on Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz:
benchmarked noop: 1.876349827s
benchmarked magic: 2.245844470s
benchmarked div: 12.709085309s
benchmarked mul: 7.504838141s
Mul seems to take 15x the time magic does, cool!
Btw. the simple default cast of int32_t to double is slower than magic
for me, hence the use of union.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Sat, 12 May 2012 03:36:20 +0000 (23:36 -0400)]
Optimize wl_fixed_t to/from double conversion functions
Kristian Høgsberg [Fri, 11 May 2012 15:27:22 +0000 (11:27 -0400)]
TODO: Strike the last xkbcommon issues
Kristian Høgsberg [Thu, 10 May 2012 18:13:05 +0000 (14:13 -0400)]
protocol: Specify that the fullscreen framerate parameter is also mHz
Kristian Høgsberg [Thu, 10 May 2012 16:09:56 +0000 (12:09 -0400)]
protocol: Back out accidentally committed wl_seat changes
Kristian Høgsberg [Thu, 10 May 2012 15:56:39 +0000 (11:56 -0400)]
protocol: Add documentation for wl_output
Kristian Høgsberg [Wed, 9 May 2012 15:26:30 +0000 (11:26 -0400)]
TODO: More updates
Kristian Høgsberg [Tue, 8 May 2012 18:49:44 +0000 (14:49 -0400)]
Update TODO
Daniel did fixed point coordinates.
Daniel Stone [Tue, 8 May 2012 16:17:26 +0000 (17:17 +0100)]
Input: Convert pointer co-ordinates to signed_24_8
This offers more precision when using devices like tablets, and also for
transformed surfaces.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Tue, 8 May 2012 16:17:25 +0000 (17:17 +0100)]
Add support for signed 24.8 decimal numbers
'fixed' is a signed decimal type which offers a sign bit, 23 bits of
integer precision, and 8 bits of decimal precision. This is exposed as
an opaque struct with conversion helpers to and from double and int on
the C API side.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Kristian Høgsberg [Tue, 8 May 2012 14:42:42 +0000 (10:42 -0400)]
event-loop: Delete fd from epoll when removing event source
Closing an fd will remove it from the epoll set only if it hasn't been
dup'ed. In other words, the fd is only removed from epoll when all file
descriptors referring to the open file has been close. We now dup
fd for fd sources, so we need to use EPOLL_CTL_DEL directly now.
Kristian Høgsberg [Tue, 8 May 2012 13:58:01 +0000 (09:58 -0400)]
tests: prefix event loop tests with event_loop_
Kristian Høgsberg [Tue, 8 May 2012 13:57:17 +0000 (09:57 -0400)]
tests: assert that mask is zero is post_dispatch callback
Kristian Høgsberg [Tue, 8 May 2012 13:55:55 +0000 (09:55 -0400)]
tests: Add timerfd test
Kristian Høgsberg [Tue, 8 May 2012 13:37:34 +0000 (09:37 -0400)]
tests: Add signal test case
Doesn't necessarily catch the signalfd bug just fixed, since that only
triggers when an uninitialized int is negative.
Kristian Høgsberg [Tue, 8 May 2012 13:30:49 +0000 (09:30 -0400)]
event-loop: Consolidate code for setting up new sources
Tiago Vignatti [Tue, 8 May 2012 11:58:02 +0000 (14:58 +0300)]
event-loop: fix conditional checking
Introduced in:
commit
80f4f0d5127ebc8d5e35969a29691cf61a79997d
Author: Jonas Ådahl <jadahl@gmail.com>
Date: Wed Mar 21 10:31:24 2012 +0100
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Kristian Høgsberg [Tue, 8 May 2012 03:45:20 +0000 (23:45 -0400)]
TODO: drop scanner namespace item
Not worh the trouble.
Kristian Høgsberg [Tue, 8 May 2012 03:41:48 +0000 (23:41 -0400)]
scanner: Generalize desc_dump() to handle hanging indents
Kristian Høgsberg [Tue, 8 May 2012 02:43:56 +0000 (22:43 -0400)]
scanner: Fix desc_dump() to not extend beyond column 72
Kristian Høgsberg [Tue, 8 May 2012 02:23:05 +0000 (22:23 -0400)]
scanner: Use indent() function in desc_dump()
Daniel Stone [Fri, 4 May 2012 10:21:20 +0000 (11:21 +0100)]
Use unsigned for key/button up/down state in grabs
Since we just use it as a simple boolean flag, might as well convert it
to unsigned.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Kristian Høgsberg [Thu, 3 May 2012 19:41:50 +0000 (15:41 -0400)]
Use class_ instead of class in protocol
This way we can include the generated code from C++.
Daniel Stone [Tue, 1 May 2012 19:30:12 +0000 (20:30 +0100)]
tests: Fix out-of-tree builds
Make sure we include any generated headers from src/ as well, like
wayland-version.h.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Kristian Høgsberg [Wed, 2 May 2012 13:39:17 +0000 (09:39 -0400)]
Add shell_surface set_title and set_class requests
Nicolas Pouillon [Wed, 2 May 2012 06:46:47 +0000 (08:46 +0200)]
server: Post new globals to current clients
Globals are bursted to client on conntect. Now when new global
objects are added to the server state, existing clients also get
notified.
Kristian Høgsberg [Tue, 1 May 2012 17:50:23 +0000 (13:50 -0400)]
protocol: Move ping event down to other events
Kristian Høgsberg [Fri, 27 Apr 2012 15:31:07 +0000 (11:31 -0400)]
Add wl_proxy_get_id()
Kristian Høgsberg [Fri, 27 Apr 2012 15:28:06 +0000 (11:28 -0400)]
Add wl_client_get_object()
Kristian Høgsberg [Fri, 27 Apr 2012 15:26:57 +0000 (11:26 -0400)]
Drop stale prototype
Kristian Høgsberg [Thu, 26 Apr 2012 12:06:43 +0000 (08:06 -0400)]
tests: Just list tests under the TESTS variable
Kristian Høgsberg [Wed, 25 Apr 2012 14:45:48 +0000 (10:45 -0400)]
Merge remote-tracking branch 'pq/for-krh'
Kristian Høgsberg [Wed, 25 Apr 2012 14:12:21 +0000 (10:12 -0400)]
Add COPYING
Pekka Paalanen [Thu, 22 Mar 2012 12:24:18 +0000 (14:24 +0200)]
server: do not create wl_client if accept() failed
Spotted during wl_os_accept_cloexec() work.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 22 Mar 2012 12:16:10 +0000 (14:16 +0200)]
os: wrap accept4(SOCK_CLOEXEC)
Some system C libraries do not have SOCK_CLOEXEC, and completely miss
accept4(), too. Provide a fallback for this case.
This changes the behaviour: no error messages are printed now for
failing to set CLOEXEC but the file descriptor is closed.
The unit test for this wrapper is NOT included.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 22 Mar 2012 13:02:05 +0000 (15:02 +0200)]
os: wrap epoll_create
Some system C libraries do not have epoll_create1() nor EPOLL_CLOEXEC,
provide a fallback.
Add tests for the wrapper.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 21 Mar 2012 14:00:23 +0000 (16:00 +0200)]
os: wrap recvmsg(MSG_CMSG_CLOEXEC)
Some system C libraries do not have MSG_CMSG_CLOEXEC. This flag would
automatically set O_CLOEXEC flag on any received file descriptors.
Provide a fallback that does it manually. If setting CLOEXEC fails, the
file descriptor is closed immediately, which will lead to failures but
avoid leaks. However, setting CLOEXEC is not really expected to fail
occasionally.
Add tests for the wrapper. The setup is copied from connection-test.c.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Mon, 23 Apr 2012 11:36:32 +0000 (14:36 +0300)]
tests: silence warnings from pipe()
warning: ignoring return value of ‘pipe’, declared with attribute
warn_unused_result
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Mon, 23 Apr 2012 10:55:55 +0000 (13:55 +0300)]
os: wrap F_DUPFD_CLOEXEC
Some system C libraries do not have F_DUPFD_CLOEXEC. Provide a fallback.
Add tests for the new wl_os_dupfd_cloexec() wrapper.
Add per-wrapper call counters in os_wrappers-test.c. Makes it easier to
determine the minimum required number of wrapped calls.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Mon, 23 Apr 2012 09:10:45 +0000 (12:10 +0300)]
os: define SOCK_CLOEXEC on Linux
If it's not already defined, and we are on Linux, #define it. This gets
rid of a load of #ifdefs. This should also allow to use it when the
kernel supports it, but the libc does not define it.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Mon, 23 Apr 2012 08:37:40 +0000 (11:37 +0300)]
os: remove unneeded errno assignment
If socket() fails, it will return failure code. No need to reset errno
beforehand.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Sun, 22 Apr 2012 18:17:02 +0000 (14:17 -0400)]
tests: Test invoking closures built with wl_closure_vmarshal()
Kristian Høgsberg [Sun, 22 Apr 2012 18:16:08 +0000 (14:16 -0400)]
connection: Make sure we can invoke closures built with wl_closure_vmarshal()
Kristian Høgsberg [Sun, 22 Apr 2012 17:49:35 +0000 (13:49 -0400)]
connection: Move closure object out of wl_connection
Kristian Høgsberg [Sun, 22 Apr 2012 03:50:09 +0000 (23:50 -0400)]
connection: Dont put fds in the connection until we send the closure
Kristian Høgsberg [Fri, 20 Apr 2012 17:43:08 +0000 (13:43 -0400)]
Update TODO
Casey did surface.enter/leave.
Casey Dahlin [Tue, 17 Apr 2012 21:22:45 +0000 (17:22 -0400)]
Add wl_surface.enter and wl_surface.leave events
These events let us track when a surface enters or leaves the scanout region of
an output. This way if a surface moves to another output and that output is on
a different card, we can suggest the toolkit reallocate its buffers
appropriately.
Signed-off-by: Casey Dahlin <cdahlin@redhat.com>
Pekka Paalanen [Fri, 20 Apr 2012 11:33:49 +0000 (14:33 +0300)]
tests: add .gitignore
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 21 Mar 2012 09:11:26 +0000 (11:11 +0200)]
os: wrap socket(SOCK_CLOEXEC) calls
Some system C libraries do not offer SOCK_CLOEXEC flag.
Add a new header for OS compatibility wrappers. Wrap socket() calls into
wl_os_socket_cloexec() which makes sure the O_CLOEXEC flag gets set on
the file descriptor.
On systems having SOCK_CLOEXEC this uses the old socket() call, and
falls back if it fails due to the flag (kernel not supporting it).
wayland-os.h is private and not exported.
Add close-on-exec tests for both normal and forced fallback paths.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Fri, 20 Apr 2012 11:22:51 +0000 (14:22 +0300)]
tests: support testing fd inheritance over exec
Add facility for testing how (many) file descriptors survive an exec.
This allows implementing O_CLOEXEC tests.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Fri, 20 Apr 2012 08:21:34 +0000 (11:21 +0300)]
tests: plug fd leaks in free_source_with_data
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 19 Apr 2012 13:52:32 +0000 (16:52 +0300)]
tests: detect fd leaks
Detect file descriptor leaks in tests.
Add a sanity test to verify that we catch the leaks.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Scott Moreau [Mon, 16 Apr 2012 17:25:39 +0000 (11:25 -0600)]
protocol: Add ping event and corresponding pong request
Kristian Høgsberg [Thu, 19 Apr 2012 16:37:40 +0000 (12:37 -0400)]
tests: Add more sanity test to make sure we catch different failure modes
Kristian Høgsberg [Thu, 19 Apr 2012 16:07:20 +0000 (12:07 -0400)]
tests: Make sure unused malloc() doesn't get optimized away
Pekka Paalanen [Thu, 19 Apr 2012 11:46:52 +0000 (14:46 +0300)]
tests: add sanity-test
Test the testing framework itself, so that it catches the errors we
expect it to.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 19 Apr 2012 11:26:51 +0000 (14:26 +0300)]
tests: add support for tests expected to fail
Add a new macro FAIL_TEST that can be used to define tests that are
supposed to fail. To distinguish the supposed outcome of a test, add a
field to 'struct test'.
However, simply adding a field to 'struct test' will make all tests past
the first one in an executable to be garbage. Apparently, the variables
of type 'struct test' have different alignment when put into a special
section than otherwise, and the compiler will get the skip from one
'struct test' to the next wrong.
Explicitly specify the alingment of 'struct test' to be 16 bytes, which
is what it seems to be in the special section on x86_64.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 19 Apr 2012 11:06:08 +0000 (14:06 +0300)]
tests: stylish test-runner.c
Fix a typo, add a comment, change the print format, and add a variable
that will ease implementing tests that are expected to fail.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 19 Apr 2012 09:14:19 +0000 (12:14 +0300)]
tests: fail build if NDEBUG is defined
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 19 Apr 2012 09:12:13 +0000 (12:12 +0300)]
tests: put common test source files in a variable
Makes all test targets have the same common make dependencies.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 17 Apr 2012 12:16:38 +0000 (15:16 +0300)]
Fix printf format warnings
connection.c:530: warning: format '%lu' expects type 'long unsigned
int', but argument 2 has type 'unsigned int'
/connection.c:560: warning: format '%lu' expects type 'long unsigned
int', but argument 2 has type 'unsigned int'
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Fri, 13 Apr 2012 16:51:40 +0000 (12:51 -0400)]
data-device: Take away pointer focus when we start a dnd drag
Kristian Høgsberg [Fri, 13 Apr 2012 16:48:38 +0000 (12:48 -0400)]
data-device: Record the serial number for the current selection
And reject setting a selection that's older than our current selection.
Kristian Høgsberg [Fri, 13 Apr 2012 14:39:24 +0000 (10:39 -0400)]
data-device: Clear drag focus when we end the drag-and-drop
Otherwise we'll see a spurious leave event when we start the next dnd.
Kristian Høgsberg [Fri, 13 Apr 2012 14:13:49 +0000 (10:13 -0400)]
tests: Make leak check work again by setting default visibility for malloc/free
We compile the test cases with -fvisibility=hidden which makes
our malloc/free wrappers fail to override system malloc/free.
Kristian Høgsberg [Fri, 13 Apr 2012 14:13:21 +0000 (10:13 -0400)]
tests: Fix warning in memory leak assert
Kristian Høgsberg [Fri, 13 Apr 2012 14:11:11 +0000 (10:11 -0400)]
tests: Fix signedness warnings
Kristian Høgsberg [Fri, 13 Apr 2012 13:53:15 +0000 (09:53 -0400)]
server: Add client destroy signal
Neil Roberts [Wed, 11 Apr 2012 15:59:05 +0000 (16:59 +0100)]
Add a public header for the version number
This adds a public header so that applications can get the Wayland
version number at compile time. This can be used to make applications
that support compiling against multiple versions of Wayland.
There is a separate installed header called cogl-version.h which gets
included by both wayland-client.h and wayland-server.h
The canonical place for the version number is the configure.ac script
which splits it into three separate m4 defines for the major, minor
and micro version. These are copied into the generated
wayland-version.h header using AC_SUBST. There is also a string form
of the complete version number.
The version number is now also automatically copied into the two .pc
files.
Because the major, minor and micro parts are required it is no longer
possible to leave the version number as 'master' when building from
git. Most projects seem to immediately bump the git repo to a fake
version number (usually odd) after making a release so that there is
always a relative number that can be used for comparison. This patch
sets the git version to 0.99.0 under the assumption that the next
release will be 1.0.0.
Kristian Høgsberg [Thu, 12 Apr 2012 21:43:12 +0000 (17:43 -0400)]
Update TODO
Kristian Høgsberg [Thu, 12 Apr 2012 19:29:48 +0000 (15:29 -0400)]
Introduce wl_signal
This is mostly renaming and consolidating the listener_list pattern
into something more concise and reusable.
Kristian Høgsberg [Thu, 12 Apr 2012 02:25:51 +0000 (22:25 -0400)]
Switch protocol to using serial numbers for ordering events and requests
The wayland protocol, as X, uses timestamps to match up certain
requests with input events. The problem is that sometimes we need to
send out an event that doesn't have a corresponding timestamped input
event. For example, the pointer focus surface goes away and new
surface needs to receive a pointer enter event. These events are
normally timestamped with the evdev event timestamp, but in this case,
we don't have a evdev timestamp. So we have to go to gettimeofday (or
clock_gettime()) and then we don't know if it's coming from the same
time source etc.
However for all these cases we don't need a real time timestamp, we
just need a serial number that encodes the order of events inside the
server. So we introduce a serial number mechanism that we can use to
order events. We still need real-time timestamps for actual input
device events (motion, buttons, keys, touch), to be able to reason
about double-click speed and movement speed so events that correspond to user input carry both a serial number and a timestamp.
The serial number also give us a mechanism to key together events that
are "logically the same" such as a unicode event and a keycode event,
or a motion event and a relative event from a raw device.
Jørgen Lind [Fri, 6 Apr 2012 11:27:57 +0000 (13:27 +0200)]
remove superfluous functions
Benjamin Franzke [Fri, 6 Apr 2012 13:54:38 +0000 (15:54 +0200)]
wayland-util.h: Include stddef.h for size_t
Kristian Høgsberg [Tue, 3 Apr 2012 16:08:50 +0000 (12:08 -0400)]
shm: Allocate shm buffers through new wl_shm_pool interface
There's a big cost to setting up and tearing down a mmap and faulting in
the pages to back it. For cases where we're continuously reallocating
shm wl_buffers (resizing a surface, typically) it is a big performance
improvement to be able to reuse a mmap area. This change makes the shm
buffer allocation a two step process: first allocate a wl_shm_pool, then
allocate a buffer from the pool. The wl_shm_pool encapsulate the shared
memory pool, and lets clients allocate wl_buffers backed by chunks of that
memory. Buffers are allocated at an offset into the pool, so it's possible
to create multiple buffers from one pool, for example for icons or cursor
images.
Alex Wu [Sun, 1 Apr 2012 12:13:07 +0000 (20:13 +0800)]
wayland-utils: add wl_list_for_each_reverse_safe macro.
Add the safe version for wl_list_for_each_reverse
Kristian Høgsberg [Fri, 30 Mar 2012 15:27:02 +0000 (11:27 -0400)]
Fix remaining signedness errors
We can change the data type for 'size' but we have to cast len to size_t
for the comparisons with sizeof results.
Kristian Høgsberg [Fri, 30 Mar 2012 14:41:38 +0000 (10:41 -0400)]
wayland-util: Fix wl_array signedness warnings
Kristian Høgsberg [Fri, 30 Mar 2012 14:36:57 +0000 (10:36 -0400)]
connection.c: Fix signedness warnings
Kristian Høgsberg [Fri, 30 Mar 2012 14:28:39 +0000 (10:28 -0400)]
Move DIV_ROUNDUP out of public header, remove unused ALIGN
Kristian Høgsberg [Fri, 30 Mar 2012 14:24:29 +0000 (10:24 -0400)]
shm: Fix stride signedness in protocol
Make stride argument of wl_shm.create_buffer a signed integer.
Pekka Paalanen [Fri, 30 Mar 2012 13:38:39 +0000 (16:38 +0300)]
server: fix button signedness in wl_grab_interface
wl_input_device::grab_button is unsigned but the button parameter to
wl_grab_interface::button is signed. This lead to a warning in
data-device.c.
The button number is unsigned in the protocol, so make it unsigned in
the wl_grab_interface API, too. Fixes the compiler warning "comparison
between signed and unsigned integer expressions".
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Fri, 23 Mar 2012 12:00:32 +0000 (14:00 +0200)]
scanner: fix a signedness warning
Trivial fix to a
warning: comparison between signed and unsigned integer expressions
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 22 Mar 2012 09:33:35 +0000 (11:33 +0200)]
shm: fix cosmetic gcc warnings
Fix warning: 'static' is not at beginning of declaration
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 22 Mar 2012 15:21:58 +0000 (17:21 +0200)]
server: fix signedness in wl_client_connection_data
The variables opcode and size were unsigned, which lead to warnings
about comparisons of signed vs. unsigned.
Change these variable to signed. Their usage never relies on being
unsigned.
This also fixes (an assumed) printf format string problem, where these
were printed with %d, not %u.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 22 Mar 2012 09:30:35 +0000 (11:30 +0200)]
configure: add -Wextra -Wno-unused-parameter
This adds more gcc warnings that should be useful, and suppresses the
unused parameter warnings that are not wanted.
Most importantly, this change enables warnings about comparison between
signed and unsigned.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Thu, 29 Mar 2012 18:11:16 +0000 (14:11 -0400)]
docs: Touch ouput dir Wayland to update timestamp
Prevents rebuild every time.