[xorg-commit-diffs] xc/programs/Xserver/hw/xwin winblock.c, 1.1.4.1.2.12, 1.1.4.1.2.13 winwakeup.c, 1.1.4.1.2.11, 1.1.4.1.2.12 winwin32rootlesswindow.c, 1.1.2.5, 1.1.2.6 winwin32rootlesswndproc.c, 1.1.2.7, 1.1.2.8

Kensuke Matsuzaki xorg-commit at pdx.freedesktop.org
Thu Apr 8 22:54:13 PDT 2004


Committed by: zakki

Update of /cvs/xorg/xc/programs/Xserver/hw/xwin
In directory pdx:/tmp/cvs-serv25147

Modified Files:
      Tag: CYGWIN
	winblock.c winwakeup.c winwin32rootlesswindow.c 
	winwin32rootlesswndproc.c 
Log Message:
Fix window reordering. Remove winMWExtWMReorderWindows.


Index: winblock.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winblock.c,v
retrieving revision 1.1.4.1.2.12
retrieving revision 1.1.4.1.2.13
diff -u -d -r1.1.4.1.2.12 -r1.1.4.1.2.13
--- a/winblock.c	26 Mar 2004 20:39:17 -0000	1.1.4.1.2.12
+++ b/winblock.c	9 Apr 2004 05:52:50 -0000	1.1.4.1.2.13
@@ -89,9 +89,4 @@
 	  DispatchMessage (&msg);
 	}
     }
-
-#ifdef XWIN_MULTIWINDOWEXTWM
-  if (pScreenPriv->pScreenInfo->fMWExtWM)
-    winMWExtWMReorderWindows ((ScreenPtr)pBlockData);
-#endif
 }

Index: winwakeup.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winwakeup.c,v
retrieving revision 1.1.4.1.2.11
retrieving revision 1.1.4.1.2.12
diff -u -d -r1.1.4.1.2.11 -r1.1.4.1.2.12
--- a/winwakeup.c	26 Mar 2004 03:21:41 -0000	1.1.4.1.2.11
+++ b/winwakeup.c	9 Apr 2004 05:52:50 -0000	1.1.4.1.2.12
@@ -67,9 +67,4 @@
 	  DispatchMessage (&msg);
 	}
     }
-
-#ifdef XWIN_MULTIWINDOWEXTWM
-  if (pScreenPriv->pScreenInfo->fMWExtWM)
-    winMWExtWMReorderWindows ((ScreenPtr)pWakeupData);
-#endif
 }

Index: winwin32rootlesswindow.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/Attic/winwin32rootlesswindow.c,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -d -r1.1.2.5 -r1.1.2.6
--- a/winwin32rootlesswindow.c	3 Mar 2004 02:57:00 -0000	1.1.2.5
+++ b/winwin32rootlesswindow.c	9 Apr 2004 05:52:50 -0000	1.1.2.6
@@ -41,6 +41,7 @@
 extern HICON		g_hiconX;
 
 
+#if 0
 /*
  * winMWExtWMReorderWindows
  */
@@ -54,6 +55,7 @@
   win32RootlessWindowPtr pRLWinSib = NULL;
   DWORD dwCurrentProcessID = GetCurrentProcessId ();
   DWORD dwWindowProcessID = 0;
+  XID vlist[2];
 
 #if CYGMULTIWINDOW_DEBUG && FALSE
   ErrorF ("winMWExtWMReorderWindows\n");
@@ -80,22 +82,19 @@
 	      
 	      if (pRLWinSib)
 		{
-		  XID *vlist = malloc (sizeof(long) * 2);
-		  
-		  if (vlist == NULL)
-		    {
-		      ErrorF ("winMWExtWMReorderWindows - malloc () "
-			      "failed\n");
-		      return;
-		    }
-		  
-		  ((long*)vlist)[0] = pRLWinSib->pFrame->win->drawable.id;
-		  ((long*)vlist)[1] = Below;
+		  vlist[0] = pRLWinSib->pFrame->win->drawable.id;
+		  vlist[1] = Below;
 
 		  ConfigureWindow (pRLWin->pFrame->win, CWSibling | CWStackMode,
 				   vlist, wClient(pRLWin->pFrame->win));
-		  
-		  free (vlist);
+		}
+	      else
+		{
+		  /* 1st window - raise to the top */
+		  vlist[0] = Above;
+
+		  ConfigureWindow (pRLWin->pFrame->win, CWStackMode,
+				   vlist, wClient(pRLWin->pFrame->win));
 		}
 	    }
 	  hwnd = GetNextWindow (hwnd, GW_HWNDNEXT);
@@ -104,8 +103,8 @@
 
   pScreenPriv->fRestacking = FALSE;
   pScreenPriv->fWindowOrderChanged = FALSE;
-
 }
+#endif
 
 
 /*

Index: winwin32rootlesswndproc.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/Attic/winwin32rootlesswndproc.c,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -u -d -r1.1.2.7 -r1.1.2.8
--- a/winwin32rootlesswndproc.c	3 Mar 2004 02:57:00 -0000	1.1.2.7
+++ b/winwin32rootlesswndproc.c	9 Apr 2004 05:52:50 -0000	1.1.2.8
@@ -412,6 +412,7 @@
   PAINTSTRUCT		ps;
   LPWINDOWPOS		pWinPos = NULL;
   RECT			rcClient;
+  XID			vlist[2];
 
   /* Check if the Windows window property for our X window pointer is valid */
   if ((pRLWinPriv = (win32RootlessWindowPtr)GetProp (hwnd, WIN_WINDOW_PROP)) != NULL)
@@ -898,8 +899,48 @@
 
 	/* Reorder if window z order was changed */
 	if ((pScreenPriv != NULL)
-	    && !(pWinPos->flags & SWP_NOZORDER))
-	  pScreenPriv->fWindowOrderChanged = TRUE;
+	    && !(pWinPos->flags & SWP_NOZORDER)
+	    && !(pWinPos->flags & SWP_SHOWWINDOW))
+	  {
+	    pScreenPriv->fWindowOrderChanged = TRUE;
+	    if (pWinPos->hwndInsertAfter == HWND_TOP
+		||pWinPos->hwndInsertAfter == HWND_TOPMOST
+		||pWinPos->hwndInsertAfter == HWND_NOTOPMOST)
+	      {
+		vlist[0] = Above;
+		ConfigureWindow (pWin, CWStackMode,
+				 vlist, wClient(pWin));
+	      }
+#if 1
+	    else if (pWinPos->hwndInsertAfter == HWND_BOTTOM)
+	      {
+	      }
+	    else
+	      {
+		HWND hWndAbove = NULL;
+		DWORD dwCurrentProcessID = GetCurrentProcessId ();
+		DWORD dwWindowProcessID = 0;
+
+		for (hWndAbove = pWinPos->hwndInsertAfter;
+		     hWndAbove != NULL;
+		     hWndAbove = GetNextWindow (hWndAbove, GW_HWNDPREV))
+		  {
+		    GetWindowThreadProcessId (hWndAbove, &dwWindowProcessID);
+
+		    if ((dwWindowProcessID == dwCurrentProcessID)
+			&& GetProp (Above, WIN_WINDOW_PROP)
+			&& !IsIconic (hwnd) ) /* ignore minimized windows */
+		      break;
+		  }
+		if (hWndAbove == NULL)
+		  {
+		    vlist[0] = Above;
+		    ConfigureWindow (pWin, CWStackMode,
+				     vlist, wClient(pWin));
+		  }
+	      }
+#endif
+	  }
 
 	if (!(pWinPos->flags & SWP_NOSIZE)) {
 	  if (IsIconic(hwnd)){
@@ -936,7 +977,8 @@
 	}
 	if (!g_fNoConfigureWindow ) {
 
-	  if (!pRLWinPriv->fMovingOrSizing) {
+	  if (!pRLWinPriv->fMovingOrSizing
+	      && (pWinPos->flags & SWP_SHOWWINDOW)) {
 	    GetClientRect (hwnd, &rcClient);
 	    MapWindowPoints (hwnd, HWND_DESKTOP, (LPPOINT)&rcClient, 2);
 




More information about the xorg-commit-diffs mailing list