Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-05-01 18:35:12 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-05-01 18:35:12 +0400
commit79e741ef6f0882f993e4b0767cc62b6b417f30cd (patch)
treef5465cbddbd551b0bb6d4699beb96427e76cfc85 /winsup/cygwin/window.cc
parentc60d0bbe688ae9ad37e56ab8ba73124e8b6c73b7 (diff)
Throughout, use user32 UNICODE functions rather than ANSI functions.
* autoload.cc: Convert all definitions for ANSI user32 functions to definitions for the corresponding UNICODE function. (SendMessageA): Remove. (SendNotifyMessageW): Define. * fhandler_windows.cc (fhandler_windows::write): Use SendNotifyMessageW call rather than SendMessage to make function always return immediately. (fhandler_windows::read): Make function interruptible and a cancellation point. Handle O_NONBLOCK. * select.cc (peek_serial): Don't wait for signal_arrived here. * window.cc (wininfo::winthread): Call CreateWindowExW directly rather than CreateWindow wrapper.
Diffstat (limited to 'winsup/cygwin/window.cc')
-rw-r--r--winsup/cygwin/window.cc24
1 files changed, 13 insertions, 11 deletions
diff --git a/winsup/cygwin/window.cc b/winsup/cygwin/window.cc
index 981c080a1..096b474ac 100644
--- a/winsup/cygwin/window.cc
+++ b/winsup/cygwin/window.cc
@@ -1,6 +1,7 @@
/* window.cc: hidden windows for signals/itimer support
- Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.
+ Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2010,
+ 2011 Red Hat, Inc.
Written by Sergey Okhapkin <sos@prospect.com.ru>
@@ -45,7 +46,7 @@ wininfo::process (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
raise (SIGIO);
return 0;
default:
- return DefWindowProc (hwnd, uMsg, wParam, lParam);
+ return DefWindowProcW (hwnd, uMsg, wParam, lParam);
}
}
@@ -60,8 +61,8 @@ DWORD WINAPI
wininfo::winthread ()
{
MSG msg;
- WNDCLASS wc;
- static NO_COPY char classname[] = "CygwinWndClass";
+ WNDCLASSW wc;
+ static NO_COPY WCHAR classname[] = L"CygwinWndClass";
_lock.grab ();
/* Register the window class for the main window. */
@@ -77,20 +78,21 @@ wininfo::winthread ()
wc.lpszMenuName = NULL;
wc.lpszClassName = classname;
- if (!RegisterClass (&wc))
+ if (!RegisterClassW (&wc))
api_fatal ("cannot register window class, %E");
/* Create hidden window. */
- hwnd = CreateWindow (classname, classname, WS_POPUP, CW_USEDEFAULT,
- CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
- (HWND) NULL, (HMENU) NULL, user_data->hmodule,
- (LPVOID) NULL);
+ hwnd = CreateWindowExW (0, classname, classname, WS_POPUP, CW_USEDEFAULT,
+ CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
+ (HWND) NULL, (HMENU) NULL, user_data->hmodule,
+ (LPVOID) NULL);
if (!hwnd)
api_fatal ("couldn't create window, %E");
release ();
- while (GetMessage (&msg, hwnd, 0, 0) == TRUE)
- DispatchMessage (&msg);
+ int ret;
+ while ((ret = (int) GetMessageW (&msg, hwnd, 0, 0)) > 0)
+ DispatchMessageW (&msg);
return 0;
}