[PATCH weston 1/3] xwm: move decorate setting outside window_read_properties

Kristian Høgsberg hoegsberg at gmail.com
Fri May 25 20:18:18 PDT 2012


On Fri, May 25, 2012 at 05:50:04PM +0300, Tiago Vignatti wrote:
> Override redirected windows need to be able to read properties (e.g. at
> xserver_set_window_id) without re-set the decoration bit. This patch moves it
> to create notify time, which looks a more meaningful place, and tracks later
> whether needed changes on the property are made.

No, we set window->decorate in read_properties because if the motif
hint property is *not* present, we need to decorate.  If we read the
properties and the motif hint is there, we will clear the flag.  Maybe
something like

  window->decorate = !window->override;

could work.

Kristian

> Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
> ---
>  src/xwayland/window-manager.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c
> index 334b584..b6aac2a 100644
> --- a/src/xwayland/window-manager.c
> +++ b/src/xwayland/window-manager.c
> @@ -275,7 +275,6 @@ weston_wm_window_read_properties(struct weston_wm_window *window)
>  					     props[i].atom,
>  					     XCB_ATOM_ANY, 0, 2048);
>  
> -	window->decorate = 1;
>  	for (i = 0; i < ARRAY_LENGTH(props); i++)  {
>  		reply = xcb_get_property_reply(wm->conn, cookie[i], NULL);
>  		if (!reply)
> @@ -705,6 +704,7 @@ weston_wm_handle_create_notify(struct weston_wm *wm, xcb_generic_event_t *event)
>  	window->wm = wm;
>  	window->id = create_notify->window;
>  	window->properties_dirty = 1;
> +	window->decorate = 1;
>  
>  	window->width = create_notify->width;
>  	window->height = create_notify->height;
> -- 
> 1.7.9.5
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list