Commit graph

1016 commits

Author SHA1 Message Date
Rob Bradford
e4efef869e cursor: Link libwayland-cursor to libwayland-client
LDADD is only used when linking programs not libraries.

Spotted-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-05-29 10:07:30 -04:00
Ander Conselvan de Oliveira
75a5f7476a data-device: implement drags with no data source for self-dnd
Properly handle a drag with no data source, i.e., don't crash and send
events only to the client that initiated the drag. This way a client can
do self drag and drop without offering anything to other clients.
2012-05-29 09:58:13 -04:00
Ander Conselvan de Oliveira
d422a733b4 data-device: fix crash when a client dies during a drag with an icon
The commit that split wl_input_device into wl_seat and friends changed
erroneously the drag icon destroy listener, causing it to operate into
an invalid pointer to a wl_seat.
2012-05-25 23:10:01 -04:00
Ander Conselvan de Oliveira
c66f26024b wayland-cursor: load all cursors from a theme on wl_cursor_theme_load 2012-05-25 23:06:27 -04:00
Ander Conselvan de Oliveira
f779c57be2 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.
2012-05-25 23:06:15 -04:00
Ander Conselvan de Oliveira
086b4e2c1a shm: use mremap on pool resize 2012-05-23 10:03:53 -04:00
Yan Wang
d860f0cbec Wayland: Add missing extern "C"
Add extern "C" macro definition for C++.
2012-05-23 09:32:03 -04:00
Diego Viola
00de1e6cce fix typo 2012-05-23 09:10:00 -04:00
Kristian Høgsberg
5030af7635 cursor: Fix unsigned/signed comparisons 2012-05-22 22:41:21 -04:00
Rob Bradford
3cc187c73e 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)
2012-05-22 15:50:26 -04:00
Rob Bradford
1323b074c3 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)
2012-05-22 15:24:48 -04:00
Ander Conselvan de Oliveira
775002c6c0 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.
2012-05-22 15:20:13 -04:00
Ander Conselvan de Oliveira
ff0d745674 shm: Add request for resizing pools 2012-05-22 15:20:12 -04:00
Tiago Vignatti
35a92ef83b protocol: use transient flags for activate or not surfaces
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-05-21 12:55:36 -04:00
Kristian Høgsberg
94bb47020a doc: Update docs to refer to wl_seat instead of wl_input_device 2012-05-16 14:25:45 -04:00
Daniel Stone
aa0fb0f49c 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>
2012-05-16 14:19:22 -04:00
Darxus
6d1902b85c 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
2012-05-15 11:02:13 -04:00
Pekka Paalanen
32ec041333 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>
2012-05-15 11:00:19 -04:00
Kristian Høgsberg
f5df38959b Optimize wl_fixed_t to/from double conversion functions 2012-05-14 09:36:38 -04:00
Kristian Høgsberg
fefa8c0fd5 TODO: Strike the last xkbcommon issues 2012-05-11 11:27:22 -04:00
Kristian Høgsberg
bd5617772c protocol: Specify that the fullscreen framerate parameter is also mHz 2012-05-10 14:13:05 -04:00
Kristian Høgsberg
e8aa047259 protocol: Back out accidentally committed wl_seat changes 2012-05-10 12:09:56 -04:00
Kristian Høgsberg
0155c28e8c protocol: Add documentation for wl_output 2012-05-10 12:02:01 -04:00
Kristian Høgsberg
68e0eaa2b5 TODO: More updates 2012-05-09 11:26:30 -04:00
Kristian Høgsberg
6b8816bab4 Update TODO
Daniel did fixed point coordinates.
2012-05-08 14:49:44 -04:00
Daniel Stone
0c20496e1a 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>
2012-05-08 14:40:46 -04:00
Daniel Stone
c5aba11acc 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>
2012-05-08 14:40:39 -04:00
Kristian Høgsberg
c49f632dae 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.
2012-05-08 10:42:42 -04:00
Kristian Høgsberg
f42d763cd0 tests: prefix event loop tests with event_loop_ 2012-05-08 09:58:01 -04:00
Kristian Høgsberg
d8dda50d27 tests: assert that mask is zero is post_dispatch callback 2012-05-08 09:57:17 -04:00
Kristian Høgsberg
550e8f3861 tests: Add timerfd test 2012-05-08 09:55:55 -04:00
Kristian Høgsberg
d56af2787e tests: Add signal test case
Doesn't necessarily catch the signalfd bug just fixed, since that only
triggers when an uninitialized int is negative.
2012-05-08 09:41:37 -04:00
Kristian Høgsberg
3e7bd7362b event-loop: Consolidate code for setting up new sources 2012-05-08 09:30:49 -04:00
Tiago Vignatti
a41fa8b3ec event-loop: fix conditional checking
Introduced in:
    commit 80f4f0d512
    Author: Jonas Ådahl <jadahl@gmail.com>
    Date:   Wed Mar 21 10:31:24 2012 +0100

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-05-08 09:08:57 -04:00
Kristian Høgsberg
a73c91585e TODO: drop scanner namespace item
Not worh the trouble.
2012-05-07 23:45:20 -04:00
Kristian Høgsberg
375cb418f4 scanner: Generalize desc_dump() to handle hanging indents 2012-05-07 23:41:48 -04:00
Kristian Høgsberg
5b0d8f09af scanner: Fix desc_dump() to not extend beyond column 72 2012-05-07 22:43:56 -04:00
Kristian Høgsberg
e4026ff797 scanner: Use indent() function in desc_dump() 2012-05-07 22:38:23 -04:00
Daniel Stone
3f7048e0e9 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>
2012-05-07 12:15:14 -04:00
Kristian Høgsberg
3de517a092 Use class_ instead of class in protocol
This way we can include the generated code from C++.
2012-05-03 15:41:50 -04:00
Daniel Stone
0a828e098c 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>
2012-05-02 16:01:04 -04:00
Kristian Høgsberg
2753904eda Add shell_surface set_title and set_class requests 2012-05-02 09:39:17 -04:00
Nicolas Pouillon
c1b6dbbacd 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.
2012-05-02 09:35:39 -04:00
Kristian Høgsberg
5177e76984 protocol: Move ping event down to other events 2012-05-01 13:50:23 -04:00
Kristian Høgsberg
35fc72eb8b Add wl_proxy_get_id() 2012-04-27 11:31:07 -04:00
Kristian Høgsberg
ac73a74f43 Add wl_client_get_object() 2012-04-27 11:28:06 -04:00
Kristian Høgsberg
4fd3696f98 Drop stale prototype 2012-04-27 11:26:57 -04:00
Kristian Høgsberg
bf1c2f3257 tests: Just list tests under the TESTS variable 2012-04-26 08:06:43 -04:00
Kristian Høgsberg
5be33520b3 Merge remote-tracking branch 'pq/for-krh' 2012-04-25 10:45:48 -04:00
Kristian Høgsberg
f72c0c2a24 Add COPYING 2012-04-25 10:12:21 -04:00