Re: [PATCH 2/2] protocol: Support scaled outputs and surfaces

2013-05-16 Thread Jason Ekstrand
nt to keep everything sane.) 3. Since surfaces are scaled relative to their preferred output, the user can specify arbitrary scaling factors for each output and are not restricted to integers. I proposed this in more detail in a previous email but no one bothered to respond to it. Thanks

Re: [PATCH 2/2] protocol: Support scaled outputs and surfaces

2013-05-16 Thread Jason Ekstrand
On May 16, 2013 1:11 PM, "Bill Spitzak" wrote: > > Jason Ekstrand wrote: > >> I still think we can solve this problem better if the clients, instead of providing some sort of pre-scaled buffer that matches the output's arbitrary scale factor, simply told the composi

Re: [PATCH 2/2] protocol: Support scaled outputs and surfaces

2013-05-20 Thread Jason Ekstrand
On Mon, May 20, 2013 at 4:00 AM, Pekka Paalanen wrote: > On Thu, 16 May 2013 16:43:52 -0500 > Jason Ekstrand wrote: > > > The point of this soi is to allow surfaces to render the same size on > > different density outputs. > > Are you serious? Really? Same siz

Re: [PATCH 00/15] weston scaling support

2013-05-22 Thread Jason Ekstrand
On Wed, May 22, 2013 at 7:57 PM, Kristian Høgsberg wrote: > On Wed, May 22, 2013 at 02:41:24PM +0200, al...@redhat.com wrote: > > From: Alexander Larsson > > > > This adds support to weston (X11 and DRM backends) for output > > scale and buffer_scale. It also contains some work on the > > example

Re: [PATCH] wl_resource: Add version field and getter/setter

2013-05-23 Thread Jason Ekstrand
uct wl_client *client, > struct wl_resource * > wl_client_get_object(struct wl_client *client, uint32_t id); > > +void > +wl_resource_set_version(struct wl_resource *resource, > + uint32_t version); > +uint32_t > +wl_resource_get_version(struct wl_resource *resource); > + > struct wl_listener { > struct wl_list link; > wl_notify_func_t notify; > -- > 1.8.1.4 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/wayland-devel > Thanks, --Jason Ekstrand ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Re: [PATCH] wayland-server: Version check requests

2013-05-23 Thread Jason Ekstrand
; 0 && > + > object->interface->events[object->interface->event_count-1].name == NULL) { > + uint32_t *method_counts = (uint32_t *) > + > object->interface->events[object->interface->event_count-1].types; > + > +

Re: minimized and stick windows

2013-05-28 Thread Jason Ekstrand
l, That looks like a good starting point to me. I'm not a huge fan of the names of things but those can be debated/changed any time before we release. I'd say the basics look good and you might as well go ahead and start implementing. --Jason Ekstrand ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel

[PATCH wayland] Clean up the internals of wl_map

2013-05-29 Thread Jason Ekstrand
This commit cleans up the internals of wl_map by splitting it into two wl_simple_maps. This both makes the internals cleaner and also fixes potential issues with having a single free_list for both sides of the map. Signed-off-by: Jason Ekstrand --- src/wayland-private.h | 10 ++- src/wayland

[PATCH wayland] Clean up the internals of wl_map

2013-05-29 Thread Jason Ekstrand
This commit cleans up the internals of wl_map by splitting it into two wl_simple_maps. This both makes the internals cleaner and also fixes potential issues with having a single free_list for both sides of the map. Signed-off-by: Jason Ekstrand --- Ignore the previous patch as it contained an

Re: [PATCH wayland] Clean up the internals of wl_map

2013-06-01 Thread Jason Ekstrand
Ignore these. Turns out I was trying to fix the wrong issue. New patches to come -- Jason Ekstrand On Wed, May 29, 2013 at 10:06 PM, Jason Ekstrand wrote: > This commit cleans up the internals of wl_map by splitting it into two > wl_simple_maps. This both makes the internals cleaner an

[PATCH wayland 0/4] Make wl_resource opaque

2013-06-01 Thread Jason Ekstrand
accesses have been removed from weston. Jason Ekstrand (4): Add a "side" field and some sanity checks to wl_map. Add support for flags in the wl_map API and add a WL_MAP_ENTRY_LEGACY flag Add accessor functions for wl_resource and deprecate wl_client_add_resource Make wl_resou

[PATCH wayland 1/4] Add a "side" field and some sanity checks to wl_map.

2013-06-01 Thread Jason Ekstrand
an object Because of the problem in wl_map_remove, the server would take an old client-side id, apply the WL_SERVER_ID_START offset, and try to use it as a server-side id regardless of whether or not it was valid. Signed-off-by: Jason Ekstrand --- src/wayland-client.c | 10 -- src

[PATCH wayland 2/4] Add support for flags in the wl_map API and add a WL_MAP_ENTRY_LEGACY flag

2013-06-01 Thread Jason Ekstrand
The implementation in this commit allows for one bit worth of flags. If more flags are desired at a future date, then the wl_map implementation will have to change but the wl_map API will not. Signed-off-by: Jason Ekstrand --- src/wayland-client.c | 12 ++-- src/wayland-private.h | 13

[PATCH wayland 3/4] Add accessor functions for wl_resource and deprecate wl_client_add_resource

2013-06-01 Thread Jason Ekstrand
This is the first step towards making wl_resource an opaque pointer type. Signed-off-by: Jason Ekstrand --- src/wayland-server.c | 44 ++-- src/wayland-server.h | 29 +++-- src/wayland-shm.c| 35

[PATCH wayland 4/4] Make wl_resource opaque

2013-06-01 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/wayland-server.c | 25 + src/wayland-server.h | 40 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/src/wayland-server.c b/src/wayland-server.c index 13b9dc8..3fe9dea 100644

Re: [PATCH wayland 2/4] Add support for flags in the wl_map API and add a WL_MAP_ENTRY_LEGACY flag

2013-06-03 Thread Jason Ekstrand
On Mon, Jun 3, 2013 at 4:36 AM, Ander Conselvan de Oliveira < conselv...@gmail.com> wrote: > On 06/02/2013 01:40 AM, Jason Ekstrand wrote: > >> The implementation in this commit allows for one bit worth of flags. If >> more flags are desired at a future date, then t

Re: [PATCH 00/15] weston scaling support

2013-06-03 Thread Jason Ekstrand
huge problem, but I'm not convinced it's a smaller restriction than requiring subsurfaces on pel-boundaries. 3. This makes the subsurface case of handing off to a library more complicated. In Alexander's implementation, the library would simply render at native resolution or not. With this, the client has to tell the library what surface scale to use and the library has to *EXACTLY* match. Maybe this isn't a huge issue, but there's no opportunity for a client to embed an older library. 4. If a client presents a scale_factor to the compositor that is not an integer multiple of one of the ouput_scale factors provided by the compositor, it should not expect the compositor to do anything intelligent. There are similar problems with integer proposal, but this one makes it more interesting. Food for thought, --Jason Ekstrand ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel

[PATCH wayland] Update tests for wl_map changes and add a map_flags test

2013-06-05 Thread Jason Ekstrand
--- tests/connection-test.c | 4 ++-- tests/map-test.c | 54 ++-- tests/os-wrappers-test.c | 2 +- 3 files changed, 41 insertions(+), 19 deletions(-) diff --git a/tests/connection-test.c b/tests/connection-test.c index 9a07d71..e284ea0 100644

[PATCH wayland 1/2] Change WL_ZOMBIE_OBJECT from 0x2 to an actual pointer

2013-06-05 Thread Jason Ekstrand
are only every compared to WL_ZOMBIE_OBJECT with "==" or "!=", the only thing that matters is that it is unique. Signed-off-by: Jason Ekstrand --- src/wayland-private.h | 5 +++-- src/wayland-util.c| 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src

[PATCH 2/2] Remove incorrect sanity-check from wl_map_insert_at

2013-06-05 Thread Jason Ekstrand
I got a little over-eager with my sanity checks and didn't realize that the client uses wl_map_insert_at to mark objects as zombies when they come from the server-side. Signed-off-by: Jason Ekstrand --- src/wayland-util.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/wa

Re: [PATCH wayland 1/2] Change WL_ZOMBIE_OBJECT from 0x2 to an actual pointer

2013-06-06 Thread Jason Ekstrand
On Jun 6, 2013 1:37 AM, "Pekka Paalanen" wrote: > > On Wed, 5 Jun 2013 16:39:50 -0500 > Jason Ekstrand wrote: > > > In order to use the second-lowest bit of each pointer in wl_map for the > > WL_MAP_ENTRY_LEGACY flag, every pointer has to be a multiple of

[RFC weston] Change weston_surface.resource to a wl_resource pointer.

2013-06-06 Thread Jason Ekstrand
This is the first in what will be a series of weston patches to convert instances of wl_resource to pointers so we can make wl_resource opaque. This patch handles weston_surface and should be the most invasive of the entire series. I am sending this one out ahead of the rest for review. Specifica

[RFC 00/12] Convert all wl_resources to pointers and accessor

2013-06-14 Thread Jason Ekstrand
that issue. Beyond that, I have a few notes here-and-there among the patches, but most of it is routine. Thanks, --Jason Ekstrand Jason Ekstrand (11 for weston): Use wl_resource_get_user_data for weston_surface resources shell: Convert resources to pointers data-device: Change resources

[RFC wayland 01/12] server: Add aditional wl_resource accessors

2013-06-14 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/wayland-server.c | 30 ++ src/wayland-server.h | 6 ++ 2 files changed, 36 insertions(+) diff --git a/src/wayland-server.c b/src/wayland-server.c index 2052f88..e2776ff 100644 --- a/src/wayland-server.c +++ b/src/wayland

[RFC weston 02/12] Use wl_resource_get_user_data for weston_surface resources

2013-06-14 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/compositor.c | 28 src/data-device.c | 6 +++--- src/input.c| 2 +- src/shell.c| 25 - src/tablet-shell.c | 10 +- src/text-backend.c | 2 +- 6 files changed, 42 insertions

[RFC weston 03/12] shell: Convert resources to pointers

2013-06-14 Thread Jason Ekstrand
This commit converts shell_surface.resource to a pointers and updates shell.c to use wl_resource_get accessors for shell_surface, desktop_shell, screensaver, and workspace_manager related resources. Signed-off-by: Jason Ekstrand --- src/shell.c | 126

[RFC weston 04/12] data-device: Change resources in wl_data_offer and wl_data_source to pointers.

2013-06-14 Thread Jason Ekstrand
Because of its links to selection.c and xwayland, a destroy_signal field was also added to wl_data_source. Before selection.c and xwayland were manually initializing the resource.destroy_signal field so that it could be used without a valid resource. Signed-off-by: Jason Ekstrand --- Here I

[RFC weston 05/12] region: Change resource to a wl_resource pointer

2013-06-14 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/compositor.c | 23 --- src/compositor.h | 2 +- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 14080a1..2f178fd 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1482,7

[RFC weston 06/12] callback: Change resource to a wl_resource pointer

2013-06-14 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/compositor.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 2f178fd..f1ff516 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1002,7 +1002,7

[RFC weston 07/12] input_panel_surface: Change resource to a wl_resource pointer

2013-06-14 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/shell.c| 38 +++ src/tablet-shell.c | 59 +- 2 files changed, 48 insertions(+), 49 deletions(-) diff --git a/src/shell.c b/src/shell.c index 6834d21..64b783d 100644

[RFC weston 08/12] text-backend: Change resources to wl_resource pointers

2013-06-14 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/text-backend.c | 148 +++-- 1 file changed, 76 insertions(+), 72 deletions(-) diff --git a/src/text-backend.c b/src/text-backend.c index 27afdff..55d4485 100644 --- a/src/text-backend.c +++ b/src/text

[RFC weston 09/12] input: Use wl_resource_get accessor functions for resources

2013-06-14 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/input.c| 74 ++ src/shell.c| 6 ++--- src/text-backend.c | 4 +-- 3 files changed, 41 insertions(+), 43 deletions(-) diff --git a/src/input.c b/src/input.c index 9b6d475..45e8441 100644

[RFC weston 10/12] output: Use wl_resource_get accessors for weston_output resources

2013-06-14 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/compositor.c| 21 - src/data-device.c | 6 +++--- src/screenshooter.c | 3 ++- src/shell.c | 12 ++-- 4 files changed, 15 insertions(+), 27 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index

[RFC weston 11/12] subsurfaces: Use wl_resource_get accessors for subsurfaces

2013-06-14 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/compositor.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 28be309..320acd8 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1973,7 +1973,7 @@ static void

[RFC weston 12/12] Add a couple casts and wl_resource_get accessors

2013-06-14 Thread Jason Ekstrand
These are all changes that didn't really fit in another bigger category. THIS PATCH SHOULD NOT GET COMMITTED TO WESTON MASTER!!! Signed-off-by: Jason Ekstrand --- There is a slight issue here of how to properly handle wl_buffer. Right now I am pointer-casting the resource to a buffer. I

Destroyed surfaces and focus events

2013-06-15 Thread Jason Ekstrand
lient-side anyway. Most of the time this doesn't matter because all the demo clients are single-window, but for multi-window clients, it might be an issue if they only close one window. Once the protocol questions get answered, I'll fix the bug one way or the other. Thanks for your th

Re: Destroyed surfaces and focus events

2013-06-17 Thread Jason Ekstrand
all a wl_pointer.leave handler with a non-null surface. Allowing that argument to be null with a specific note about surface closing would make how we handle it server-side irrelivant. I'll send a protocol patch some time soon here. --Jason Ekstrand On Sat, Jun 15, 2013 at 3:34 PM, Jaso

[PATCH] Allow null surface arguments in wl_pointer.leave and wl_keyboard.leave

2013-06-17 Thread Jason Ekstrand
change makes this edge-case explicit and allows the server to avoid sending an event with an argument it knows the client has destroyed. Signed-off-by: Jason Ekstrand --- protocol/wayland.xml | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/protocol/wayland.xml b/protocol

[PATCH wayland] Free non-legacy resources inside wl_resource_destroy

2013-06-18 Thread Jason Ekstrand
t and not wl_client_add_resource before it frees it. This way if it is a legacy resources embedded in a structure somewhere we don't have an invalid free. Signed-off-by: Jason Ekstrand --- src/wayland-server.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wayland-

Re: [PATCH weston v2] input: check if the focus surface has a valid resource

2013-06-20 Thread Jason Ekstrand
All, This looks good as far as I'm concerned. --Jason Ekstrand On Jun 20, 2013 11:15 AM, "Giulio Camuffo" wrote: > the resource can be NULL in some cases, like when the focus is > taken by the black_surface used in shell.c as fullscreen background. > --- > > sorr

[PATCH] Add a weston_buffer structure to replace wl_buffer

2013-06-20 Thread Jason Ekstrand
This commit adds a weston_buffer structure to replace wl_buffer. This way we can hold onto buffers by just their resource. In order to do this, the every renderer.attach function has to fill in the weston_buffer.width and weston_buffer.height fields. --- NOTE: While this patch touches compositor

Re: [PATCH] Add a weston_buffer structure to replace wl_buffer

2013-06-20 Thread Jason Ekstrand
NEGLECT THIS PATCH New one to come On Thu, Jun 20, 2013 at 8:16 PM, Jason Ekstrand wrote: > This commit adds a weston_buffer structure to replace wl_buffer. This way > we can hold onto buffers by just their resource. In order to do this, the > every renderer.attach function has t

[PATCH wayland 0/3] Convert SHM buffers to a wl_shm_buffer opaque

2013-06-20 Thread Jason Ekstrand
This series converts the SHM buffers over to an opaque wl_shm_buffer structure that does NOT derive from wl_buffer. In particular, it has a resource pointer instead of using the legacy wl_buffer with inline resource. The first two patches do NOT break ABI; the third one does. Jason Ekstrand (3

[PATCH wayland 1/3] Add a wl_resource_instance_of function

2013-06-20 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/connection.c | 8 src/wayland-private.h | 3 +++ src/wayland-server.c | 9 + src/wayland-server.h | 5 + 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/connection.c b/src/connection.c index b26402f..95edd6e

[PATCH wayland 2/3] Change SHM wl_buffer functions to use the wl_shm_buffer structure

2013-06-20 Thread Jason Ekstrand
This commit does not break ABI. It merely changes the types of some things and adds a wl_shm_buffer_get function. Signed-off-by: Jason Ekstrand --- src/wayland-server.h | 15 ++- src/wayland-shm.c| 36 +++- 2 files changed, 25 insertions(+), 26

[PATCH wayland 3/3] Change wl_shm_buffer to use a resource pointer

2013-06-20 Thread Jason Ekstrand
This commit also has the effect of making wl_shm_buffer no longer a wl_buffer derivative. Signed-off-by: Jason Ekstrand --- src/wayland-server.h | 5 + src/wayland-shm.c| 51 ++- 2 files changed, 19 insertions(+), 37 deletions(-) diff

[PATCH weston] Add a weston_buffer structure to replace wl_buffer

2013-06-20 Thread Jason Ekstrand
This commit adds a weston_buffer structure to replace wl_buffer. This way we can hold onto buffers by just their resource. In order to do this, the every renderer.attach function has to fill in the weston_buffer.width and weston_buffer.height fields. Signed-off-by: Jason Ekstrand --- NOTE

[PATCH wayland 0/3] Add versioning to wl_resource

2013-06-26 Thread Jason Ekstrand
. for whatever it's worth. It'll make it a little harder to build things like mesa against libwayland 1.2 but then again that's the objective. Jason Ekstrand (2): Add version information to wl_message signatures. Add a version field to wl_resource and verify request versions before

[PATCH wayland 1/3] server: Make wl_object and wl_resource opaque structs

2013-06-26 Thread Jason Ekstrand
ly, but for now it provides a transition paths for code that still uses wl_buffer. Reviewed-by: Jason Ekstrand --- src/scanner.c | 2 +- src/wayland-client.c | 4 ++-- src/wayland-private.h | 6 ++ src/wayland-server.c | 23 +-- src/wayland

[PATCH wayland 2/3] Add version information to wl_message signatures.

2013-06-26 Thread Jason Ekstrand
at message. Messages present in version one do not get this "since" information. In this way we can run-time detect the version information for a structure on a per-message basis. Signed-off-by: Jason Ekstrand --- src/connection.c | 55

[PATCH wayland 3/3] Add a version field to wl_resource and verify request versions before calling them

2013-06-26 Thread Jason Ekstrand
exists in that protocol version before invoking it. This way libwayland won't accidentally invoke a request that does not exist and thereby cause the compositor to crash. Signed-off-by: Jason Ekstrand --- src/wayland-server.c | 38 ++ src/wayland-server.h

[PATCH weston 0/3] Add resource versioning to weston

2013-06-26 Thread Jason Ekstrand
This series converts weston to use the new resource versioning API. Jason Ekstrand (3): Add a MIN macro window: Request version 3 of wl_compositor Add version arguments to wl_client_add/new_object calls clients/window.c| 2 +- src/compositor.c| 16 +--- src

[PATCH weston 1/3] Add a MIN macro

2013-06-26 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/compositor.h | 4 1 file changed, 4 insertions(+) diff --git a/src/compositor.h b/src/compositor.h index 45a14d6..60da054 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -36,6 +36,10 @@ extern "C" { #include "matrix.h&quo

[PATCH weston 3/3] Add version arguments to wl_client_add/new_object calls

2013-06-26 Thread Jason Ekstrand
ter than 1, they were all hard-coded to 1. Signed-off-by: Jason Ekstrand --- src/compositor.c| 16 +--- src/data-device.c | 8 src/input.c | 10 -- src/screenshooter.c | 2 +- src/shell.c | 12 +++- src/tabl

[PATCH weston 2/3] window: Request version 3 of wl_compositor

2013-06-26 Thread Jason Ekstrand
Originally window.c was requesting version 1 but several clients were calling version 2 and 3 events including the desktop shell itself. Signed-off-by: Jason Ekstrand --- clients/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/window.c b/clients/window.c

Re: [PATCH wayland 3/3] Add a version field to wl_resource and verify request versions before calling them

2013-06-27 Thread Jason Ekstrand
DISCARD THIS PATCH. NEW SERIES COMING This patch breaks ABI too badly. Specifically Mesa (and probably other EGL implementations) use wl_client_add_object internally. --Jason Ekstrand On Wed, Jun 26, 2013 at 10:18 PM, Jason Ekstrand wrote: > This commit provides a layer of protection for

Re: [PATCH wayland 2/3] Add version information to wl_message signatures.

2013-06-27 Thread Jason Ekstrand
On Thu, Jun 27, 2013 at 1:19 PM, Bill Spitzak wrote: > > > Jason Ekstrand wrote: > >> This commit adds version information to wl_message signatures and a >> wl_message_get_since function to retrieve. The since version comes in the >> form of a (possible) integer

[PATCH wayland 0/4] Add versioning to wl_resource and wl_global

2013-06-27 Thread Jason Ekstrand
. The first patch in this series is Kristian's "make resources opaque" patch with a couple small tweaks by me. Jason Ekstrand (3): Add version information to wl_message signatures. Add a version field to wl_resource and verify request versions before calling them

[PATCH wayland 1/4] server: Make wl_object and wl_resource opaque structs

2013-06-27 Thread Jason Ekstrand
ly, but for now it provides a transition paths for code that still uses wl_buffer. Reviewed-by: Jason Ekstrand --- src/scanner.c | 2 +- src/wayland-client.c | 4 ++-- src/wayland-private.h | 6 ++ src/wayland-server.c | 23 +-- src/wayland

[PATCH wayland 2/4] Add version information to wl_message signatures.

2013-06-27 Thread Jason Ekstrand
at message. Messages present in version one do not get this "since" information. In this way we can run-time detect the version information for a structure on a per-message basis. Signed-off-by: Jason Ekstrand --- src/connection.c | 55

[PATCH wayland 3/4] Add a version field to wl_resource and verify request versions before calling them

2013-06-27 Thread Jason Ekstrand
exists in that protocol version before invoking it. This way libwayland won't accidentally invoke a request that does not exist and thereby cause the compositor to crash. Signed-off-by: Jason Ekstrand --- src/wayland-server.c | 64 src/wa

[PATCH wayland 4/4] Add support for proper global versioning.

2013-06-27 Thread Jason Ekstrand
wl_display_add_versioned_global function was added instead of simply adding an argument to wl_display_add_global. Signed-off-by: Jason Ekstrand --- src/wayland-server.c | 24 ++-- src/wayland-server.h | 4 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/wayland-server.c b/src

[PATCH weston 0/4] Update weston to properly handle protocol versions

2013-06-27 Thread Jason Ekstrand
This series updates weston to use the new global and resource versioning API. Jason Ekstrand (4): Add a MIN macro window: Request version 3 of wl_compositor Use versioned versions of wl_client_add/new_object calls Use the versioned wl_global api and properly advertise versions clients

[PATCH weston 1/4] Add a MIN macro

2013-06-27 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/compositor.h | 4 1 file changed, 4 insertions(+) diff --git a/src/compositor.h b/src/compositor.h index 45a14d6..60da054 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -36,6 +36,10 @@ extern "C" { #include "matrix.h&quo

[PATCH weston 2/4] window: Request version 3 of wl_compositor

2013-06-27 Thread Jason Ekstrand
Originally window.c was requesting version 1 but several clients were calling version 2 and 3 events including the desktop shell itself. Signed-off-by: Jason Ekstrand --- clients/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/window.c b/clients/window.c

[PATCH weston 3/4] Use versioned versions of wl_client_add/new_object calls

2013-06-27 Thread Jason Ekstrand
d-coded to version 1. Signed-off-by: Jason Ekstrand --- src/compositor.c| 41 ++ src/data-device.c | 26 ++--- src/input.c | 20 --- src/screenshooter.c | 6 -- src/shell.c

[PATCH weston 4/4] Use the versioned wl_global api and properly advertise versions

2013-06-27 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/compositor.c| 16 +--- src/data-device.c | 6 +++--- src/input.c | 4 ++-- src/screenshooter.c | 7 --- src/shell.c | 27 --- src/tablet-shell.c | 5 +++-- src/text

[PATCH weston] Remove weston_buffer_reference

2013-06-27 Thread Jason Ekstrand
This commit removes the weston_buffer_reference structure and replaces it's funtionality with weston_buffer_ref and weston_buffer_decref functions. NOTE: This patch needs thurough review before committing. I do not know the weston internals all that well and so I don't know if this will break an

Re: [PATCH wayland 2/3] Add version information to wl_message signatures.

2013-06-28 Thread Jason Ekstrand
On Thu, Jun 27, 2013 at 8:31 PM, Bill Spitzak wrote: > Jason Ekstrand wrote: > > That is exactly what this patch allows you to do. More particularly, >> this patch protects the compositor from bad clients that attempt to use >> requests that are not supported by the compos

[PATCH wayland] Break resource creation into two functions.

2013-06-28 Thread Jason Ekstrand
bits such as the version and the interface. Then wl_resource_set_implementation is called to set up all of the mutable bits such as implementation, user data, and destructor. This more closely matches client-side and (I think) makes more sense. Signed-off-by: Jason Ekstrand --- src/wayland

[PATCH weston] Change to the new wl_resource_set_implementation API

2013-06-28 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/compositor.c| 56 +-- src/data-device.c | 32 ++--- src/input.c | 20 src/screenshooter.c | 8 --- src/shell.c | 64

Re: [PATCH weston] input: check if the resource is valid in seat_get_pointer

2013-07-08 Thread Jason Ekstrand
Looks good to me. --Jason Ekstrand On Jul 7, 2013 10:41 AM, "Giulio Camuffo" wrote: > seat->pointer->focus->resource can be NULL, if the surface was > created with weston_surface_create. > --- > src/input.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH weston] input: check if the resource is valid in seat_get_pointer

2013-07-08 Thread Jason Ekstrand
> else. > > That might be worth exploring - these surfaces don't accept input > right? So the pick shouldn't do anything anyway..and how did one of > these surfaces get assigned as the pointer focus? That might be the > thing to look at. > It's worth noting that a

Re: [PATCH] Allow null surface arguments in wl_pointer.leave and wl_keyboard.leave

2013-07-08 Thread Jason Ekstrand
does not get the leave event if the surface is destroyed. In either case, it needs to be specified. --Jason > > Rob > > On 17 June 2013 23:56, Jason Ekstrand wrote: > > The current specified behavior does not allow a null surface in either of > > these events. However, if the c

Re: [PATCH] Allow null surface arguments in wl_pointer.leave and wl_keyboard.leave

2013-07-08 Thread Jason Ekstrand
On Mon, Jul 8, 2013 at 11:32 AM, Rob Bradford wrote: > On 8 July 2013 17:25, Jason Ekstrand wrote: > > > That's exactly what weston *was* doing. However, thanks to the destroyed > > proxies, the clients were getting NULL anyway. We could to go through a > >

Re: [PATCH wayland] connection: Handle empty signature and signature with just a version.

2013-07-10 Thread Jason Ekstrand
We talked about this on IRC. looks good to me. On Jul 10, 2013 4:42 PM, "Mariusz Ceier" wrote: > Functions like wl_argument_from_va_list expect from get_next_argument, > to initialize details->type but when the signature is empty or contains > only version (like in desktop-shell-protocol.c in wes

Re: [PATCH wayland] Zero out the closure serializing buffer to make valgrind happy.

2013-07-13 Thread Jason Ekstrand
*bump* This one came up on IRC again the other day. --Jason Ekstrand On Tue, Apr 9, 2013 at 4:59 PM, Jason Ekstrand wrote: > Valgrind complains because sometimes padding at the ends of strings and > arrays > is left uninitialized. Zeroing out the buffer fixes this problem. > >

[PATCH 0/3] Add support for language bindings

2013-07-17 Thread Jason Ekstrand
The following three patches add support for language bindings to libwayland. This is much easier now that wl_resource is an opaque structure. Everything has been tested and works with my Java compositor and example simple-shm client. Jason Ekstrand (3): Add support for server-side language

[PATCH 1/3] Add support for server-side language bindings

2013-07-17 Thread Jason Ekstrand
. This allows for easier run-time argument conversion and removes the need for libffi-based calling of variadic functions. Signed-off-by: Jason Ekstrand --- src/connection.c | 9 ++- src/wayland-private.h | 14 +++--- src/wayland-server.c | 72

[PATCH 2/3] Add support for client-side language bindings

2013-07-17 Thread Jason Ekstrand
This commit adds support for language bindings on the client half of the library. The idea is the same as for server-side dispatchers. Signed-off-by: Jason Ekstrand --- src/wayland-client.c | 90 ++-- src/wayland-client.h | 5 +++ 2 files

[PATCH 3/3] Add a wl_global_get_user_data function

2013-07-17 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/wayland-server.c | 6 ++ src/wayland-server.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/wayland-server.c b/src/wayland-server.c index a0d1019..122e05e 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -820,6 +820,12

Re: [PATCH weston 1/2] compositor: Implement release request for input interfaces

2013-08-14 Thread Jason Ekstrand
end to all the other resources associated to that pointer, this leave event would also be resource-specific and not pointer-specific. Also, I would expect clients to call wl_proxy_destroy immediately after calling wl_pointer_release anyway and in this case they simply won't get an

Re: [PATCH] Add protocol support for wl_shell_surface_touch_move

2013-08-14 Thread Jason Ekstrand
based on the serial. --Jason Ekstrand On Aug 14, 2013 12:51 PM, "Rusty Lynch" wrote: > > From d1d0df0688650ea23a1c5c788f7d7bbf3e7e034c Mon Sep 17 00:00:00 2001 > From: Rusty Lynch > Date: Wed, 14 Aug 2013 08:06:39 -0700 > Subject: [PATCH] Add protocol support for wl_shell_surfa

[PATCH 1/2] doc: Update the ID alocation section

2013-08-17 Thread Jason Ekstrand
The method described of alocation IDs has been wrong at least since version 1.0. This commit updates it to correspond to the way IDs are chosen in versions >= 1.0. Signed-off-by: Jason Ekstrand --- doc/publican/sources/Protocol.xml | 14 ++ 1 file changed, 10 insertions(+)

[PATCH 2/2] doc: Add a section on interface and protocol object versioning

2013-08-17 Thread Jason Ekstrand
There have been a lot of questions asked lately about versioning of interfaces and protocol objects. This addition to the documentation should clear up some of those questions. Signed-off-by: Jason Ekstrand --- doc/publican/sources/Protocol.xml | 63 +++ 1

Re: [PATCH 1/2] doc: Update the ID alocation section

2013-08-18 Thread Jason Ekstrand
On Sun, Aug 18, 2013 at 2:33 AM, Ilyes Gouta wrote: > > On Aug 17, 2013 11:32 PM, "Jason Ekstrand" wrote: > > > > The method described of alocation IDs has been wrong at least since > version > > 1.0. This commit updates it to correspond to the way

[PATCH 1/2] doc: Update the ID alocation section

2013-08-18 Thread Jason Ekstrand
The method described of alocation IDs has been wrong at least since version 1.0. This commit updates it to correspond to the way IDs are chosen in versions >= 1.0. Signed-off-by: Jason Ekstrand --- doc/publican/sources/Protocol.xml | 14 ++ 1 file changed, 10 insertions(+)

Re: [PATCH 2/2] doc: Add a section on interface and protocol object versioning

2013-08-18 Thread Jason Ekstrand
On Sun, Aug 18, 2013 at 1:28 AM, Bardur Arantsson wrote: > On 2013-08-18 00:31, Jason Ekstrand wrote: > > There have been a lot of questions asked lately about versioning of > > interfaces and protocol objects. This addition to the documentation > should > > clear up

[PATCH 2/2] doc: Add a section on interface and protocol object versioning

2013-08-18 Thread Jason Ekstrand
There have been a lot of questions asked lately about versioning of interfaces and protocol objects. This addition to the documentation should clear up some of those questions. Signed-off-by: Jason Ekstrand --- doc/publican/sources/Protocol.xml | 61 +++ 1

Re: [RFC PATCH v2] protocol: Extend wayland seat with interfaces for sensor inputs.

2013-08-22 Thread Jason Ekstrand
Stefan, Thanks for working on this! As one general comment (protocol comments below), we need to make sure that "normal" values are somewhere around 1 to 1000. The wl_fixed type provides 24 bits of integer and 8 bits of fractional precision. The units used below seemed reasonable to me. That sa

[PATCH] Add a --shell option to override the default desktop-shell

2013-08-22 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/compositor.c | 14 +++--- weston.ini | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index e9ba0fd..7454050 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -3224,7 +3224,8

Re: [PATCH] Add a --shell option to override the default desktop-shell

2013-08-22 Thread Jason Ekstrand
Sorry, I had a vim blooper in this one. New patch coming. --Jason Ekstrand On Thu, Aug 22, 2013 at 5:24 PM, Jason Ekstrand wrote: > Signed-off-by: Jason Ekstrand > --- > src/compositor.c | 14 +++--- > weston.ini | 3 ++- > 2 files changed, 13 insertions(

[PATCH weston] Add a --shell option to override the default desktop-shell

2013-08-22 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/compositor.c | 12 ++-- weston.ini | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index e9ba0fd..bb66fc7 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -3224,6 +3224,7

[RFC wayland] System compositor protocol

2013-08-23 Thread Jason Ekstrand
have simple-shm modified to act as a simple system compositor client if finds the wl_system_compositor global. The only mode that works right now is "center" but I'm working on getting the others to work. I appreciate any questions or comments you may have on either the main ideas (above) or t

Re: [RFC wayland] System compositor protocol

2013-08-26 Thread Jason Ekstrand
On Mon, Aug 26, 2013 at 3:48 AM, Cedric BAIL wrote: > Hello, > > Cedric Bail > > On Aug 26, 2013 2:11 AM, "David Herrmann" wrote: > > > > Hi > > > > On Fri, Aug 23, 2013 at 11:55 PM, Jason Ekstrand > wrote: > > > Hello All, > &

Re: [PATCH] wayland-util: fix wrap-back of wl_map->free_list when client id >= 0x80000000

2013-09-09 Thread Jason Ekstrand
27;s not a problem anyway. Thanks, --Jason Ekstrand On Sun, Sep 8, 2013 at 6:11 AM, Chang Liu wrote: > The current implementation of wl_map uses uint32_t for free_list. > When removing client id >= 0x8000, shifting said id by 1 bit left > will cause free_list to wrap back to 0

Re: [PATCH] wayland-util: merge {client, server}_entries in wl_map into one variable

2013-09-09 Thread Jason Ekstrand
in the two arrays. If we replace them by one array, then the client-side and server-side lists will overlap, conflict, and cause massive problems. Thanks, --Jason Ekstrand On Sun, Sep 8, 2013 at 6:12 AM, Chang Liu wrote: > Since a wl_map can be either client side or server side (but not b

Re: [PATCH weston 0/6] ivi-shell proposal

2013-09-09 Thread Jason Ekstrand
thank you for mailing the list. I hope my thoughts above are helpful and can clear a few things up. Thanks, --Jason Ekstrand [1]: http://cgit.freedesktop.org/wayland/wayland/tree/protocol/wayland.xml [2]: http://lists.freedesktop.org/archives/wayland-devel/2013-August/010720.html [3]: http://c

Re: [PATCH] wayland-util: fix wrap-back of wl_map->free_list when client id >= 0x80000000

2013-09-10 Thread Jason Ekstrand
backwards compatibility badly. And yes, the wl_map structure could stand to be documented better. --Jason Ekstrand On Mon, Sep 9, 2013 at 8:10 PM, Chang Liu wrote: > Hi Jason, > Thanks for the review! Indeed, on 32-bit big-endian systems we cannot > guarentee that the LSB of next and dat

Re: [PATCH weston] compositor: reset surface's resource field on resource destruction

2013-09-11 Thread Jason Ekstrand
Remember the problem we had a couple months ago with null surfaces being passed to wl_pointer.leave if the leave was caused by the surface being destroyed? If you set surface->resource = NULL before destroying it this bug will come up again. On Sep 11, 2013 11:28 AM, "Giulio Camuffo" wrote: > wit

<    1   2   3   4   5   6   7   8   >