[PATCH 0/13] xserver/xwin: cross compile using mingw from Linux

Colin Harrison colin.harrison at virgin.net
Sat May 26 05:17:49 PDT 2007


 
> Two method produce the same result for me, I think the logic 
> is the same at this time.
> 
> !( defined(WIN32) && !defined(__CYGWIN__) ) == !defined(WIN32) ||
> !!defined(__CYGWIN__)
>                                             == !defined(WIN32) ||
> defined(__CYGWIN__)
>                                             == !defined(WIN32) ||
> !defined(__MING32__)
> 
> as xerver/xwin only support build from Cygwin and MingW.

You would have thought so but.. I get

makedepend: warning:  utils.c, line 69: cannot find include file
"sys/resource.h
...
probably due to makedepend not knowing about __MINGW32__ at that point in
the file (with my archaic build).
Not that important..but I just like clean builds and check by diff'ing new
and old build logs looking
for additional crud!

  
> Compare to the winMultiWindowGetWMNormalHints () function, 
> this should make sense.
> -            memcpy (*ppDaddy, prop->data, sizeof (WindowPtr));
> +            memcpy (*ppDaddy, prop->data, sizeof (WindowRec));
> It is the WindowRec structure that should be copied, do you 
> have any method to test this?
That crashes for me.
I use winMultiWindowGetTransientFor() like this in winmultiwindowwindow.c to
confirm that if an X window
has a parent and that Microsoft Windows agrees that this parent is in the
foreground, all is well before
creating the child in Windows 
i.e. a double check to not assign a parent wrongly to a Microsoft window.

...
HWND                  hFore = NULL;
...
WindowPtr             pDaddy;
...
if (winMultiWindowGetTransientFor (pWin, &pDaddy))
{
      if (pDaddy)
      {
        hFore = GetForegroundWindow();
        if (hFore && (pDaddy != (WindowPtr)GetProp(hFore, WIN_WID_PROP)))
hFore = NULL;
...
and then use hFore in CreateWindowExA(...,HWND hWndParent,...)
OK to be NULL

A case of calling with pp's and using p's I think?

Colin







More information about the xorg mailing list