<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <br>
    <blockquote cite="mid:m2aai5gdew.fsf@winehq.org" type="cite">
      <pre wrap="">Alexander Lakhin <a class="moz-txt-link-rfc2396E" href="mailto:exclusion@gmail.com">&lt;exclusion@gmail.com&gt;</a> writes:

</pre>
      <blockquote type="cite">
        <pre wrap="">+    data-&gt;iconic = (new_style &amp; WS_MINIMIZE) != 0;
+
     if (!data-&gt;embedded)
     {
         update_net_wm_states( display, data );
         sync_window_style( display, data );
         wine_tsx11_lock();
         XMapWindow( display, data-&gt;whole_window );
+        if (data-&gt;iconic)
+            XIconifyWindow( display, data-&gt;whole_window, DefaultScreen(display) );
</pre>
      </blockquote>
      <pre wrap="">
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.

</pre>
    </blockquote>
    <pre>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-&gt;initial_state = IconicState;
  wm_hints-&gt;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:
<a href="http://mail.gnome.org/archives/wm-spec-list/2001-December/msg00020.html">http://mail.gnome.org/archives/wm-spec-list/2001-December/msg00020.html</a>

So it seems that the only way to minimize a window is to call XIconifyWindow.
<style type="text/css">p { margin-bottom: 0.21cm; }a:link { color: rgb(0, 0, 128); text-decoration: underline; </style>
Best regards,
Alexander

</pre>
  </body>
</html>