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; |
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|