[PATCH weston 4/6] xwm: initialize window decoration always as !override
Tiago Vignatti
tiago.vignatti at linux.intel.com
Tue Jun 5 09:36:46 PDT 2012
On 06/05/2012 07:15 PM, Kristian Høgsberg wrote:
> On Mon, Jun 04, 2012 at 08:01:46PM +0300, Tiago Vignatti wrote:
>> and read later whether some property like MOTIF_WM_HINTS wants to change it
>> to a different value.
>>
>> 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 b5d39d3..1e121ee 100644
>> --- a/src/xwayland/window-manager.c
>> +++ b/src/xwayland/window-manager.c
>> @@ -252,7 +252,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)
>
> We need to initialize window->decorate here always. The *absence* of
> the motif hints mean that we have to decorate, so to be able
> transition from "not decorated" to "decorated" we need to initialize
> window->decorate here.
sorry I didn't get the reason it has to be *here*, Kristian.
I understand and agree that the absence of the motif hints mean we have
to decorate, and my patch does that. But to be able to transition from
"not decorated" to "decorated", as you put down, does not infers that
the pointer has to be initialized there.
Your solution works as well, I tested. But I'm thinking that it's always
initializing with the same value, so that's my complain. For what case
my solution fails? Do you have an example?
>> @@ -712,6 +711,7 @@ weston_wm_window_create(struct weston_wm *wm,
>> window->id = id;
>> window->properties_dirty = 1;
>> window->override_redirect = override;
>> + window->decorate = !window->override_redirect;
>> window->width = width;
>> window->height = 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