CVS: seamlessrdp/ServerExe/HookDll hookdll.cpp,1.24,1.25
Peter Åstrand <[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-serv13282
Modified Files:
hookdll.cpp
Log Message:
Reporting size/position changes in response to WM_WINDOWPOSCHANGED,
instead of WM_SIZING/WM_MOVING. This is more reliable.
Index: hookdll.cpp
===================================================================
RCS file: /cvsroot/rdesktop/seamlessrdp/ServerExe/HookDll/hookdll.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** hookdll.cpp 5 Sep 2005 06:52:26 -0000 1.24
--- hookdll.cpp 13 Sep 2005 13:08:16 -0000 1.25
***************
*** 91,115 ****
LONG dwStyle = GetWindowLong( details->hwnd, GWL_STYLE );
WINDOWPOS *wp = ( WINDOWPOS * ) details->lParam;
! RECT *rect = ( RECT * ) details->lParam;
switch ( details->message ) {
! case WM_SIZING:
! case WM_MOVING:
! if ( !( dwStyle & WS_VISIBLE ) )
break;
! if ( !( dwStyle & WS_DLGFRAME ) )
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 );
break;
--- 91,120 ----
LONG dwStyle = GetWindowLong( details->hwnd, GWL_STYLE );
WINDOWPOS *wp = ( WINDOWPOS * ) details->lParam;
! RECT rect;
switch ( details->message ) {
! case WM_WINDOWPOSCHANGED:
! if ( !( dwStyle & WS_DLGFRAME ) )
break;
! if ( wp->flags & SWP_NOMOVE && wp->flags & SWP_NOSIZE )
break;
+ 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 );
+
break;
***************
*** 124,131 ****
the event that was sent when the About dialog was opened... */
case WM_WINDOWPOSCHANGING:
-
- if ( !( dwStyle & WS_VISIBLE ) )
- break;
-
if ( !( dwStyle & WS_DLGFRAME ) )
break;
--- 129,132 ----
***************
*** 159,163 ****
details->hwnd,
cs->lpszName,
! 1, // FIXME: Check for WS_MAXIMIZE/WS_MINIMIZE
0 );
result[ sizeof( result ) - 1 ] = '\0';
--- 160,164 ----
details->hwnd,
cs->lpszName,
! 1, // FIXME: Check for WS_MAXIMIZE/WS_MINIMIZE
0 );
result[ sizeof( result ) - 1 ] = '\0';
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf