[weston PATCH v6 1/2] add implementation for set_maximised

Bill Spitzak spitzak at gmail.com
Fri Feb 3 11:03:26 PST 2012


juan.j.zhao at linux.intel.com wrote:

> +	es->geometry.x = 0;
> +	es->geometry.y = panel_height;
> +	edges = WL_SHELL_SURFACE_RESIZE_TOP|WL_SHELL_SURFACE_RESIZE_LEFT;
> +
> +	fprintf(stderr, "configure: width=%d, height=%d",
> +		output->current->width,
> +		output->current->height-panel_height);
> +	wl_resource_post_event(&shsurf->resource,
> +			       WL_SHELL_SURFACE_CONFIGURE,
> +			       weston_compositor_get_time(), edges,
> +			       output->current->width, output->current->height-panel_height);
> +	weston_surface_damage(es);
> +}

I think some flags will need to be added to the configure event. If you 
want to replicate how current window managers do "maximized" then there 
has to be an indicator that the window image must not contain the 
"edges" (ie the 1 or 2 pixels that are light on the top & left and dark 
on the bottom & right that make the windows look 3D).

So that "snap to edge of screen" can also be implemented, there should 
be independent flags for all 4 edges. For instance to replicate Windows 
left-snap then there should only be a 3D right-hand edge.

This would probably also be very useful for designing tiled or tabbed 
window management.


More information about the wayland-devel mailing list