CVS: seamlessrdp/ServerExe/HookDll hookdll.cpp,1.27,1.28

Pierre Ossman <[email protected]>
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/seamlessrdp/ServerExe/HookDll
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27567

Modified Files:
	hookdll.cpp 
Log Message:
Change strategy to catch WM_WINDOWPOSCHANGED instead as that seems to work
better.


Index: hookdll.cpp
===================================================================
RCS file: /cvsroot/rdesktop/seamlessrdp/ServerExe/HookDll/hookdll.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** hookdll.cpp	8 Mar 2006 09:41:55 -0000	1.27
--- hookdll.cpp	8 Mar 2006 15:52:38 -0000	1.28
***************
*** 96,101 ****
      
          case WM_WINDOWPOSCHANGED:
!         if ( !( dwStyle & WS_DLGFRAME ) )
!             break;
              
          if ( wp->flags & SWP_NOMOVE && wp->flags & SWP_NOSIZE )
--- 96,144 ----
      
          case WM_WINDOWPOSCHANGED:
! 	    if ( dwStyle & WS_CHILD)
! 		break;
! 
! 
! 	    if ( wp->flags & SWP_SHOWWINDOW ) {
! 		// FIXME: Now, just like create!
! 		SendDebug("SWP_SHOWWINDOW for %p!", details->hwnd);
! 		
! 		snprintf( result, sizeof( result ),
! 			  "CREATE1,0x%p,0x%x\n",
! 			  details->hwnd, 0 );
! 		result[ sizeof( result ) - 1 ] = '\0';
! 		WriteToChannel( result );
! 
! 		// FIXME: SETSTATE
! 	    
! 		if ( !GetWindowRect( details->hwnd, &rect ) ) {
! 		    SendDebug( "GetWindowRect failed!\n" );
! 		    break;
! 		}
! 		snprintf( result, sizeof( result ),
! 			  "POSITION1,0x%p,%d,%d,%d,%d,0x%x\n",
! 			  details->hwnd,
! 			  rect.left, rect.top,
! 			  rect.right - rect.left,
! 			  rect.bottom - rect.top,
! 			  0 );
! 		result[ sizeof( result ) - 1 ] = '\0';
! 		WriteToChannel( result );
! 
! 	    }
! 
! 
! 	    if ( wp->flags & SWP_HIDEWINDOW ) {
! 		snprintf( result, sizeof( result ),
! 			  "DESTROY1,0x%p,0x%x\n",
! 			  details->hwnd, 0 );
! 		result[ sizeof( result ) - 1 ] = '\0';
! 		WriteToChannel( result );
! 
! 	    }
! 
! 
! 	if ( !( dwStyle & WS_VISIBLE ) )
! 		break;
              
          if ( wp->flags & SWP_NOMOVE && wp->flags & SWP_NOSIZE )
***************
*** 129,134 ****
          the event that was sent when the About dialog was opened...  */
          case WM_WINDOWPOSCHANGING:
!         if ( !( dwStyle & WS_DLGFRAME ) )
!             break;
              
          if ( !( wp->flags & SWP_NOZORDER ) ) {
--- 172,180 ----
          the event that was sent when the About dialog was opened...  */
          case WM_WINDOWPOSCHANGING:
! 	    if ( dwStyle & WS_CHILD)
! 		break;
! 
! 	    if ( !( dwStyle & WS_VISIBLE ) )
! 		break;
              
          if ( !( wp->flags & SWP_NOZORDER ) ) {
***************
*** 143,185 ****
          break;
          
!         
!         case WM_CREATE:
!         if ( cs->style & WS_DLGFRAME ) {
!         
!             if ( cs->cx < 0 || cs->cy < 0 )
!                 break;
!                 
!             snprintf( result, sizeof( result ),
!                       "CREATE1,0x%p,0x%x\n",
!                       details->hwnd, 0 );
!             result[ sizeof( result ) - 1 ] = '\0';
!             WriteToChannel( result );
!             
!             snprintf( result, sizeof( result ),
!                       "SETSTATE1,0x%p,%s,0x%x,0x%x\n",
!                       details->hwnd,
!                       cs->lpszName,
!                       1,         // FIXME: Check for WS_MAXIMIZE/WS_MINIMIZE
!                       0 );
!             result[ sizeof( result ) - 1 ] = '\0';
!             WriteToChannel( result );
!             
!             snprintf( result, sizeof( result ),
!                       "POSITION1,0x%p,%d,%d,%d,%d,0x%x\n",
!                       details->hwnd,
!                       cs->x,
!                       cs->y,
!                       cs->cx,
!                       cs->cy,
!                       0 );
!             result[ sizeof( result ) - 1 ] = '\0';
!             WriteToChannel( result );
!             
!         }
!         break;
!         
          
          case WM_DESTROY:
!         if ( dwStyle & WS_DLGFRAME ) {
              snprintf( result, sizeof( result ),
                        "DESTROY1,0x%p,0x%x\n",
--- 189,199 ----
          break;
          
!        
!       
          
          case WM_DESTROY:
! 	    if ( dwStyle & WS_CHILD)
! 		break;
! 
              snprintf( result, sizeof( result ),
                        "DESTROY1,0x%p,0x%x\n",
***************
*** 187,195 ****
              result[ sizeof( result ) - 1 ] = '\0';
              WriteToChannel( result );
-         }
          
          break;
!         
!         
          default:
          break;
--- 201,208 ----
              result[ sizeof( result ) - 1 ] = '\0';
              WriteToChannel( result );
          
          break;
! 
!       
          default:
          break;



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.