[PATCH weston] gl-renderer: gl_renderer_create display cleanup on error

2015-08-20 Thread Dawid Gajownik
Clean up display connection via eglTerminate() in case of EGL initialisation error. Signed-off-by: Dawid Gajownik --- src/gl-renderer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gl-renderer.c b/src/gl-renderer.c index fd0720e..d7231f4 100644 --- a/src/gl

[PATCH weston] compositor-drm: cast surface to EGLNativeWindowType

2015-08-17 Thread Dawid Gajownik
gl_renderer_output_create expects `window_for_legacy' variable to be of type EGLNativeWindowType, not EGLNativeDisplayType. This variable is used later in eglCreateWindowSurface(). Signed-off-by: Dawid Gajownik --- src/compositor-drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH weston] gl-renderer: Set renderer to NULL after destroyed

2015-08-11 Thread Dawid Gajownik
On Tue, Aug 11, 2015 at 4:09 AM, Ucan, Emre (ADITG/SW1) wrote: > The pointer of the renderer in the compositor data structure is controlled > in weston_compositor_shutdown. When it is not NULL, the destroy method of > the renderer is called. Therefore, the renderer pointer should be set to NULL >

[PATCH weston] weston-launch: On error putenv returns a non-zero value

2015-08-09 Thread Dawid Gajownik
According to POSIX standard "upon successful completion, putenv() shall return 0; otherwise, it shall return a non-zero value." Unlike in setenv() we should not be checking only for negative values. Signed-off-by: Dawid Gajownik --- src/weston-launch.c | 2 +- 1 file changed, 1 inser

Re: [PATCH weston] compositor: fix crash when destroying incompletely created output

2015-08-06 Thread Dawid Gajownik
On Wed, Aug 5, 2015 at 6:20 PM, Derek Foreman wrote: > Good catch! > > However, can we get the same result by making weston_output_init() call > wl_list_init(&output->link)? > > I think that'd be simple enough not to require a comment to explain > what's going on... Indeed, you're right. I tested

[PATCH weston v2] compositor: fix crash when destroying incompletely created output

2015-08-06 Thread Dawid Gajownik
. This problem happens when drm, fbdev, rdp, rpi or wayland backend is used. v2: Initialize output->link in weston_output_init() as suggested by Derek Foreman. Signed-off-by: Dawid Gajownik --- src/compositor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compositor.c b/src/

[PATCH weston] Coding style fixes

2015-08-06 Thread Dawid Gajownik
- opening braces are on the same line as the if statement - opening braces are not on the same line as the function name - space between for/while/if and opening parenthesis Signed-off-by: Dawid Gajownik --- clients/eventdemo.c | 8 +++--- clients/ivi-shell-user-interface.c

[PATCH weston v3] compositor-rdp: rdp_destroy() double free error #91457

2015-08-05 Thread Dawid Gajownik
for real v2: comply with Weston coding style Signed-off-by: Dawid Gajownik --- src/compositor-rdp.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c index 6eac7f9..869c3f3 100644 --- a/src/compositor-rdp.c +++ b/src

Re: [PATCH weston] compositor-rdp: rdp_destroy() double free error #91457

2015-08-05 Thread Dawid Gajownik
On Wed, Aug 5, 2015 at 4:18 PM, Derek Foreman wrote: > This looks good to me barring two tiny style nits below. > That fixed, > Reviewed-by: Derek Foreman Thanks for the information. Does Weston follow the same coding style as Wayland [1]? The mistakes that I made are also present in other files

[PATCH weston v2] compositor-rdp: rdp_destroy() double free error #91457

2015-08-05 Thread Dawid Gajownik
-by: Dawid Gajownik --- src/compositor-rdp.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c index 6eac7f9..ecd1061 100644 --- a/src/compositor-rdp.c +++ b/src/compositor-rdp.c @@ -541,9 +541,20 @@ rdp_restore(struct

Re: [PATCH weston] build: install Weston protocol XML files #89966

2015-08-05 Thread Dawid Gajownik
On Wed, Aug 5, 2015 at 6:49 AM, Pekka Paalanen wrote: > Hi, Hi. > NAK. > > By policy, we do not install protocol XML files for extensions that > are not stable, or are intended to be private to Weston. > > Weston should install only the protocol files which are both stable > and intended for use

[PATCH weston] build: install Weston protocol XML files #89966

2015-08-04 Thread Dawid Gajownik
Protocol XML files are required by external applications. This patch installs necessary files and makes them discoverable via pkg-config. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=89966 Signed-off-by: Dawid Gajownik --- Makefile.am | 2 +- src/weston.pc.in | 2 ++ 2 files

Re: [PATCH] [RDP compositor] don't crash when the key file doesn't exist

2015-08-02 Thread Dawid Gajownik
lid RDP key file [12:56:39.049] peer initialization failed [12:56:39.050] error when treating incoming peer Tested-by: Dawid Gajownik ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel

[PATCH weston] compositor-rdp: free() can handle NULL pointers

2015-08-01 Thread Dawid Gajownik
There's no need to check if a pointer exists before passing it to free(). free() can handle NULL pointers. Signed-off-by: Dawid Gajownik --- src/compositor-rdp.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c

[PATCH weston] screen-share: don't test keyboard/pointer pointers

2015-07-31 Thread Dawid Gajownik
ommit makes screen-share.c compile once again after changes in commit 1281a36e3bcd27345bd4a107f282213ecca56f0e. Signed-off-by: Dawid Gajownik --- src/screen-share.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/screen-share.c b/src/screen-sh

[PATCH weston] compositor-rdp: rdp_destroy() double free error #91457

2015-07-31 Thread Dawid Gajownik
. The easiest way to reproduce a problem is to run weston with an invalid option. Additionally some other objects of rdp_backend structure are not destroyed/freed. The patch fixes both issues. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91457 Signed-off-by: Dawid Gajownik --- src

[PATCH weston] .gitignore: ignore doxygen generated files v2

2015-07-31 Thread Dawid Gajownik
Fixes incorrect commit d95637905861162c08251843a11e509b5d94 Signed-off-by: Dawid Gajownik --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index dff56db..10a15d7 100644 --- a/.gitignore +++ b/.gitignore @@ -32,9 +32,9 @@ cscope.out

Re: [PATCH weston] Update .gitignore

2015-07-31 Thread Dawid Gajownik
ote: >> >> On Wed, Jul 29, 2015 at 12:55:55AM -0300, Dawid Gajownik wrote: >> > Hi, >> > >> > after running configure with "Enable developer documentation" set to >> > "yes" git status warns about two new untracked files:

[PATCH weston] main: print backends in help message in alphabetical order

2015-07-31 Thread Dawid Gajownik
For better readability of `weston --help' output, backends are now sorted in alphabetical order. Signed-off-by: Dawid Gajownik --- src/main.c | 90 +++--- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/src/main.c

Re: [PATCH weston] main: update RDP backend help message

2015-07-31 Thread Dawid Gajownik
BTW is there a reason why backend modules are not listed in the alphabetical order in `weston --help' output? I know it's just cosmetic but maybe it would be a bit easier to find necessary information if thing were sorted. Thanks, Dawid ___ wayland-

[PATCH weston] main: update RDP backend help message

2015-07-31 Thread Dawid Gajownik
`--env-socket' option is of type WESTON_OPTION_BOOLEAN, not WESTON_OPTION_STRING. Socket should be defined in RDP_FD environment variable. Signed-off-by: Dawid Gajownik --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index a2

[PATCH weston] Update .gitignore

2015-07-31 Thread Dawid Gajownik
Hi, after running configure with "Enable developer documentation" set to "yes" git status warns about two new untracked files: doc/doxygen/tooldev.doxygen doc/doxygen/tools.doxygen Below is a small patch. HTH, Dawid diff --git a/.gitignore b/.gitignore index b13bf55..49e19d9

[PATCH weston v2] backends: don't destroy renderer and output twice

2015-07-30 Thread Dawid Gajownik
drm, fbdev, rpi and wayland backends are unnecessarily destroying renderer and output before executing weston_compositor_shutdown() Signed-off-by: Dawid Gajownik --- src/compositor-drm.c | 1 - src/compositor-fbdev.c | 5 + src/compositor-rpi.c | 7 ++- src/compositor

Re: [PATCH? weston] - wayland backend: outputs are destroyed twice

2015-07-30 Thread Dawid Gajownik
On Thu, Jul 30, 2015 at 10:47 PM, Bryce Harrington wrote: > Mind re-posting the patch, with updated changelog accounting for > dropping the redundant renderer destruction. > > I did a quick look through the other compositor codes in case they > contained similar code, but didn't spot anything. Di

[PATCH weston] compositor: fix crash when destroying incompletely created output

2015-07-30 Thread Dawid Gajownik
drm, fbdev, rdp, rpi or wayland backend is used. Signed-off-by: Dawid Gajownik --- src/compositor.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/compositor.c b/src/compositor.c index 66c3eee..30924f6 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -

Re: [PATCH? weston] - wayland backend: outputs are destroyed twice

2015-07-30 Thread Dawid Gajownik
t(b->parent.wl_display); if (b->theme) On Thu, Jul 30, 2015 at 12:03 AM, Ryo Munakata wrote: > On 07/29, Dawid Gajownik wrote: > > Hi Dawid. > >> Hi, >> >> in src/compositor-wayland.c:wayland_backend_destroy() you can find this code: >> >> st

[PATCH? weston] - wayland backend: outputs are destroyed twice

2015-07-29 Thread Dawid Gajownik
Hi, in src/compositor-wayland.c:wayland_backend_destroy() you can find this code: struct weston_output *output, *next; wl_list_for_each_safe(output, next, &b->compositor->output_list, link) wayland_output_destroy(output); [snip] weston_compositor_shutdown(