/[rdesktop]/sourceforge.net/trunk/seamlessrdp/ServerExe/HookDll/hookdll.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/seamlessrdp/ServerExe/HookDll/hookdll.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1439 by astrand, Thu Mar 6 15:11:53 2008 UTC revision 1440 by astrand, Thu Mar 6 15:12:26 2008 UTC
# Line 75  static HINSTANCE g_instance = NULL; Line 75  static HINSTANCE g_instance = NULL;
75    
76  static HANDLE g_mutex = NULL;  static HANDLE g_mutex = NULL;
77    
78  static BOOL is_toplevel(HWND hwnd)  static BOOL
79    is_toplevel(HWND hwnd)
80  {  {
81          BOOL toplevel;          BOOL toplevel;
82          HWND parent;          HWND parent;
# Line 101  get_parent(HWND hwnd) Line 102  get_parent(HWND hwnd)
102             http://msdn2.microsoft.com/en-us/library/bb776822.aspx */             http://msdn2.microsoft.com/en-us/library/bb776822.aspx */
103          owner = GetWindow(hwnd, GW_OWNER);          owner = GetWindow(hwnd, GW_OWNER);
104          exstyle = GetWindowLong(hwnd, GWL_EXSTYLE);          exstyle = GetWindowLong(hwnd, GWL_EXSTYLE);
105          if (!owner && !(exstyle & WS_EX_TOOLWINDOW))          if (!owner && !(exstyle & WS_EX_TOOLWINDOW))
106          {          {
107                  /* display taskbar icon */                  /* display taskbar icon */
108                  result = NULL;                  result = NULL;
109          }          }
110          else          else
111          {          {
112                  /* no taskbar icon */                  /* no taskbar icon */
113                  if (owner)                  if (owner)
114                          result = owner;                          result = owner;
115                  else                  else
116                          result = (HWND) - 1;                          result = (HWND) - 1;
117          }          }
118    
# Line 373  wndproc_hook_proc(int code, WPARAM cur_t Line 374  wndproc_hook_proc(int code, WPARAM cur_t
374    
375          style = GetWindowLong(hwnd, GWL_STYLE);          style = GetWindowLong(hwnd, GWL_STYLE);
376    
377          if (!is_toplevel(hwnd)) {          if (!is_toplevel(hwnd))
378            {
379                  goto end;                  goto end;
380          }          }
381    
# Line 398  wndproc_hook_proc(int code, WPARAM cur_t Line 400  wndproc_hook_proc(int code, WPARAM cur_t
400                                                  flags |= SEAMLESS_CREATE_MODAL;                                                  flags |= SEAMLESS_CREATE_MODAL;
401    
402                                          vchannel_write("CREATE", "0x%08lx,0x%08lx,0x%08lx,0x%08x",                                          vchannel_write("CREATE", "0x%08lx,0x%08lx,0x%08lx,0x%08x",
403                                                         (long) hwnd, (long) pid, (long) get_parent(hwnd),                                                         (long) hwnd, (long) pid,
404                                                         flags);                                                         (long) get_parent(hwnd), flags);
405    
406                                          GetWindowTextW(hwnd, title, sizeof(title) / sizeof(*title));                                          GetWindowTextW(hwnd, title, sizeof(title) / sizeof(*title));
407    
# Line 518  wndprocret_hook_proc(int code, WPARAM cu Line 520  wndprocret_hook_proc(int code, WPARAM cu
520    
521          style = GetWindowLong(hwnd, GWL_STYLE);          style = GetWindowLong(hwnd, GWL_STYLE);
522    
523          if (!is_toplevel(hwnd)) {          if (!is_toplevel(hwnd))
524            {
525                  goto end;                  goto end;
526          }          }
527    

Legend:
Removed from v.1439  
changed lines
  Added in v.1440

  ViewVC Help
Powered by ViewVC 1.1.26