chromiumos/third_party/wayland.git
3 years agoNew drag and drop / selection protocol factory-1412.B factory-1987.B factory-2268.16.B factory-2305.B factory-2338.B factory-2368.B factory-2394.B factory-2460.B factory-2475.B factory-2569.B factory-2717.B factory-2723.14.B factory-2846.B factory-2848.B factory-2914.B factory-2985.B factory-2993.B factory-3004.B factory-3536.B factory-4128.B factory-4290.B factory-4455.B factory-pit-4280.B factory-pit-4390.B factory-pit-4471.B factory-spring-3842.B factory-spring-4131.B factory-spring-4262.B firmware-butterfly-2788.B firmware-falco_peppy-4389.B firmware-leon-4389.26.B firmware-link-2348.B firmware-link-2695.2.B firmware-link-2695.B firmware-parrot-2685.B firmware-pit-4482.B firmware-snow-2695.90.B firmware-snow-2695.B firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.84.B firmware-spring-3824.B firmware-stout-2817.B firmware-wolf-4389.24.B master release-R17-1412.B release-R18-1660.B release-R19-2046.B release-R20-2268.B release-R21-2465.B release-R22-2723.B release-R23-2913.B release-R25-3428.B release-R26-3701.B release-R27-3912.B release-R28-4100.B release-R29-4319.B release-R30-4537.B stabilize stabilize-3428.110.0 stabilize-3428.149 stabilize-3428.149.B stabilize-3428.193 stabilize-3658.0.0 stabilize-3701.30.0 stabilize-3701.30.0b stabilize-3701.46.B stabilize-3701.81.B stabilize-3881.0.B stabilize-3912.79.B stabilize-4008.0.B stabilize-4035.0.B stabilize-4068.0.B stabilize-4100.38.B stabilize-4255.B stabilize-4287.B stabilize-4443.B stabilize-4512.B stabilize-bluetooth-smart stabilize-daisy stabilize-link stabilize-link-2913.278 stabilize-spring-4100.53.B stabilize2 toolchain-3428.65.B toolchain-3701.42.B toolchainA toolchainB
Kristian Høgsberg [Tue, 15 Nov 2011 13:58:34 +0000 (08:58 -0500)]
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.

3 years agoserver: Stop special casing the compositor
Kristian Høgsberg [Wed, 23 Nov 2011 15:34:50 +0000 (10:34 -0500)]
server: Stop special casing the compositor

wl_compositor_init() was just adding the global and providing a helper
bind function.  Not useful enough to warrent API.

3 years agoAdd support for server allocated object IDs
Kristian Høgsberg [Sat, 19 Nov 2011 02:59:36 +0000 (21:59 -0500)]
Add support for server allocated object IDs

We set aside a range of the object ID space for use by the server.  This
allows the server to bind an object to an ID for a client and pass that
object to the client.  The client can use the object immediately and the
server can emit events to the object immdiately.

3 years agodebug: Use unsigned for object IDs
Kristian Høgsberg [Tue, 22 Nov 2011 19:03:33 +0000 (14:03 -0500)]
debug: Use unsigned for object IDs

3 years agoscanner: Only strdup interface_name after making sure it's not NULL
Kristian Høgsberg [Sat, 19 Nov 2011 02:23:33 +0000 (21:23 -0500)]
scanner: Only strdup interface_name after making sure it's not NULL

3 years agoMove private definitions and prototypes to new wayland-private.h
Kristian Høgsberg [Fri, 18 Nov 2011 18:46:56 +0000 (13:46 -0500)]
Move private definitions and prototypes to new wayland-private.h

3 years agoFix unused variable warning
Kristian Høgsberg [Fri, 18 Nov 2011 18:11:58 +0000 (13:11 -0500)]
Fix unused variable warning

3 years agoIntroduce wl_resource_queue_event() for sending events later
Kristian Høgsberg [Thu, 17 Nov 2011 21:46:36 +0000 (16:46 -0500)]
Introduce wl_resource_queue_event() for sending events later

Some events, such as the display.delete_id, aren't very urgent and we
would like to not always send them immdiately and cause an unnecessary
context switch.  The wl_resource_queue_event() function will place the
event in the connection output buffer but not request the main loop to
poll for writable.  The effect is that the event will just sit in the
output buffer until a more important event comes around and requires
flushing.

3 years agoAdd display event to acknowledge ID deletion
Kristian Høgsberg [Wed, 16 Nov 2011 03:20:28 +0000 (22:20 -0500)]
Add display event to acknowledge ID deletion

We need to make sure the client doesn't reuse an object ID until the
server has seen the destroy request.  When a client destroys an ID
the server will now respond with the display.delete_id event, which lets
the client block reuse until it receives the event.

3 years agoutil: Add wl_list_insert_list()
Kristian Høgsberg [Tue, 15 Nov 2011 18:48:41 +0000 (13:48 -0500)]
util: Add wl_list_insert_list()

3 years agohash: Improve double hashing
Andrea Canciani [Mon, 14 Nov 2011 09:24:47 +0000 (10:24 +0100)]
hash: Improve double hashing

Instead of artificially introducing collisions in the step value by
replacing 0 with 1 (which causes the value 1 to have twice the
frequency of any other value), the step value can simply be computed
as an uniformly distributed value in the range [1, rehash], extremes
included.

This is safe because any step value smaller than the hash modulus is
co-prime with it, hence induces an orbit which includes every integer
in [0, size - 1].

3 years agoscanner: Check name == NULL for enum entries
Kristian Høgsberg [Mon, 31 Oct 2011 15:21:38 +0000 (11:21 -0400)]
scanner: Check name == NULL for enum entries

From a clang static analysis warning.

3 years agoconnection: Check object types in message parameters
Benjamin Franzke [Mon, 31 Oct 2011 10:06:35 +0000 (11:06 +0100)]
connection: Check object types in message parameters

3 years agoevent-loop: Fix idle handler dispatch corner case
Kristian Høgsberg [Sat, 29 Oct 2011 18:27:33 +0000 (14:27 -0400)]
event-loop: Fix idle handler dispatch corner case

When the last idle handler queues another idle handler, we fail to
dispatch that last handler.  The wl_list_for_each_safe loop looks up
the next pointer before running the handler, and at that point it points
to the head of the list and the loop terminates.

Instead, just loop until the list is empty.

3 years agoscanner: Fix typo in error message
Kristian Høgsberg [Mon, 24 Oct 2011 21:05:39 +0000 (17:05 -0400)]
scanner: Fix typo in error message

3 years agoprotocol: Change global_remove arg to be 'name' insteadl of 'id'
Kristian Høgsberg [Mon, 24 Oct 2011 20:05:04 +0000 (16:05 -0400)]
protocol: Change global_remove arg to be 'name' insteadl of 'id'

Consistent with global args.

3 years agoscanner: Catch more invalid attribute combinations for arg
Kristian Høgsberg [Mon, 24 Oct 2011 20:04:09 +0000 (16:04 -0400)]
scanner: Catch more invalid attribute combinations for arg

Spotted by Jakob Bornecrantz.

3 years agodebug: Print debug message when client wakes up
Kristian Høgsberg [Thu, 20 Oct 2011 19:05:11 +0000 (15:05 -0400)]
debug: Print debug message when client wakes up

This helps spot and remove extraneous round trips and context switches.

3 years agoSilence a valgrind warning
Kristian Høgsberg [Wed, 12 Oct 2011 20:30:08 +0000 (16:30 -0400)]
Silence a valgrind warning

3 years agowayland-server: Track input_device resource for focused surface factory-1235.B factory-1284.B firmware-kiev-2.112.B firmware-uboot_v2-1299.B
Kristian Høgsberg [Wed, 12 Oct 2011 02:19:34 +0000 (22:19 -0400)]
wayland-server: Track input_device resource for focused surface

We no long track the focused surface, but expect the compositor to set
focus when the focus changes.  We do track the resource for the input
device that corresponds to the current surface, in case that goes away.

3 years agowayland-server: Always use the display_resource for posting wl_display errors
Kristian Høgsberg [Tue, 11 Oct 2011 18:36:49 +0000 (14:36 -0400)]
wayland-server: Always use the display_resource for posting wl_display errors

3 years agowayland-server: fix resource destroy
Mathias Fiedler [Tue, 11 Oct 2011 18:23:45 +0000 (14:23 -0400)]
wayland-server: fix resource destroy

Object ID was read from freed memory.

3 years agowayland-server: fix crash on invalid resource
Mathias Fiedler [Tue, 11 Oct 2011 17:58:18 +0000 (13:58 -0400)]
wayland-server: fix crash on invalid resource

Using display_resource to post error about invalid resource.

Reviewed-by: Tiago Vignatti <tiago.vignatti@intel.com>
3 years agoscanner: Fix indent for *_add_listener
Benjamin Franzke [Tue, 9 Aug 2011 12:31:36 +0000 (14:31 +0200)]
scanner: Fix indent for *_add_listener

3 years agoRename motion_grab to implicit_grab 02/9702/1
Kristian Høgsberg [Tue, 6 Sep 2011 22:12:43 +0000 (18:12 -0400)]
Rename motion_grab to implicit_grab

Let's just use the same terms as X.

3 years agoAdd back get/set user data wrappers for wl_display 01/9701/1
Kristian Høgsberg [Sun, 4 Sep 2011 13:51:24 +0000 (09:51 -0400)]
Add back get/set user data wrappers for wl_display

3 years agoserver: Make error posting functions take a resource instead of a client 00/9700/1
Kristian Høgsberg [Thu, 1 Sep 2011 13:53:33 +0000 (09:53 -0400)]
server: Make error posting functions take a resource instead of a client

3 years agoRemove the wl_visual interface 99/9699/1
Kristian Høgsberg [Wed, 31 Aug 2011 01:26:19 +0000 (21:26 -0400)]
Remove the wl_visual interface

The visual interface was meant to be a generic mechanism for
specifying the content of a buffer.  It goes back to before we had the
buffer factory interfaces (like wl_drm and wl_shm) and we wanted to
keep it open-ended enough that yuv, png or even svg buffer or so would
be possible.

Now that we have the buffer abstraction, we can add different buffer
types by introducing new interfaces that create buffers.  It only
makes sense to leave it to those interfaces to specify the contents of
the buffers.

For wl_shm, this means that we now just specify the pixel format using
an enum.  For EGL buffers, the exact pixel formats are controlled by
the implementation (part of wl_drm and similar), and from the client
point of view, everything is controlled using EGLConfigs.

3 years agoUpdate TODO 98/9698/1
Kristian Høgsberg [Mon, 29 Aug 2011 20:50:02 +0000 (16:50 -0400)]
Update TODO

3 years agoserver: Disconnect client on error 97/9697/1
Kristian Høgsberg [Mon, 29 Aug 2011 19:01:41 +0000 (15:01 -0400)]
server: Disconnect client on error

3 years agoshm: Compare resource interface when validating visual 96/9696/1
Kristian Høgsberg [Mon, 29 Aug 2011 19:01:26 +0000 (15:01 -0400)]
shm: Compare resource interface when validating visual

3 years agoserver: Pass struct wl_resource for object references 95/9695/1
Kristian Høgsberg [Sat, 27 Aug 2011 16:05:09 +0000 (12:05 -0400)]
server: Pass struct wl_resource for object references

3 years agoDon't special case object ID 1 lookup 94/9694/1
Kristian Høgsberg [Sat, 27 Aug 2011 01:39:33 +0000 (21:39 -0400)]
Don't special case object ID 1 lookup

3 years agoserver: wl_display and wl_input_device are no longer resources 93/9693/1
Kristian Høgsberg [Sat, 20 Aug 2011 19:48:11 +0000 (15:48 -0400)]
server: wl_display and wl_input_device are no longer resources

3 years agoUpdate TODO 92/9692/1
Kristian Høgsberg [Sat, 20 Aug 2011 02:52:49 +0000 (22:52 -0400)]
Update TODO

3 years agoStore objects in wl_map data structure 91/9691/1
Kristian Høgsberg [Sat, 20 Aug 2011 02:50:53 +0000 (22:50 -0400)]
Store objects in wl_map data structure

The wl_map data structure is just an array with a free-list that lets the
client recycle unused client IDs and keep range of client IDs under control.

3 years agoRemove range protocol 90/9690/1
Kristian Høgsberg [Fri, 19 Aug 2011 21:26:57 +0000 (17:26 -0400)]
Remove range protocol

3 years agoDestroy client resource by walking client hash table 89/9689/1
Kristian Høgsberg [Fri, 19 Aug 2011 21:07:14 +0000 (17:07 -0400)]
Destroy client resource by walking client hash table

All resources are now in the client hash table and we can clean up
just by walking the hash.

3 years agoAlways allocate a new wl_resource when binding an object 88/9688/1
Kristian Høgsberg [Fri, 19 Aug 2011 20:57:48 +0000 (16:57 -0400)]
Always allocate a new wl_resource when binding an object

Previously we would bind some resources into multiple client hash tables.

3 years agoAdd wl_hash_table_for_each() 87/9687/1
Kristian Høgsberg [Fri, 19 Aug 2011 18:48:16 +0000 (14:48 -0400)]
Add wl_hash_table_for_each()

3 years agoBind globals to client provided object IDs 86/9686/1
Kristian Høgsberg [Fri, 19 Aug 2011 17:44:01 +0000 (13:44 -0400)]
Bind globals to client provided object IDs

3 years agoserver: Hand code all wl_display client stubs 85/9685/1
Kristian Høgsberg [Fri, 19 Aug 2011 17:40:28 +0000 (13:40 -0400)]
server: Hand code all wl_display client stubs

3 years agoserver: Assign global id as part of wl_display_add_global() 84/9684/1
Kristian Høgsberg [Fri, 19 Aug 2011 15:08:09 +0000 (11:08 -0400)]
server: Assign global id as part of wl_display_add_global()

3 years agoserver: Make object hash table per-client 83/9683/1
Kristian Høgsberg [Fri, 19 Aug 2011 15:06:37 +0000 (11:06 -0400)]
server: Make object hash table per-client

3 years agoRename global 'func' to 'bind' 82/9682/1
Kristian Høgsberg [Fri, 19 Aug 2011 15:05:01 +0000 (11:05 -0400)]
Rename global 'func' to 'bind'

3 years agoserver: Make everything in the object hash a wl_resource 81/9681/1
Kristian Høgsberg [Thu, 18 Aug 2011 21:53:50 +0000 (17:53 -0400)]
server: Make everything in the object hash a wl_resource

3 years agoUse a callback object instead of ad-hoc lists for sync and frame events 80/9680/1
Kristian Høgsberg [Sat, 30 Jul 2011 02:51:22 +0000 (19:51 -0700)]
Use a callback object instead of ad-hoc lists for sync and frame events

So obvious in retrospect.  The object system can do all the work for us
and keep track of pending calls as regular objects and we don't need to
abuse the resource system to get them cleaned up on client exit.  We
don't need the custom key management or (broken) lookup, we just sue
object IDs.  And last but not least, anybody can receive the callback,
not just display listeners.

3 years agoconnection: fix libffi usage, our functions return void 79/9679/1
Paulo Zanoni [Fri, 26 Aug 2011 22:41:05 +0000 (19:41 -0300)]
connection: fix libffi usage, our functions return void

All clients were segfaulting on my machine.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
3 years agoconnection: Object ID 0 is not a valid new object ID 78/9678/1
Kristian Høgsberg [Fri, 12 Aug 2011 20:32:13 +0000 (16:32 -0400)]
connection: Object ID 0 is not a valid new object ID

3 years agoevent-loop: Quiet a few warnings 77/9677/1
Kristian Høgsberg [Fri, 12 Aug 2011 20:23:07 +0000 (16:23 -0400)]
event-loop: Quiet a few warnings

There's no good error recovery possible in these cases though.

3 years agoMake expat a dependency to the scanner 76/9676/1
Jørgen Lind [Thu, 4 Aug 2011 05:56:04 +0000 (07:56 +0200)]
Make expat a dependency to the scanner

3 years agoRename source subdir from wayland to src 75/9675/1
Kristian Høgsberg [Fri, 12 Aug 2011 19:09:00 +0000 (15:09 -0400)]
Rename source subdir from wayland to src

3 years agoChange scanner.c license to MIT 74/9674/1
Kristian Høgsberg [Thu, 11 Aug 2011 18:51:31 +0000 (14:51 -0400)]
Change scanner.c license to MIT

3 years agoscanner: Silence warning 73/9673/1
Kristian Høgsberg [Wed, 27 Jul 2011 19:05:34 +0000 (12:05 -0700)]
scanner: Silence warning

3 years agoscanner: Initialize protocol.copyright to NULL 72/9672/1
Kristian Høgsberg [Wed, 27 Jul 2011 12:50:41 +0000 (05:50 -0700)]
scanner: Initialize protocol.copyright to NULL

3 years agoprotocol: Delete screenshooter.xml 71/9671/1
Tiago Vignatti [Tue, 26 Jul 2011 08:43:19 +0000 (11:43 +0300)]
protocol: Delete screenshooter.xml

The protocol interface is on compositor's side now.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
3 years agoscanner: Take copyright notice from xml file 70/9670/1
Kristian Høgsberg [Tue, 26 Jul 2011 01:14:20 +0000 (18:14 -0700)]
scanner: Take copyright notice from xml file

3 years agoconnection: Use static strings instead of sprintf and buffer overflow 69/9669/1
Kristian Høgsberg [Tue, 19 Jul 2011 17:01:46 +0000 (10:01 -0700)]
connection: Use static strings instead of sprintf and buffer overflow

Spotted by Samuel Rødal <samuel.rodal@nokia.com>

3 years agoLink to -lrt for clock_gettime() 68/9668/1
Kristian Høgsberg [Mon, 18 Jul 2011 17:35:18 +0000 (13:35 -0400)]
Link to -lrt for clock_gettime()

3 years agoPass object ID not pointer when sending a global announce event 67/9667/1
Casey Dahlin [Mon, 18 Jul 2011 06:00:25 +0000 (02:00 -0400)]
Pass object ID not pointer when sending a global announce event

When the type for the first argument of the global event changed from new_id to
uint, wl_connection_vmarshal started expecting an integer argument rather than
an object argument. As a result we were sending the client a chunk of pointer
rather than a useful global identifier.

3 years agoconection: Handle demarshal errors a little less dramatically 66/9666/1
Kristian Høgsberg [Mon, 18 Jul 2011 17:10:49 +0000 (13:10 -0400)]
conection: Handle demarshal errors a little less dramatically

3 years agoFix segfault in client when demarshalling fails 65/9665/1
Casey Dahlin [Mon, 18 Jul 2011 06:00:24 +0000 (02:00 -0400)]
Fix segfault in client when demarshalling fails

3 years agoprotocol: fix key event and related comments 64/9664/1
Tiago Vignatti [Thu, 14 Jul 2011 15:56:51 +0000 (18:56 +0300)]
protocol: fix key event and related comments

3 years agodebug: add timestamps when logging 63/9663/1
Tiago Vignatti [Thu, 14 Jul 2011 15:56:40 +0000 (18:56 +0300)]
debug: add timestamps when logging

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
3 years agoprotocol: Fix type of visual arg in token_visual event 62/9662/1
Kristian Høgsberg [Tue, 12 Jul 2011 17:22:59 +0000 (13:22 -0400)]
protocol: Fix type of visual arg in token_visual event

3 years agoscanner: Output type info for new_id arguments 61/9661/1
Kristian Høgsberg [Tue, 12 Jul 2011 17:22:25 +0000 (13:22 -0400)]
scanner: Output type info for new_id arguments

3 years agoprotocol: Make id arg of display.global event be just a uint 60/9660/1
Kristian Høgsberg [Mon, 11 Jul 2011 15:15:00 +0000 (11:15 -0400)]
protocol: Make id arg of display.global event be just a uint

Global names are different from object IDs.

3 years agoscanner: map 'int' to int32_t. 59/9659/1
Kristian Høgsberg [Thu, 7 Jul 2011 17:39:08 +0000 (13:39 -0400)]
scanner: map 'int' to int32_t.

3 years agoAdd touch events to protocol. 58/9658/1
Laszlo Agocs [Wed, 29 Jun 2011 14:54:11 +0000 (17:54 +0300)]
Add touch events to protocol.

3 years agoserver: Add wl_client_flush() 57/9657/1
Kristian Høgsberg [Wed, 29 Jun 2011 15:43:11 +0000 (11:43 -0400)]
server: Add wl_client_flush()

Flush output queue up for the specified client.

3 years agoevent-loop: Make idle handlers work again 56/9656/1
Kristian Høgsberg [Thu, 23 Jun 2011 10:43:47 +0000 (06:43 -0400)]
event-loop: Make idle handlers work again

3 years agoUpdate TODO 55/9655/1
Kristian Høgsberg [Tue, 21 Jun 2011 20:25:28 +0000 (16:25 -0400)]
Update TODO

3 years agoMerge remote-tracking branch 'bnf/buffer.release' 54/9654/1
Kristian Høgsberg [Tue, 21 Jun 2011 16:15:31 +0000 (12:15 -0400)]
Merge remote-tracking branch 'bnf/buffer.release'

3 years agoDrop wl_compoositor parameter in wl_buffer 53/9653/1
Benjamin Franzke [Tue, 21 Jun 2011 15:37:18 +0000 (17:37 +0200)]
Drop wl_compoositor parameter in wl_buffer

3 years agoAdd busy_count and client parameter to wl_buffer 52/9652/1
Benjamin Franzke [Tue, 10 May 2011 10:01:00 +0000 (12:01 +0200)]
Add busy_count and client parameter to wl_buffer

Can be used to implement release event.

3 years agoAdd buffer.release event 51/9651/1
Benjamin Franzke [Mon, 9 May 2011 15:35:58 +0000 (17:35 +0200)]
Add buffer.release event

3 years agoAdd more protocol for communicating screen geometry 50/9650/1
Kristian Høgsberg [Tue, 21 Jun 2011 00:34:55 +0000 (20:34 -0400)]
Add more protocol for communicating screen geometry

3 years agoAdd wl_display_remove_global. 49/9649/1
Laszlo Agocs [Tue, 14 Jun 2011 08:35:46 +0000 (10:35 +0200)]
Add wl_display_remove_global.

Change 4453ba084aae5a00318b9dfdeda95e8eaa17494c disallows using
post_global with objects not on the global list. Therefore selection
and drag offers have to be added to the global list from now on.
However these may often get replaced by a newer object and thus need a
way to remove a global from the global list.

3 years agoDo not leak globals and listeners. 48/9648/1
Laszlo Agocs [Tue, 14 Jun 2011 09:41:54 +0000 (11:41 +0200)]
Do not leak globals and listeners.

 From 3fa2ad7dec42f85795449f33b2a4c9461aa4924d Mon Sep 17 00:00:00 2001
From: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Date: Tue, 14 Jun 2011 11:35:28 +0200
Subject: [PATCH] Do not leak globals and listeners.

3 years agoMove map functionality into shell 47/9647/1
Kristian Høgsberg [Sat, 18 Jun 2011 12:17:40 +0000 (08:17 -0400)]
Move map functionality into shell

Initial surface.attach makes the surface visible and clients
can set the surface type using shell.set_transient etc or
other interfaces prior to that.

3 years agoCall a new global listener for each existing global 46/9646/1
Corentin Chary [Fri, 10 Jun 2011 08:27:16 +0000 (10:27 +0200)]
Call a new global listener for each existing global

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
3 years agoFlush the protocol output buffer when it fills up 45/9645/1
Corentin Chary [Fri, 10 Jun 2011 08:24:23 +0000 (10:24 +0200)]
Flush the protocol output buffer when it fills up

Original patch from bnf.

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
3 years agoRemove left-over visual prototypes 44/9644/1
Kristian Høgsberg [Tue, 7 Jun 2011 17:19:28 +0000 (13:19 -0400)]
Remove left-over visual prototypes

3 years agoconnection: Fix pointer arithmetic error 43/9643/1
Kristian Høgsberg [Tue, 7 Jun 2011 14:53:27 +0000 (10:53 -0400)]
connection: Fix pointer arithmetic error

Pointed out by Nicolas Pouillon in irc.

3 years agoFall back to accept() on systems where accept4() is not implemented. 42/9642/1
Samuel Rødal [Mon, 30 May 2011 15:23:40 +0000 (17:23 +0200)]
Fall back to accept() on systems where accept4() is not implemented.

3 years agowayland-shm: Check visual for being NULL 41/9641/1
Benjamin Franzke [Tue, 31 May 2011 09:18:06 +0000 (11:18 +0200)]
wayland-shm: Check visual for being NULL

3 years agoTODO: Update 40/9640/1
Kristian Høgsberg [Thu, 19 May 2011 15:53:39 +0000 (11:53 -0400)]
TODO: Update

3 years agoAdd event to associate visuals with a pixel format token 39/9639/1
Kristian Høgsberg [Fri, 13 May 2011 01:29:22 +0000 (21:29 -0400)]
Add event to associate visuals with a pixel format token

3 years agoserver: Send error if client tries to bind to non-existant object 38/9638/1
Kristian Høgsberg [Fri, 13 May 2011 01:27:57 +0000 (21:27 -0400)]
server: Send error if client tries to bind to non-existant object

3 years agoDefine shm specific errors 37/9637/1
Kristian Høgsberg [Wed, 11 May 2011 15:00:40 +0000 (11:00 -0400)]
Define shm specific errors

We stop abusing the wl_display error codes for shm purposes.

3 years agoUnify error events 36/9636/1
Kristian Høgsberg [Wed, 11 May 2011 14:57:06 +0000 (10:57 -0400)]
Unify error events

Consolidate the different error events into one.  This event will also be
usable for other interaces.

3 years agoTODO: Consolidate and update 35/9635/1
Kristian Høgsberg [Wed, 11 May 2011 02:56:01 +0000 (22:56 -0400)]
TODO: Consolidate and update

3 years agoconnection.c: Use sizeof int for allocating fd extra storage 34/9634/1
Kristian Høgsberg [Wed, 11 May 2011 01:49:22 +0000 (21:49 -0400)]
connection.c: Use sizeof int for allocating fd extra storage

3 years agodisplay: Adds wl_display_flush to send buffered commands 33/9633/1
Robert Bragg [Tue, 10 May 2011 16:51:52 +0000 (17:51 +0100)]
display: Adds wl_display_flush to send buffered commands

Previously for wayland clients to flush buffered connection data to the
compositor they needed to first register an event-mask-update-callback
via wl_display_get_fd() to determine if there is anything writeable
pending.  (NB: It's considered an error to iterate connection data with
an invalid mask)

Since it's only possible to register a single update callback currently
it's a bit awkward if you want to allow multiple orthogonal components
to flush the connection data, such as Cogl and Clutter which both want
to interact with wayland and may want to flush commands at different
times.

This adds a mechanism, wl_display_flush(), which makes it possible to
flush writeable connection data without first checking the event mask.

3 years agowayland-util: Drop unused struct wl_argument 32/9632/1
Benjamin Franzke [Tue, 10 May 2011 10:56:22 +0000 (12:56 +0200)]
wayland-util: Drop unused struct wl_argument

3 years agoAdd configure option to disable scanner compilation 31/9631/1
jani.uusi-rantala@nokia.com [Fri, 6 May 2011 06:13:36 +0000 (06:13 +0000)]
Add configure option to disable scanner compilation

When cross-compiling Wayland, wayland-scanner should be picked up from
the host system instead of compiling and trying to run e.g. ARM
wayland-scanner on X86.

This patch adds --disable-scanner option for disabling the scanner
from the build and using existing wayland-scanner instead (from PATH)
which should help in most cross-compilation systems.

By default everything works as before.

Signed-off-by: Jani Uusi-Rantala <jani.uusi-rantala@nokia.com>
3 years agoAdd a destroy_listener to wl_resource 30/9630/1
Benjamin Franzke [Fri, 6 May 2011 15:09:51 +0000 (17:09 +0200)]
Add a destroy_listener to wl_resource

Drop the one in wl_surface.

3 years agoconnection: Define _GNU_SOURCE for F_DUPFD_CLOEXEC 29/9629/1
Benjamin Franzke [Wed, 4 May 2011 19:21:52 +0000 (21:21 +0200)]
connection: Define _GNU_SOURCE for F_DUPFD_CLOEXEC

3 years agoscanner: Fail if there's a 'destroy' request not marked as a destructor 28/9628/1
Kristian Høgsberg [Wed, 4 May 2011 19:51:47 +0000 (15:51 -0400)]
scanner: Fail if there's a 'destroy' request not marked as a destructor

3 years agoscanner: Initialize wl_message structs completely 27/9627/1
Kristian Høgsberg [Wed, 4 May 2011 19:29:55 +0000 (15:29 -0400)]
scanner: Initialize wl_message structs completely