winex11.drv: map_window should honor iconic state

Alexander Lakhin exclusion at
Sat Feb 12 11:56:39 CST 2011

> Alexander Lakhin<exclusion at>  writes:
>> +    data->iconic = (new_style&  WS_MINIMIZE) != 0;
>> +
>>       if (!data->embedded)
>>       {
>>           update_net_wm_states( display, data );
>>           sync_window_style( display, data );
>>           wine_tsx11_lock();
>>           XMapWindow( display, data->whole_window );
>> +        if (data->iconic)
>> +            XIconifyWindow( display, data->whole_window, DefaultScreen(display) );
> This is handled by setting the initial window state in the wm hints. If
> there's somewhere that the state isn't set correctly, that's what should
> be fixed.
Hello, Alexandre.

I've checked XWMHints just before XMapWindow call and received the correct initial_state (IconicState) and flags (StateHint set) there.
But the window still displayed not in a minimized state. To isolate the issue I tried the following code snippet:
   XWMHints *wm_hints = XAllocWMHints();
   wm_hints->initial_state = IconicState;
   wm_hints->flags = StateHint;
   XSetWMHints( display, win, wm_hints );

   XMapWindow( display, win );
And the window was not minimized again. After some research I found the following explanation to it:

So it seems that the only way to minimize a window is to call XIconifyWindow.

Best regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the wine-devel mailing list