profile/ivi/wayland.git
13 years agoUpdate TODO
Kristian Høgsberg [Mon, 29 Aug 2011 20:50:02 +0000 (16:50 -0400)]
Update TODO

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

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

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

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

13 years agoserver: wl_display and wl_input_device are no longer resources
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

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

13 years agoStore objects in wl_map data structure
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.

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

13 years agoDestroy client resource by walking client hash table
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.

13 years agoAlways allocate a new wl_resource when binding an object
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.

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

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

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

13 years agoserver: Assign global id as part of wl_display_add_global()
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()

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

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

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

13 years agoUse a callback object instead of ad-hoc lists for sync and frame events
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.

13 years agoconnection: fix libffi usage, our functions return void
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>
13 years agoconnection: Object ID 0 is not a valid new object ID
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

13 years agoevent-loop: Quiet a few warnings
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.

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

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

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

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

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

13 years agoprotocol: Delete screenshooter.xml
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>
13 years agoscanner: Take copyright notice from xml file
Kristian Høgsberg [Tue, 26 Jul 2011 01:14:20 +0000 (18:14 -0700)]
scanner: Take copyright notice from xml file

13 years agoconnection: Use static strings instead of sprintf and buffer overflow
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>

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

13 years agoPass object ID not pointer when sending a global announce event
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.

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

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

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

13 years agodebug: add timestamps when logging
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>
13 years agoprotocol: Fix type of visual arg in token_visual event
Kristian Høgsberg [Tue, 12 Jul 2011 17:22:59 +0000 (13:22 -0400)]
protocol: Fix type of visual arg in token_visual event

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

13 years agoprotocol: Make id arg of display.global event be just a uint
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.

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

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

13 years agoserver: Add wl_client_flush()
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.

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

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

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

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

13 years agoAdd busy_count and client parameter to wl_buffer
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.

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

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

13 years agoAdd wl_display_remove_global.
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.

13 years agoDo not leak globals and listeners.
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.

13 years agoMove map functionality into shell
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.

13 years agoCall a new global listener for each existing global
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>
13 years agoFlush the protocol output buffer when it fills up
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>
13 years agoRemove left-over visual prototypes
Kristian Høgsberg [Tue, 7 Jun 2011 17:19:28 +0000 (13:19 -0400)]
Remove left-over visual prototypes

13 years agoconnection: Fix pointer arithmetic error
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.

13 years agoFall back to accept() on systems where accept4() is not implemented.
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.

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

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

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

13 years agoserver: Send error if client tries to bind to non-existant object
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

13 years agoDefine shm specific errors
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.

13 years agoUnify error events
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.

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

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

13 years agodisplay: Adds wl_display_flush to send buffered commands
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.

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

13 years agoAdd configure option to disable scanner compilation
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>
13 years agoAdd a destroy_listener to wl_resource
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.

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

13 years agoscanner: Fail if there's a 'destroy' request not marked as a destructor
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

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

13 years agoconnection: Handle fd passing in an CLOEXEC safe way
Kristian Høgsberg [Wed, 4 May 2011 16:35:16 +0000 (12:35 -0400)]
connection: Handle fd passing in an CLOEXEC safe way

13 years agommap shm buffers read/write
Kristian Høgsberg [Mon, 2 May 2011 18:48:48 +0000 (14:48 -0400)]
mmap shm buffers read/write

13 years agoAdd some things related to wayland-scanner to .gitignore
Casey Dahlin [Fri, 29 Apr 2011 06:37:47 +0000 (02:37 -0400)]
Add some things related to wayland-scanner to .gitignore

13 years agoevent-loop: Drop unused idle_list
Kristian Høgsberg [Fri, 29 Apr 2011 13:20:29 +0000 (09:20 -0400)]
event-loop: Drop unused idle_list

Idle sources are now just a special case of a checked source.

13 years agoDon't define wl_shell in wayland-server.h
Kristian Høgsberg [Fri, 22 Apr 2011 21:54:18 +0000 (17:54 -0400)]
Don't define wl_shell in wayland-server.h

13 years agoevent-loop: Idle callback are a special case of a checked source
Kristian Høgsberg [Fri, 22 Apr 2011 16:15:21 +0000 (12:15 -0400)]
event-loop: Idle callback are a special case of a checked source

13 years agoevent-loop: Dont use a check callback just dispatch again
Kristian Høgsberg [Fri, 22 Apr 2011 16:06:34 +0000 (12:06 -0400)]
event-loop: Dont use a check callback just dispatch again

We pass the poll mask so the dispatch callback can know if there is
data on the fd or not.  The dispatch function must return true if
it dispatched something, in which case we need to do another round of
post-dispatch callbacks."

13 years agoAdd common shm-server code
Benjamin Franzke [Tue, 8 Mar 2011 10:32:24 +0000 (11:32 +0100)]
Add common shm-server code

13 years agoRemove buffer.attach vfunc
Benjamin Franzke [Mon, 7 Mar 2011 14:09:36 +0000 (15:09 +0100)]
Remove buffer.attach vfunc

13 years agoAdd buffer.damage request to the protocol
Benjamin Franzke [Mon, 7 Mar 2011 14:05:27 +0000 (15:05 +0100)]
Add buffer.damage request to the protocol

Thus remove the server-side used vfunc buffer::damage.

13 years agoevent-loop: Add an optional post-dispatch source callout
Kristian Høgsberg [Thu, 21 Apr 2011 18:41:48 +0000 (14:41 -0400)]
event-loop: Add an optional post-dispatch source callout

This lets a source mark itself as ready to dispatch even though the fd
didn't trigger.   What can happen is that for the X11 socket, some other
source callback (the drm fd or a wayland client socket) can cause somebody
to do an X roundtrip (DRI2 get buffers, for example) and queue up events
in the xcb buffer.  When we get back to epoll, the X fd no longer polls
readable and we don't process those events until we get another X event.

The check callback is called after a round of dispatching and lets a source
check if it has data to dispatch and mark itself ready.  Next round of
dispatching will then process it immediately instead of blocking in
epoll_wait().

13 years agoPass version number to global bind function
Kristian Høgsberg [Mon, 18 Apr 2011 16:35:01 +0000 (12:35 -0400)]
Pass version number to global bind function

13 years agoscanner: Don't hardcode the wl_ prefix in the code generator
Kristian Høgsberg [Mon, 18 Apr 2011 14:24:11 +0000 (10:24 -0400)]
scanner: Don't hardcode the wl_ prefix in the code generator

13 years agoUse wl_client_post_global() for connect events
Kristian Høgsberg [Thu, 14 Apr 2011 20:29:59 +0000 (16:29 -0400)]
Use wl_client_post_global() for connect events

13 years agoIntroduce display.bind to request events from a global
Kristian Høgsberg [Thu, 14 Apr 2011 14:38:44 +0000 (10:38 -0400)]
Introduce display.bind to request events from a global

13 years agoPrint line numbers in scanner errors
Kristian Høgsberg [Wed, 13 Apr 2011 20:50:02 +0000 (16:50 -0400)]
Print line numbers in scanner errors

13 years agoMove proxy prototype to wayland-client.h
Kristian Høgsberg [Wed, 13 Apr 2011 20:27:06 +0000 (16:27 -0400)]
Move proxy prototype to wayland-client.h

Let's try to avoid to generate more code than we need to.

13 years agoAdd lockfile to the socket
Jørgen Lind [Wed, 13 Apr 2011 07:38:29 +0000 (09:38 +0200)]
Add lockfile to the socket

This uses flock to detect if there is a process that is active. If not
then it unlinks the socket file if it exists, so that bind won't fail

13 years agoMerge remote-tracking branch 'bnf/surface-frame-event'
Kristian Høgsberg [Mon, 11 Apr 2011 20:40:48 +0000 (16:40 -0400)]
Merge remote-tracking branch 'bnf/surface-frame-event'

13 years agoMake all fds close-on-exec
Kristian Høgsberg [Mon, 11 Apr 2011 13:24:11 +0000 (09:24 -0400)]
Make all fds close-on-exec

13 years agoMake wl_client_create() public
Kristian Høgsberg [Mon, 11 Apr 2011 13:15:09 +0000 (09:15 -0400)]
Make wl_client_create() public

13 years agoSupport passing the Wayland fd in the environment
Kristian Høgsberg [Mon, 11 Apr 2011 13:14:43 +0000 (09:14 -0400)]
Support passing the Wayland fd in the environment

13 years agoFix usage help text in wayland-scanner
Harald Fernengel [Wed, 6 Apr 2011 13:36:01 +0000 (15:36 +0200)]
Fix usage help text in wayland-scanner

13 years agoExtent frame event to be surface dependent
Benjamin Franzke [Mon, 14 Mar 2011 11:03:13 +0000 (12:03 +0100)]
Extent frame event to be surface dependent

13 years agoClose signal file descriptor in event loop on remove and failure.
Iskren Chernev [Sun, 13 Mar 2011 19:08:37 +0000 (21:08 +0200)]
Close signal file descriptor in event loop on remove and failure.

When the signal handler is removed the corresponding fd is closed. This
should automatically remove it from the epoll set.

13 years agoClose timer file descriptors in event loop on remove and failure.
Iskren Chernev [Sun, 13 Mar 2011 19:05:14 +0000 (21:05 +0200)]
Close timer file descriptors in event loop on remove and failure.

When the timer is removed the corresponding fd is closed. This should
automatically remove it from the epoll set.

13 years agoStored signal_number in event_source structure.
Iskren Chernev [Sun, 13 Mar 2011 15:01:33 +0000 (17:01 +0200)]
Stored signal_number in event_source structure.

signal_number was not previously stored, so the callbacks didn't get
a correct signal_number as their first argument.

13 years agoFix event loop timer update.
Iskren Chernev [Sun, 13 Mar 2011 14:59:30 +0000 (16:59 +0200)]
Fix event loop timer update.

It can now handle delays greater than 2 seconds without overflowing.