diff --git a/documentation/Fl_Input_.html b/documentation/Fl_Input_.html index a270f5f57..00aef026a 100644 --- a/documentation/Fl_Input_.html +++ b/documentation/Fl_Input_.html @@ -9,7 +9,7 @@ | +----Fl_Input_ | - +----Fl_Input + +----Fl_Input, Fl_Output

Include Files

@@ -169,4 +169,4 @@ position() and mark() are equal. non-zero if any change was made.

int Fl_Input_::copy_cuts()

Copy all the previous contiguous cuts from the undo information to the -clipboard. This is used to make ^K work. \ No newline at end of file +clipboard. This is used to make ^K work. diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 3f6476cae..f2187750d 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_win32.cxx,v 1.33.2.16 1999/11/12 00:19:12 mike Exp $" +// "$Id: Fl_win32.cxx,v 1.33.2.17 1999/12/15 04:58:27 bill Exp $" // // WIN32-specific code for the Fast Light Tool Kit (FLTK). // @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -109,9 +108,9 @@ void Fl::remove_fd(int n, int events) { j++; } nfds = j; - if (events & POLLIN) FD_CLR(n, &fdsets[0]); - if (events & POLLOUT) FD_CLR(n, &fdsets[1]); - if (events & POLLERR) FD_CLR(n, &fdsets[2]); + if (events & POLLIN) FD_CLR(unsigned(n), &fdsets[0]); + if (events & POLLOUT) FD_CLR(unsigned(n), &fdsets[1]); + if (events & POLLERR) FD_CLR(unsigned(n), &fdsets[2]); } void Fl::remove_fd(int n) { @@ -195,6 +194,7 @@ double fl_wait(int timeout_flag, double time) { // execute it, them execute any other messages that become ready during it: while (have_message) { + TranslateMessage(&fl_msg); DispatchMessage(&fl_msg); have_message = PeekMessage(&fl_msg, NULL, 0, 0, PM_REMOVE); } @@ -389,7 +389,6 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar Fl_Window *window = fl_find(hWnd); - STUPID_MICROSOFT: if (window) switch (uMsg) { case WM_QUIT: // this should not happen? @@ -460,23 +459,16 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar case WM_KEYDOWN: case WM_SYSKEYDOWN: - // save the keysym until we figure out the characters: - Fl::e_keysym = ms2fltk(wParam,lParam&(1<<24)); case WM_KEYUP: case WM_SYSKEYUP: - TranslateMessage(&fl_msg); // always returns 1!!! - // TranslateMessage is supposed to return true only if it turns - // into another message, but it seems to always return 1 on my - // NT machine. So I will instead peek to see if there is a - // character message in the queue, I hope this can only happen - // if the translation worked: + // save the keysym until we figure out the characters: + Fl::e_keysym = ms2fltk(wParam,lParam&(1<<24)); + // See if TranslateMessage turned it into a WM_*CHAR message: if (PeekMessage(&fl_msg, hWnd, WM_CHAR, WM_SYSDEADCHAR, 1)) { uMsg = fl_msg.message; wParam = fl_msg.wParam; lParam = fl_msg.lParam; - goto STUPID_MICROSOFT; } - // otherwise use it as a 0-character key... case WM_DEADCHAR: case WM_SYSDEADCHAR: case WM_CHAR: @@ -491,7 +483,12 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar if ((lParam&(1<<29)) //same as GetKeyState(VK_MENU) && uMsg != WM_CHAR) state |= FL_ALT; if (GetKeyState(VK_NUMLOCK)) state |= FL_NUM_LOCK; - if (GetKeyState(VK_LWIN)&~1 || GetKeyState(VK_RWIN)&~1) state |= FL_META; + if (GetKeyState(VK_LWIN)&~1 || GetKeyState(VK_RWIN)&~1) { + // WIN32 bug? GetKeyState returns garbage if the user hit the + // meta key to pop up start menu. Sigh. + if ((GetAsyncKeyState(VK_LWIN)|GetAsyncKeyState(VK_RWIN))&~1) + state |= FL_META; + } if (GetKeyState(VK_SCROLL)) state |= FL_SCROLL_LOCK; Fl::e_state = state;} if (lParam & (1<<31)) goto DEFAULT; // ignore up events after fixing shift @@ -899,5 +896,5 @@ void Fl_Window::make_current() { } // -// End of "$Id: Fl_win32.cxx,v 1.33.2.16 1999/11/12 00:19:12 mike Exp $". +// End of "$Id: Fl_win32.cxx,v 1.33.2.17 1999/12/15 04:58:27 bill Exp $". //