CVS: seamlessrdp/ServerExe/HookDll hookdll.c, 1.44, 1.45

Peter Åstrand <[email protected]> Fri, 14 Mar 2008 00:22:57 -0700
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/seamlessrdp/ServerExe/HookDll
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8280/ServerExe/HookDll

Modified Files:
	hookdll.c 
Log Message:
Corrected is_menu, so that menus works with Seamonkey as well. 



Index: hookdll.c
===================================================================
RCS file: /cvsroot/rdesktop/seamlessrdp/ServerExe/HookDll/hookdll.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** hookdll.c	11 Mar 2008 08:21:33 -0000	1.44
--- hookdll.c	14 Mar 2008 07:22:55 -0000	1.45
***************
*** 94,101 ****
  is_menu(HWND hwnd)
  {
! 	HWND owner = GetWindow(hwnd, GW_OWNER);
! 	LONG exstyle = GetWindowLong(hwnd, GWL_EXSTYLE);
! 	return (exstyle & (WS_EX_TOOLWINDOW | WS_EX_TOPMOST)) && owner;
  
  }
  
--- 94,103 ----
  is_menu(HWND hwnd)
  {
! 	/* Notepad menus have an owner, but Seamonkey menus does not,
! 	   so we cannot use the owner in our check. This leaves us with 
! 	   checking WS_EX_TOOLWINDOW and WS_EX_TOPMOST. */
  
+ 	LONG exstyle = GetWindowLong(hwnd, GWL_EXSTYLE);
+ 	return (exstyle & (WS_EX_TOOLWINDOW | WS_EX_TOPMOST));
  }
  


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/