/[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 1106 by ossman_, Fri Mar 10 13:47:41 2006 UTC revision 1131 by ossman_, Wed Mar 15 12:15:23 2006 UTC
# Line 91  wndproc_hook_proc(int code, WPARAM cur_t Line 91  wndproc_hook_proc(int code, WPARAM cur_t
91                  goto end;                  goto end;
92    
93          if (style & WS_POPUP)          if (style & WS_POPUP)
94            {
95                  parent = (HWND) GetWindowLong(hwnd, GWL_HWNDPARENT);                  parent = (HWND) GetWindowLong(hwnd, GWL_HWNDPARENT);
96                    if (!parent)
97                            parent = (HWND) - 1;
98            }
99          else          else
100                  parent = NULL;                  parent = NULL;
101    
# Line 111  wndproc_hook_proc(int code, WPARAM cur_t Line 115  wndproc_hook_proc(int code, WPARAM cur_t
115    
116                                          GetWindowText(hwnd, title, sizeof(title));                                          GetWindowText(hwnd, title, sizeof(title));
117    
118                                          /* FIXME: Strip title of dangerous characters */                                          vchannel_write("TITLE,0x%x,%s,0x%x", hwnd,
119                                                           vchannel_strfilter(title), 0);
                                         vchannel_write("TITLE,0x%x,%s,0x%x", hwnd, title, 0);  
120    
121                                          if (style & WS_MAXIMIZE)                                          if (style & WS_MAXIMIZE)
122                                                  state = 2;                                                  state = 2;
# Line 122  wndproc_hook_proc(int code, WPARAM cur_t Line 125  wndproc_hook_proc(int code, WPARAM cur_t
125                                          else                                          else
126                                                  state = 0;                                                  state = 0;
127    
                                         vchannel_write("STATE,0x%p,0x%x,0x%x", hwnd, state, 0);  
   
128                                          update_position(hwnd);                                          update_position(hwnd);
129    
130                                          /* FIXME: Figure out z order */                                          vchannel_write("STATE,0x%p,0x%x,0x%x", hwnd, state, 0);
131                                  }                                  }
132    
133                                  if (wp->flags & SWP_HIDEWINDOW)                                  if (wp->flags & SWP_HIDEWINDOW)
134                                          vchannel_write("DESTROY,0x%p,0x%x", hwnd, 0);                                          vchannel_write("DESTROY,0x%p,0x%x", hwnd, 0);
135    
136                                  if (!(style & WS_VISIBLE))                                  if (!(style & WS_VISIBLE) || (style & WS_MINIMIZE))
137                                          break;                                          break;
138    
139                                  if (!(wp->flags & SWP_NOMOVE && wp->flags & SWP_NOSIZE))                                  if (!(wp->flags & SWP_NOMOVE && wp->flags & SWP_NOSIZE))
# Line 150  wndproc_hook_proc(int code, WPARAM cur_t Line 151  wndproc_hook_proc(int code, WPARAM cur_t
151                          }                          }
152    
153                  case WM_SIZE:                  case WM_SIZE:
154                          if (!(style & WS_VISIBLE))                          if (!(style & WS_VISIBLE) || (style & WS_MINIMIZE))
155                                  break;                                  break;
156                          update_position(hwnd);                          update_position(hwnd);
157                          break;                          break;
158    
159                  case WM_MOVE:                  case WM_MOVE:
160                          if (!(style & WS_VISIBLE))                          if (!(style & WS_VISIBLE) || (style & WS_MINIMIZE))
161                                  break;                                  break;
162                          update_position(hwnd);                          update_position(hwnd);
163                          break;                          break;
164    
165                  case WM_SETTEXT:                  case WM_SETTEXT:
166                          if (!(style & WS_VISIBLE))                          {
167                                    char *title;
168                                    if (!(style & WS_VISIBLE))
169                                            break;
170                                    title = _strdup((char *) lparam);
171                                    vchannel_write("TITLE,0x%p,%s,0x%x", hwnd,
172                                                   vchannel_strfilter(title), 0);
173                                    free(title);
174                                  break;                                  break;
175                          /* FIXME: Strip title of dangerous characters */                          }
                         vchannel_write("TITLE,0x%p,%s,0x%x", hwnd, (char *) lparam, 0);  
                         break;  
176    
177                  case WM_DESTROY:                  case WM_DESTROY:
178                          if (!(style & WS_VISIBLE))                          if (!(style & WS_VISIBLE))
# Line 196  cbt_hook_proc(int code, WPARAM wparam, L Line 202  cbt_hook_proc(int code, WPARAM wparam, L
202    
203                                  show = LOWORD(lparam);                                  show = LOWORD(lparam);
204    
205                                  if ((show == SW_NORMAL) || (show == SW_SHOWNORMAL))                                  if ((show == SW_NORMAL) || (show == SW_SHOWNORMAL)
206                                        || (show == SW_RESTORE))
207                                          state = 0;                                          state = 0;
208                                  else if ((show == SW_MINIMIZE) || (show == SW_SHOWMINIMIZED))                                  else if ((show == SW_MINIMIZE) || (show == SW_SHOWMINIMIZED))
209                                          state = 1;                                          state = 1;

Legend:
Removed from v.1106  
changed lines
  Added in v.1131

  ViewVC Help
Powered by ViewVC 1.1.26