[PATCH 1/2] shell: Add implementation of fullscreen.

Ander Conselvan de Oliveira conselvan2 at gmail.com
Fri Mar 2 05:00:43 PST 2012


Em 01-03-2012 06:57, zhiwen.wu at linux.intel.com escreveu:
> From: Alex Wu<zhiwen.wu at linux.intel.com>
> @@ -1290,14 +1426,23 @@ activate(struct weston_shell *base, struct weston_surface *es,
>
>   static void
>   click_to_activate_binding(struct wl_input_device *device,
> -                         uint32_t time, uint32_t key,
> +			  uint32_t time, uint32_t key,
>   			  uint32_t button, uint32_t state, void *data)
>   {
>   	struct weston_input_device *wd = (struct weston_input_device *) device;
>   	struct weston_compositor *compositor = data;
>   	struct weston_surface *focus;
> +	struct weston_surface *upper;
>
>   	focus = (struct weston_surface *) device->pointer_focus;
> +	upper = container_of(focus->link.prev, struct weston_surface, link);
> +	if (focus->link.prev !=&compositor->surface_list&&
> +	    get_shell_surface_type(upper) == SHELL_SURFACE_FULLSCREEN) {
> +		printf("%s: focus is black surface, raise its fullscreen surface\n", __func__);
> +		shell_stack_fullscreen(get_shell_surface(upper));
> +		focus = upper;
> +	}
> +
>   	if (state&&  focus&&  device->pointer_grab ==&device->default_pointer_grab)
>   		activate(compositor->shell, focus, wd, time);
>   }

focus can be NULL here in which case this leads to a segmentation fault. 
You can cause it very easily by running a toytoolkit application, 
launching the popup menu and then clicking on a surface that does not 
belong to the client that create the popup surface.


Ander


More information about the wayland-devel mailing list