[PATCH weston 09/11] libweston: handle the screenshoot and record bindings in weston.c

2015-06-22 Thread Giulio Camuffo
Move the code launching the screenshooter client and implementing the screenshot protocol out of libweston, and make screenshooter.c a generic way to hook screenshoot protocols into weston. A new header weston.h is added, with an entry point for the shells to init the screenshooter. --- Makefile.a

[PATCH weston 11/11] configure: add an option to allow building only the libraries

2015-06-22 Thread Giulio Camuffo
the --enable/disable-weston-binaries enables or disables the creation of 'weston', 'weston-launch' and all the binaries that are installed in $prefix/lib/libexec. This allows, together with --enable-clients, to only build the libraries, making possible to build and install different libweston versi

[PATCH weston 05/11] compositor: remove the weston_config field from weston_compositor

2015-06-22 Thread Giulio Camuffo
Instead of the central weston_config pointer we now store it in some module-specific pointers. This way we can remove them one by one. --- desktop-shell/shell.c | 10 +--- desktop-shell/shell.h | 1 + fullscreen-shell/fullscreen-shell.c | 3 ++- ivi-shell/hmi-cont

[PATCH weston 04/11] make the backends compositor-neutral

2015-06-22 Thread Giulio Camuffo
TION_INTEGER, "tty", 0, ¶m.tty }, - { WESTON_OPTION_BOOLEAN, "current-mode", 0, &option_current_mode }, - { WESTON_OPTION_BOOLEAN, "use-pixman", 0, ¶m.use_pixman }, - }; - - param.seat_id = default_seat; - - parse_opt

[PATCH weston 00/11] libweston

2015-06-22 Thread Giulio Camuffo
them we need to fetch that configurations outside, currently in weston.c. While less nice than before I don't think it's that big of an issue. Giulio Camuffo (11): compositor: introduce struct weston_backend compositor: add API to manage compositor instances compositor: move the

[PATCH weston 02/11] compositor: add API to manage compositor instances

2015-06-22 Thread Giulio Camuffo
This commit adds three new exported functions: - weston_compositor_create() returns a new weston_compositor instance, initializing it as the now removed weston_compositor_init() did. - weston_compositor_exit(compositor) asks the compositor to tear down by calling the compositor's exit vfunc which i

[PATCH weston 03/11] compositor: move the main() to a new weston.c file

2015-06-22 Thread Giulio Camuffo
This commits starts to separate the libweston code from the weston specific code. As such, the main() is moved, together with signals handling and configuration handling. --- Makefile.am | 1 + src/compositor.c | 801 +--- src/weston.c | 8

[PATCH wayland] scanner: don't emit the extern declarations for external types

2015-05-28 Thread Giulio Camuffo
We were emitting the extern declarations of all types used in the protocol, even if not defined in it. This caused warnings to be produced when using the -Wredundant-decls compiler flag when building an extension that uses e.g. wl_surface. However we only need the extern declarations if the protoco

Re: [PATCH wayland] RFC: Require WAYLAND_DISPLAY to be set instead of using wayland-0 as the default

2015-05-26 Thread Giulio Camuffo
2015-05-26 12:21 GMT+03:00 Pekka Paalanen : > On Mon, 25 May 2015 01:12:15 -0700 > Dima Ryazanov wrote: > >> Although defaulting to wayland-0 seems convenient, it has an undesirable >> side effect: clients may unintentionally connect to the wrong compositor. >> Generally, it's safer to fail instea

[PATCH wayland v3] tests: add an headers test

2015-05-21 Thread Giulio Camuffo
t.c new file mode 100644 index 000..60a8a62 --- /dev/null +++ b/tests/headers-protocol-core-test.c @@ -0,0 +1,31 @@ +/* + * Copyright © 2015 Giulio Camuffo + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without

[PATCH wayland v2] tests: add an headers test

2015-05-21 Thread Giulio Camuffo
st.c b/tests/headers-protocol-core-test.c new file mode 100644 index 000..60a8a62 --- /dev/null +++ b/tests/headers-protocol-core-test.c @@ -0,0 +1,31 @@ +/* + * Copyright © 2015 Giulio Camuffo + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for

[PATCH wayland] tests: add an headers test

2015-05-20 Thread Giulio Camuffo
index 000..60a8a62 --- /dev/null +++ b/tests/headers-protocol-core-test.c @@ -0,0 +1,31 @@ +/* + * Copyright © 2015 Giulio Camuffo + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that

Re: [weston, v2, 17/17] configure: add an option to allow building only the libraries

2015-05-15 Thread Giulio Camuffo
2015-05-16 7:43 GMT+03:00 Bryce Harrington : > On Mon, May 11, 2015 at 09:27:38AM +0300, Pekka Paalanen wrote: >> On Sat, 9 May 2015 10:09:21 +0300 >> Giulio Camuffo wrote: >> >> > 2015-05-09 3:15 GMT+03:00 Bryce Harrington : >> > > On Thu, Dec 04, 2014

Re: [PATCH weston v2 12/21] Introduce a 'double fixed' data type abstraction

2015-05-13 Thread Giulio Camuffo
2015-05-13 13:26 GMT+03:00 Jonas Ådahl : > The 'double fixed' value type is a fixed point data type implemented as > two signed 32 bit integers. It is intended to be sent over the wire and > used when wl_fixed_t is not detailed enough. > > Two helper functions are introduced: wl_double_fixed_to_dou

Re: [PATCH weston] xwm: Fix the window decoration hints.

2015-05-10 Thread Giulio Camuffo
Hi, This seems to work correctly after a brief test, and the code looks fine. Reviewed-By: Giulio Camuffo 2015-05-04 5:56 GMT+03:00 Dima Ryazanov : > Enable all hints by default. This fixes the "Maximize" button in apps that > don't set any hints - e.g., xclock or Fire

Re: [PATCH weston] input: add a weston_pointer_clear_focus() helper function

2015-05-10 Thread Giulio Camuffo
2015-04-17 0:02 GMT+03:00 Derek Foreman : > This adds a function to clear pointer focus and also set the sx,sy > co-ordinates to an arbitrary value we shouldn't compute with. > > Assertions are added to make sure any time pointer focus is set to NULL > these values are used. > > weston_compositor_p

[PATCH weston] man: use Xwayland instead of Xorg

2015-05-10 Thread Giulio Camuffo
--- man/weston.ini.man | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/weston.ini.man b/man/weston.ini.man index d7df0e4..fe86bb6 100644 --- a/man/weston.ini.man +++ b/man/weston.ini.man @@ -500,7 +500,7 @@ The terminal shell (string). Sets the $TERM variable. .RE .SH "XW

Re: [weston, v2, 17/17] configure: add an option to allow building only the libraries

2015-05-09 Thread Giulio Camuffo
2015-05-09 3:15 GMT+03:00 Bryce Harrington : > On Thu, Dec 04, 2014 at 11:01:23PM +0200, Giulio Camuffo wrote: >> the --enable/disable-weston-binaries emable or disable the creation >> of the 'weston', 'weston-launch' and all the binaries that are >> inst

[PATCH weston v2] compositor: send the output_created signal after inserting it in the list

2015-05-06 Thread Giulio Camuffo
The compositor's output_created signal used to be sent in weston_output_init() which the backend call before putting the output in the output_list. This caused problems when creating a new view in a listener to that signal, because weston_view_assign_output() doesn't yet know the new output exists.

[PATCH weston] compositor: send the output_created signal after inserting it in the list

2015-05-04 Thread Giulio Camuffo
The compositor's output_created signal used to be sent in weston_output_init() which the backend call before putting the output in the output_list. This caused problems when creating a new view in a listener to that signal, because weston_view_assign_output() doesn't yet know the new output exists.

[PATCH weston 1/2] data-device: add a function to send the selection to a client

2015-05-01 Thread Giulio Camuffo
This commit adds a new exported function, weston_seat_send_selection(), which sends the current selection to a specified client. This is useful e.g. to implement a clipboard manager as a special client. --- src/compositor.h | 3 +++ src/data-device.c | 54

[PATCH weston 2/2] data-device: send the selection to all the wl_data_device resources of a client

2015-05-01 Thread Giulio Camuffo
As we do for the input interfaces such as wl_pointer, we must send the selection event to all the wl_data_device resources the client created for a specified seat. --- src/data-device.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/data-device.c b/src

[PATCH weston] clipboard: don't crash if the source client does not send a mime type

2015-04-30 Thread Giulio Camuffo
--- src/clipboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clipboard.c b/src/clipboard.c index c1091a9..994c301 100644 --- a/src/clipboard.c +++ b/src/clipboard.c @@ -254,7 +254,7 @@ clipboard_set_selection(struct wl_listener *listener, void *data) mime_

Re: [PATCH wayland] introduce new headers wayland-client/server-core.h

2015-04-30 Thread Giulio Camuffo
2015-04-30 21:18 GMT+03:00 Bill Spitzak : > On 04/30/2015 11:03 AM, Giulio Camuffo wrote: > >> Functionally the initial patch and the latest ones are exactly the >> same, so not sure what you're talking about > > > No they are not. The original patch and my

Re: [PATCH wayland v4] scanner: add a new --include-core-only option

2015-04-30 Thread Giulio Camuffo
2015-04-30 21:00 GMT+03:00 Bill Spitzak : > On 04/30/2015 04:49 AM, Pekka Paalanen wrote: > >> But we have no reason to push people away from the old headers. Those >> who need the new headers know already that the old ones are awkward. >> Those who don't need the new headers are welcome to keep us

Re: [PATCH wayland] introduce new headers wayland-client/server-core.h

2015-04-30 Thread Giulio Camuffo
2015-04-30 20:41 GMT+03:00 Bill Spitzak : > On 04/30/2015 03:34 AM, Pekka Paalanen wrote: > >>> Just to be clear, my proposal is: >>> >>> wayland-client.h : hand-written, includes: >>> wayland-client-core.h >>> wayland-client-protocol.h >>> deprecated api >>> >>> way

Re: [PATCH weston 03/17] xdg-shell: Document error conditions when popup and surface getters

2015-04-30 Thread Giulio Camuffo
2015-04-07 12:01 GMT+03:00 Jonas Ådahl : > Document that a wl_surface can only be assigned either a xdg_popup or > xdg_surface once and that if the client still stries to do that an error > is raised. > > Signed-off-by: Jonas Ådahl > --- > protocol/xdg-shell.xml | 14 -- > 1 file chan

Re: [PATCH wayland] introduce new headers wayland-client/server-core.h

2015-04-29 Thread Giulio Camuffo
2015-04-29 19:06 GMT+03:00 Bill Spitzak : > On 04/29/2015 12:21 AM, Giulio Camuffo wrote: >> >> 2015-04-29 2:17 GMT+03:00 Bill Spitzak : >>>>>>>> >>>>>>>> The problem is when you have an extension.xml, and generate >>&g

[PATCH weston] xwm: make X windows of type 'utility' inactive

2015-04-29 Thread Giulio Camuffo
Skype's popup notifications use this type. --- xwayland/window-manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c index 336b018..16544e2 100644 --- a/xwayland/window-manager.c +++ b/xwayland/window-manager.c @@ -242

[PATCH wayland v4] scanner: add a new --include-core-only option

2015-04-29 Thread Giulio Camuffo
When using this new option the generated code will include the new core headers instead of the old ones. The default needs to remain unchanged for backward compatibility with old code. With this change the generated headers will now forward declare all types and interfaces it uses; that is needed w

[PATCH wayland v3 2/3] scanner: add a new --include-core-only option

2015-04-29 Thread Giulio Camuffo
When using this new option the generated code will include the new core headers instead of the old ones. The default needs to remain unchanged for backward compatibility with old code. With this change the generated headers will now forward declare all types and interfaces it uses; that is needed w

[PATCH wayland v3 1/3] introduce new headers wayland-client-core.h and wayland-server-core.h

2015-04-29 Thread Giulio Camuffo
wayland-client.h and wayland-server.h include the protocol headers generated at build time. This means that a libwayland user cannot generate and use protocol code created from a wayland.xml newer than the installed libwayand, because it is not possible to only include the API header. Another use c

Re: [PATCH wayland v2 1/3] introduce new headers wayland-client/server-core.h

2015-04-29 Thread Giulio Camuffo
2015-04-29 12:13 GMT+03:00 Pekka Paalanen : > On Tue, 28 Apr 2015 22:57:16 +0300 > Giulio Camuffo wrote: > >> wayland-client.h and wayland-server.h include the protocol headers generated >> at build time. This means that a libwayland user cannot generate and use >> p

Re: [PATCH wayland] introduce new headers wayland-client/server-core.h

2015-04-29 Thread Giulio Camuffo
2015-04-29 2:17 GMT+03:00 Bill Spitzak : >> The problem is when you have an extension.xml, and generate >> extension-client-protocol.h. Then you have some preexisting code >> including that and relying on it including wayland-client.h and then >> wayland-client-protocol.h, and if yo

[PATCH wayland v2 2/3] scanner: add a new --include-core-only option

2015-04-28 Thread Giulio Camuffo
When using this new option the generated code will include the new core headers instead of the old ones. The default needs to remain unchanged for backward compatibility with old code. The option handling logic code in comes directly from weston's shared/option-parser.c. --- v2: - rename --include

[PATCH wayland v2 3/3] wayland-egl: add a core header

2015-04-28 Thread Giulio Camuffo
The new core header doesn't include any other header, since it really is not needed. --- Makefile.am| 1 + src/wayland-egl-core.h | 56 ++ src/wayland-egl.h | 29 +- 3 files changed, 58 insertions(+), 28 dele

[PATCH wayland v2 1/3] introduce new headers wayland-client/server-core.h

2015-04-28 Thread Giulio Camuffo
wayland-client.h and wayland-server.h include the protocol headers generated at build time. This means that a libwayland user cannot generate and use protocol code created from a wayland.xml newer than the installed libwayand, because it is not possible to only include the API header. This commit a

Re: [PATCH wayland] introduce new headers wayland-client/server-core.h

2015-04-28 Thread Giulio Camuffo
2015-04-28 12:48 GMT+03:00 Pekka Paalanen : > On Tue, 28 Apr 2015 09:40:39 +0300 > Giulio Camuffo wrote: > >> 2015-04-28 9:29 GMT+03:00 Marek Chalupa : >> > >> > >> > On Mon, Apr 27, 2015 at 4:06 PM, Giulio Camuffo >> > wrote: >> >>

Re: [PATCH wayland] introduce new headers wayland-client/server-core.h

2015-04-27 Thread Giulio Camuffo
2015-04-28 9:29 GMT+03:00 Marek Chalupa : > > > On Mon, Apr 27, 2015 at 4:06 PM, Giulio Camuffo > wrote: >> >> 2015-04-27 21:53 GMT+03:00 Bill Spitzak : >> > On 04/26/2015 11:48 PM, Marek Chalupa wrote: >> > >> >> >> >> Is

Re: [PATCH wayland] introduce new headers wayland-client/server-core.h

2015-04-27 Thread Giulio Camuffo
2015-04-28 3:34 GMT+03:00 Bill Spitzak : > > > On 04/27/2015 01:06 PM, Giulio Camuffo wrote: >> >> 2015-04-27 21:53 GMT+03:00 Bill Spitzak : >>> >>> On 04/26/2015 11:48 PM, Marek Chalupa wrote: >>> >>>> >>>> Is the --in

Re: [PATCH wayland] introduce new headers wayland-client/server-core.h

2015-04-27 Thread Giulio Camuffo
2015-04-27 21:53 GMT+03:00 Bill Spitzak : > On 04/26/2015 11:48 PM, Marek Chalupa wrote: > >> >> Is the --include-core-headers option necessary? Until now the scanner >> included wayland-client/server.h >> which included the %-protocol.h, but since there are inclusion guards, >> the protocol header

[PATCH wayland] introduce new headers wayland-client/server-core.h

2015-04-25 Thread Giulio Camuffo
wayland-client.h and wayland-server.h include the protocol headers generated at build time. This means that a libwayland user cannot generate and use protocol code created from a wayland.xml newer than the installed libwayand, because it is not possible to only include the API header. This commit a

Re: [PATCH libinput v4 0/2] Fix Lenovo X230 series touchpad

2015-04-22 Thread Giulio Camuffo
Hi, sorry to bikeshed but imho the v1, while maybe too slow, was better than this one. Imho the acceleration curve is too abrupt, i find that sometimes i'm trying to move the pointer some tens of pixels away so i move the finger slowly, only it's too slow so i accelerate a bit and i end up swoopin

Re: EFL/Wayland and xdg-shell

2015-04-13 Thread Giulio Camuffo
2015-04-14 6:33 GMT+03:00 Derek Foreman : > On 13/04/15 07:31 PM, Daniel Stone wrote: >> Hi, >> >> On 14 April 2015 at 01:02, Bryce Harrington wrote: >>> For purposes of discussion, an example might be rotated windows. The >>> set geometry api takes x, y, height, and width. How would you specify

Re: [PATCH libinput 0/3] Fix Lenovo X230 series touchpad

2015-04-12 Thread Giulio Camuffo
Hi, I've been testing it for the last couple days, and i think it's an improvement. However i think it could be better still, i feel the pointer is too slow when moving the finger at a normal speed. -- Giulio 2015-04-09 20:30 GMT+03:00 Benjamin Tissoires : > Hi, > > Here is a series to try maki

[PATCH] xwm: let the shells decide the position of X windows

2015-04-11 Thread Giulio Camuffo
The xwm used to automatically send to Xwayland the position of X windows when that changed, using the x,y of the primary view of the surface. This works fine for the desktop shell but less so for others. This patch adds a 'send_position' vfunc to the weston_shell_client that the shell will call whe

[PATCH weston] xwm: let the shells decide the position of X windows

2015-04-11 Thread Giulio Camuffo
The xwm used to automatically send to Xwayland the position of X windows when that changed, using the x,y of the primary view of the surface. This works fine for the desktop shell but less so for others. This patch adds a 'send_position' vfunc to the weston_shell_client that the shell will call whe

Re: [PATCH weston] build: fix setuid check

2015-04-11 Thread Giulio Camuffo
2015-04-10 19:55 GMT+03:00 Derek Foreman : > At least in some shells test needs 3 arguments for string comparison Hi, this fixes the issue for me. Reviewed-By: Giulio Camuffo > > if test $foo=yes ... > > will always be true. > > if test $foo = yes ... > > will

Re: [PATCH libinput 0/3] Fix Lenovo X230 series touchpad

2015-04-09 Thread Giulio Camuffo
2015-04-09 21:23 GMT+03:00 Benjamin Tissoires : > On Thu, Apr 9, 2015 at 2:17 PM, Giulio Camuffo > wrote: >> 2015-04-09 20:30 GMT+03:00 Benjamin Tissoires : >>> Hi, >>> >>> Here is a series to try making the touchpad found on the Lenovo >>> X23

Re: [PATCH libinput 0/3] Fix Lenovo X230 series touchpad

2015-04-09 Thread Giulio Camuffo
2015-04-09 20:30 GMT+03:00 Benjamin Tissoires : > Hi, > > Here is a series to try making the touchpad found on the Lenovo > X230 working. This touchpad has a very bad hardware resolution and by > default, libinput jumps the cursor for 10 pixels at least whenever the > user moves the finger. > > Thi

Re: [PATCH weston 1/2] compositor-wayland: Flag the wayland backend as nested

2015-04-01 Thread Giulio Camuffo
2015-04-01 20:37 GMT+03:00 Derek Foreman : > Nested compositors may have different requirements than un-nested ones. > The current need stems from having to avoid the new repaint delay when > in a nested compositor. > > Signed-off-by: Derek Foreman > --- > src/compositor-wayland.c | 2 ++ > src/c

[PATCH weston v2] xwm: don't let X windows steal the focus

2015-03-29 Thread Giulio Camuffo
When we get a focus in event from an X window which is not the one we last set as the active window, reset the focus. --- xwayland/window-manager.c | 44 +--- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/xwayland/window-manager.c b/xwaylan

[PATCH weston] xwm: don't let X windows steal the focus

2015-03-29 Thread Giulio Camuffo
When we get a focus in event from an X window which is not the one we last set as the active window, reset the focus. --- xwayland/window-manager.c | 44 +--- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/xwayland/window-manager.c b/xwaylan

Re: [PATCH weston] xwayland: Stack windows on top when activating them

2015-03-29 Thread Giulio Camuffo
I can't really comment on the code aside that it looks fine for a not X-savy eye, but it works fine with the xwayland change to remove the xwl_xy_to_window thingy. 2015-03-22 19:14 GMT+02:00 Jasper St. Pierre : > Now that we've removed the XYToWindow handler in Xwayland, we actually > have to stac

Re: [RFC wayland 1/2] server: implement intact resources

2015-03-23 Thread Giulio Camuffo
2015-03-23 12:00 GMT+02:00 Marek Chalupa : > Destroyed seems confusing to me too, since the resource is not really > destroyed. What about inert or unalive ? Inert is ok, imho. On the client side they are called zombie objects... maybe for consistency it'd be better to keep that here too. > > On

Re: [PATCH weston] compositor-drm: Allow ARGB8888 as a GBM format

2015-03-20 Thread Giulio Camuffo
2015-03-20 15:41 GMT+02:00 Daniel Stone : > Hi, > > On Thursday, March 19, 2015, Derek Foreman wrote: >> >> As of mesa commit 65c8965d on some systems all formats that used to >> be called XRGB are now ARGB and we can't launch weston. > > > Which platforms? Seems pretty odd, to say the lea

Re: [PATCH weston] xwayland: wm: fix an invalid read

2015-03-11 Thread Giulio Camuffo
Oops, that looks broken indeed. Reviewwed-by: Giulio Camuffo 2015-03-11 10:36 GMT+02:00 Ryo Munakata : > This `for` statement needs corresponding braces. > > Signed-off-by: Ryo Munakata > --- > xwayland/window-manager.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion

Re: [PATCH weston] compositor: don't have the backend libraries switch vt

2015-03-03 Thread Giulio Camuffo
Duh, ignore this one. I sent it by mistake, it depends on libweston. 2015-03-03 21:21 GMT+02:00 Giulio Camuffo : > A compositor may want to handle the vt switches itself, for example > to ensure to have a lock screen before switching. To enable that move > the key bindings for the vt

[PATCH weston] compositor: don't have the backend libraries switch vt

2015-03-03 Thread Giulio Camuffo
A compositor may want to handle the vt switches itself, for example to ensure to have a lock screen before switching. To enable that move the key bindings for the vt switch in the common weston code and add a generic API in libweston to switch vt. --- Makefile.am| 2 +- src/compositor

Re: [PATCH weston] input: store the grab serial of the keyboard

2015-02-06 Thread Giulio Camuffo
low. > > > On 02/06/2015 09:06 AM, Giulio Camuffo wrote: >> >> The serial can be checked against the one passed to wl_shell.set_popup >> or equivalent. >> --- >> src/input.c | 9 +++-- >> 1 file changed, 7 insertions(+), 2 deletions(-) >>

[PATCH weston] input: store the grab serial of the keyboard

2015-02-06 Thread Giulio Camuffo
The serial can be checked against the one passed to wl_shell.set_popup or equivalent. --- src/input.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/input.c b/src/input.c index fa4fc4e..a0a817f 100644 --- a/src/input.c +++ b/src/input.c @@ -1321,8 +1321,6 @@ notif

Re: [PATCH weston] xwm: remove the create surface listener in weston_wm_destroy

2015-02-06 Thread Giulio Camuffo
2015-02-03 19:05 GMT+02:00 Derek Foreman : > Failing to remove this can result in a crash when the signal is sent > after the window manager is destroyed. Simple enough, Reviewed-By: Giulio Camuffo > > Signed-off-by: Derek Foreman > --- > xwayland/window-manager.c | 1 + &g

[PATCH weston v2] xwm: use always a valid 'primary view' for an X window

2015-02-01 Thread Giulio Camuffo
The xwm gets a primary view for a X window using the get_primary_view vfunc of the shell_interface struct. Storing it is dangerous though because it doesn't listen for its destruction so it may end up using the old stored view pointer after that view was freed, or after the primary view for that wi

[PATCH weston] xwm: use always a valid 'primary view' for an X window

2015-01-30 Thread Giulio Camuffo
The xwm gets a primary view for a X window using the get_primary_view vfunc of the shell_interface struct. Storing it is dangerous though because it doesn't listen for its destruction so it may end up using the old stored view pointer after that view was freed, or after the primary view for that wi

Re: [PATCH weston] xwm: fix use after free

2015-01-29 Thread Giulio Camuffo
2015-01-28 5:29 GMT+02:00 Bryce Harrington : > On Fri, Dec 26, 2014 at 06:10:35PM +0200, Giulio Camuffo wrote: >> Calling wl_event_source_remove() will free the event source later, so >> reset the pointer to avoid calling it two times on the same pointer. >> Fix a composit

[PATCH weston v4] xwm: support maximizing xwayland windows

2015-01-29 Thread Giulio Camuffo
This patch adds the maximize button to the window frame for the windows which set the MWM_DECOR_MAXIMIZE hint, and it wires it with the shell via a new method in weston_shell_interface. Additionally, it also listens for the wm hints coming from the client, but it doesn't support maximizing a window

Re: [PATCH wayland v2] event-loop: Dispatch idle callbacks twice

2015-01-28 Thread Giulio Camuffo
Forgot the Reviewed-by: Giulio Camuffo 2015-01-28 17:58 GMT+02:00 Giulio Camuffo : > 2015-01-28 17:49 GMT+02:00 Derek Foreman : >> On 28/01/15 09:39 AM, Giulio Camuffo wrote: >>> 2015-01-28 17:25 GMT+02:00 Derek Foreman : >>>> To fix a shutdown crash in weston&#

Re: [PATCH wayland v2] event-loop: Dispatch idle callbacks twice

2015-01-28 Thread Giulio Camuffo
2015-01-28 17:49 GMT+02:00 Derek Foreman : > On 28/01/15 09:39 AM, Giulio Camuffo wrote: >> 2015-01-28 17:25 GMT+02:00 Derek Foreman : >>> To fix a shutdown crash in weston's x11 compositor I want to move the >>> weston X window close to an idle handler. >>&

Re: [PATCH wayland v2] event-loop: Dispatch idle callbacks twice

2015-01-28 Thread Giulio Camuffo
2015-01-28 17:25 GMT+02:00 Derek Foreman : > To fix a shutdown crash in weston's x11 compositor I want to move the > weston X window close to an idle handler. > > Since idle handlers are processed at the start of an event loop, the > handler that deals with window close will run at the start of the

Re: [weston, v2, 17/17] configure: add an option to allow building only the libraries

2015-01-28 Thread Giulio Camuffo
2015-01-27 22:43 GMT+02:00 Bryce Harrington : > On Thu, Dec 04, 2014 at 11:01:23PM +0200, Giulio Camuffo wrote: >> the --enable/disable-weston-binaries emable or disable the creation >> of the 'weston', 'weston-launch' and all the binaries that are >> inst

Re: [PATCH weston v5] xwm: tell the shell the pid of the X clients

2015-01-27 Thread Giulio Camuffo
hout additional protocols. > > On Tue, Jan 27, 2015 at 12:29 PM, Giulio Camuffo > wrote: >> >> 2015-01-27 19:23 GMT+02:00 Jasper St. Pierre : >> > Are you still not using XKillClient for some reason? >> >> This patch is not about killing X clients, it

Re: Change screens color temperature

2015-01-27 Thread Giulio Camuffo
2015-01-27 19:47 GMT+02:00 Matthias Treydte : > >> installed "Redshift", a tool to change the color temperature of your >> screen according to the time of day: > > >> Sadly it's only implemented for Xorg, so I can't "make an app" that uses >> redshift on Jolla. > > > Redshift already has a "drm" mo

[PATCH weston v3] xwm: support maximizing xwayland windows

2015-01-27 Thread Giulio Camuffo
This patch adds the maximize button to the window frame for the windows which set the MWM_DECOR_MAXIMIZE hint, and it wires it with the shell via a new method in weston_shell_interface. Additionally, it also listens for the wm hints coming from the client, but it doesn't support maximizing a window

Re: [PATCH weston v2 2/2] xwm: support maximizing xwayland windows

2015-01-27 Thread Giulio Camuffo
2015-01-27 17:28 GMT+02:00 Daniel Stone : > Hi, > > On 9 January 2015 at 18:10, Giulio Camuffo wrote: >> + if (maximized != window->maximized_vert && >> window->maximized_horz) { > > Surely this needs to be: > if (maximized != (wind

Re: [PATCH weston v5] xwm: tell the shell the pid of the X clients

2015-01-27 Thread Giulio Camuffo
2015-01-27 19:23 GMT+02:00 Jasper St. Pierre : > Are you still not using XKillClient for some reason? This patch is not about killing X clients, it's about passing the pid to the shell, so not sure what relevance it has. > > On Tue, Jan 27, 2015 at 12:10 PM, Giulio Camuffo >

[PATCH weston v5] xwm: tell the shell the pid of the X clients

2015-01-27 Thread Giulio Camuffo
All the surfaces from all the X clients share the same wl_client so wl_client_get_credentials can't be used to get the pid of the X clients. The shell may need to know the pid to be able to associate a surface with e.g. a DBus service. --- v5: added the check on the hostname desktop-shell/shell.

[PATCH weston v2] xwm: don't set inactive surfaces as top level

2015-01-24 Thread Giulio Camuffo
Some X clients create popup or tooltips windows as top level, without setting them as override redirect or as transient. Since we don't want to take the focus away from a surface when one of its popup is opened, check the _NET_WM_WINDOW_TYPE of the X surfaces being mapped and set them as inactive i

[PATCH weston v2] compositor: make sure to reset views' pointers to destroyed output

2015-01-22 Thread Giulio Camuffo
When an output is destroyed reassign the output of the views that were in it, to be sure not to keep a dangling pointer which could be used later on by calling weston_surface_assign_output() on the view's surface. --- src/compositor.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/c

Re: [PATCH weston] compositor: fix usage of dangling output pointer after destroying it

2015-01-22 Thread Giulio Camuffo
Actually, this seems to cause the cursor to sometimes disappear, not sure why... A different approach would be to go through the view_list in weston_output_destroy() and reset the output pointers if needed, but I don't quite like it. 2015-01-22 16:52 GMT+02:00 Giulio Camuffo : > When an o

[PATCH weston] compositor: fix usage of dangling output pointer after destroying it

2015-01-22 Thread Giulio Camuffo
When an output is destroyed a view may still hold a pointer to it. Calling weston_view_assign_output() on one view of a surface ends up updating the output on that view and later iterating over all the views of a surface and using their output, which may be bogus. Instead, call weston_surface_assig

[PATCH weston] xwm: don't set inactive surfaces as top level

2015-01-12 Thread Giulio Camuffo
Some X clients create popup or tooltips windows as top level, without setting them as override redirect or as transient. Since we don't want to take the focus away from a surface when one of its popup is opened, check the _NET_WM_WINDOW_TYPE of the X surfaces being mapped and set them as inactive i

[PATCH weston v4] xwm: tell the shell the pid of the X clients

2015-01-12 Thread Giulio Camuffo
All the surfaces from all the X clients share the same wl_client so wl_client_get_credentials can't be used to get the pid of the X clients. The shell may need to know the pid to be able to associate a surface with e.g. a DBus service. --- desktop-shell/shell.c | 7 +++ src/compositor.h

Re: [PATCH v2] xwm: tell the shell the pid of the X clients

2015-01-11 Thread Giulio Camuffo
2015-01-11 12:26 GMT+02:00 Giulio Camuffo : > 2015-01-11 10:33 GMT+02:00 Jasper St. Pierre : >> In the case of X clients, using XKillClient instead of killing the PID would >> be much nicer. >> >> On Sat, Jan 10, 2015 at 3:27 AM, Giulio Camuffo >> wrote: >&g

[PATCH v3] xwm: tell the shell the pid of the X clients

2015-01-11 Thread Giulio Camuffo
All the surfaces from all the X clients share the same wl_client so wl_client_get_credentials can't be used to get the pid of the X clients. The shell may need to know the pid to be able to associate a surface with e.g. a DBus service. --- v3: added the implementation in shell.c desktop-shell/sh

Re: [PATCH v2] xwm: tell the shell the pid of the X clients

2015-01-11 Thread Giulio Camuffo
2015-01-11 10:33 GMT+02:00 Jasper St. Pierre : > In the case of X clients, using XKillClient instead of killing the PID would > be much nicer. > > On Sat, Jan 10, 2015 at 3:27 AM, Giulio Camuffo > wrote: >> >> All the surfaces from all the X clients

[PATCH v2] xwm: tell the shell the pid of the X clients

2015-01-10 Thread Giulio Camuffo
All the surfaces from all the X clients share the same wl_client so wl_client_get_credentials can't be used to get the pid of the X clients. The shell may need to know the pid to be able to associate a surface with e.g. a DBus service. --- src/compositor.h | 1 + xwayland/window-manager.

[PATCH weston] xwm: tell the shell the pid of the X clients

2015-01-10 Thread Giulio Camuffo
All the surfaces from X all the clients share the same wl_client so wl_client_get_credentials can't be used to get the pid of the X clients. The shell may need to know the pid to be able to associate a surface with e.g. a DBus service. --- src/compositor.h | 1 + xwayland/window-manager.c

Re: [PATCH weston v2 08/20] compositor: add weston_matrix_transform_rect() and use it where appropriate

2015-01-09 Thread Giulio Camuffo
Just a nitpick below: 2014-10-16 18:55 GMT+03:00 Derek Foreman : > New function that transforms a pixman_box32_t rectangle by a matrix. > > Since pixman rectangles are represented by 2 corners, non-90 degree > rotations can't be properly represented. This function gives the > axis aligned rectang

Re: [PATCH weston v2 05/20] pixman-renderer: Add a weston_matrix_to_pixman_transform function and simplify the buffer-to-output matrix computation

2015-01-09 Thread Giulio Camuffo
One comment below, otherwise looks fine 2014-10-16 18:55 GMT+03:00 Derek Foreman : > From: Jason Ekstrand > > Now that we have a buffer-to-surface matrix and the global-to-output matrix > is in pixels, we can remove a large chunk of confusing code from the pixman > renderer. Hopefully, having th

Re: [PATCH weston v2 01/20] weston_surface: Add surface-to-buffer and buffer-to-surface matrices

2015-01-09 Thread Giulio Camuffo
I have a comment below, the rest looks good to me. 2014-10-16 18:55 GMT+03:00 Derek Foreman : > From: Jason Ekstrand > > --- > src/compositor.c | 84 > > src/compositor.h | 6 > 2 files changed, 90 insertions(+) > > diff --git a/sr

[PATCH weston v2 2/2] xwm: support maximizing xwayland windows

2015-01-09 Thread Giulio Camuffo
This patch adds the maximize button to the window frame for the windows which set the MWM_DECOR_MAXIMIZE hint, and it wires it with the shell via a new method in weston_shell_interface. Additionally, it also listens for the wm hints coming from the client, but it doesn't support maximizing a window

[PATCH weston 1/2] shell: fix positioning of maximized surfaces with a custom geometry

2015-01-09 Thread Giulio Camuffo
--- desktop-shell/shell.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index a7514f7..f6d9c79 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -5374,8 +5374,13 @@ set_maximized_position(struct desktop_sh

[PATCH weston] xwm: fix use after free

2014-12-26 Thread Giulio Camuffo
Calling wl_event_source_remove() will free the event source later, so reset the pointer to avoid calling it two times on the same pointer. Fix a compositor crash when copying some text from weston terminal, pasting it in the same terminal and hitting ctrl-u, while a X client is running. --- xwayla

Re: launch QT app failed with wayland

2014-12-26 Thread Giulio Camuffo
It would be useful if you could get the log of the client when exporting the env variable WAYLAND_DEBUG=1. -- Giulio 2014-12-26 15:50 GMT+02:00 Thiago Macieira : > On Friday 26 December 2014 17:59:37 Ray·Bloodworth wrote: >> Is there any possibility that ico-homescreen has setted surface alre

[PATCH weston] xwm: set the _NET_WM_DESKTOP property of the windows

2014-12-13 Thread Giulio Camuffo
Some X clients use the _NET_WM_DESKTOP property to tell if the window is mapped or not. If set, it should say the virtual desktop the window is currently in, if unset it means the window is unmapped. The xwm currently has no way to know how many virtual desktops does the shell plugin have, or if it

Re: [PATCH wayland] doc: Fill in high level description for Surfaces

2014-12-12 Thread Giulio Camuffo
2014-12-12 21:37 GMT+02:00 Bryce Harrington : > On Thu, Dec 11, 2014 at 09:49:28AM +, Daniel Stone wrote: >> Hi, >> >> On Thursday, December 11, 2014, Giulio Camuffo >> wrote: >> >> > 2014-12-11 4:04 GMT+02:00 Bryce Harrington > > >: &g

Re: Where should project Weston go?

2014-12-12 Thread Giulio Camuffo
2014-12-12 13:29 GMT+02:00 Daniel Stone : > Hi, > > On 10 December 2014 at 23:21, Bryce Harrington > wrote: >> >> An idea I've been kicking around would be to *require* Reviewed-by on >> all patches. Now, you'd probably think this would *slow* things down, >> but consider this: If as a patch sub

Re: [PATCH wayland] doc: Fill in high level description for Surfaces

2014-12-11 Thread Giulio Camuffo
2014-12-11 4:04 GMT+02:00 Bryce Harrington : > > Signed-off-by: Bryce Harrington > --- > doc/publican/sources/Protocol.xml | 20 +++- > 1 file changed, 15 insertions(+), 5 deletions(-) > > diff --git a/doc/publican/sources/Protocol.xml > b/doc/publican/sources/Protocol.xml > in

Re: Where should project Weston go?

2014-12-09 Thread Giulio Camuffo
2014-12-08 14:01 GMT+02:00 Pekka Paalanen : > Dear Wayland community, > > I would like to start a discussion on what Weston really is, and where > it should go, if only to confirm that our concensus still holds. > > I feel the need for it, because I personally find it sometimes hard to > judge whet

Re: Where should project Weston go?

2014-12-09 Thread Giulio Camuffo
2014-12-09 11:18 GMT+02:00 Jussi Laako : > On 9.12.2014 1:26, Bryce Harrington wrote: >> >> But I imagine 'minimal' is intended here in more of an engineering >> sense, and interpret it myself to mean something like: Focuses on >> principle features not superfluous stuff better handled by other >>

<    1   2   3   4   5   6   7   8   >