diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Image.cxx | 6 | ||||
| -rw-r--r-- | src/Fl_Input.cxx | 2 | ||||
| -rw-r--r-- | src/Fl_Menu.cxx | 11 | ||||
| -rw-r--r-- | src/Fl_win32.cxx | 14 | ||||
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx | 10 | ||||
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx | 2 |
6 files changed, 29 insertions, 16 deletions
diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx index fdaf0bfdb..c048d57c3 100644 --- a/src/Fl_Image.cxx +++ b/src/Fl_Image.cxx @@ -419,15 +419,15 @@ Fl_Image *Fl_RGB_Image::copy(int W, int H) { const float downf = yfract; for (i = 0; i < d(); i++) { - new_ptr[i] = (left[i] * leftf + + new_ptr[i] = (uchar)((left[i] * leftf + right[i] * rightf) * upf + (downleft[i] * leftf + - downright[i] * rightf) * downf; + downright[i] * rightf) * downf); } if (d() == 4 && new_ptr[3]) { for (i = 0; i < 3; i++) { - new_ptr[i] /= new_ptr[3] / 255.0f; + new_ptr[i] = (uchar)(new_ptr[i] / (new_ptr[3] / 255.0f)); } } } diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx index d6b8b3886..205babaf3 100644 --- a/src/Fl_Input.cxx +++ b/src/Fl_Input.cxx @@ -316,7 +316,7 @@ int Fl_Input::handle_key() { Fl::compose_reset(); // ignore any foreign letters... // initialize the list of legal characters inside a floating point number -#ifdef HAVE_LOCALECONV +#if defined(HAVE_LOCALECONV) && defined(HAVE_LOCALE_H) if (!legal_fp_chars) { size_t len = strlen(standard_fp_chars); struct lconv *lc = localeconv(); diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index 39ab67072..1d56a1ebd 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -775,11 +775,12 @@ int menuwindow::handle_part1(int e) { } } break; - case FL_MOVE: - static int use_part1_extra = Fl::system_driver()->need_menu_handle_part1_extra(); - if (use_part1_extra && pp.state == DONE_STATE) { - return 1; // Fix for STR #2619 - } + case FL_MOVE: { + static int use_part1_extra = Fl::system_driver()->need_menu_handle_part1_extra(); + if (use_part1_extra && pp.state == DONE_STATE) { + return 1; // Fix for STR #2619 + } + } /* FALLTHROUGH */ case FL_ENTER: case FL_PUSH: diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index c3ea187bf..3bf114404 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -163,13 +163,13 @@ static HMODULE get_wsock_mod() { */ static HMODULE s_imm_module = 0; typedef BOOL (WINAPI* flTypeImmAssociateContextEx)(HWND, HIMC, DWORD); -static flTypeImmAssociateContextEx flImmAssociateContextEx = 0; +flTypeImmAssociateContextEx flImmAssociateContextEx = 0; typedef HIMC (WINAPI* flTypeImmGetContext)(HWND); -static flTypeImmGetContext flImmGetContext = 0; +flTypeImmGetContext flImmGetContext = 0; typedef BOOL (WINAPI* flTypeImmSetCompositionWindow)(HIMC, LPCOMPOSITIONFORM); -static flTypeImmSetCompositionWindow flImmSetCompositionWindow = 0; +flTypeImmSetCompositionWindow flImmSetCompositionWindow = 0; typedef BOOL (WINAPI* flTypeImmReleaseContext)(HWND, HIMC); -static flTypeImmReleaseContext flImmReleaseContext = 0; +flTypeImmReleaseContext flImmReleaseContext = 0; static void get_imm_module() { s_imm_module = LoadLibrary("IMM32.DLL"); @@ -1095,14 +1095,14 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar R = CreateRectRgn(0,0,0,0); int r = GetUpdateRgn(hWnd,R,0); if (r==NULLREGION && !redraw_whole_window) { - Fl_Graphics_Driver::XDestroyRegion(R); + Fl_Graphics_Driver::default_driver().XDestroyRegion(R); break; } if (i->region) { // Also tell WIN32 that we are drawing someplace else as well... CombineRgn(i->region, i->region, R, RGN_OR); - Fl_Graphics_Driver::XDestroyRegion(R); + Fl_Graphics_Driver::default_driver().XDestroyRegion(R); } else { i->region = R; } @@ -2502,6 +2502,8 @@ void preparePrintFront(void) } #endif // USE_PRINT_BUTTON + + #endif // defined(WIN32) and !defined(FL_DOXYGEN) // diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx index 47cc9383c..e10191ec2 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx @@ -179,6 +179,16 @@ void Fl_GDI_Graphics_Driver::XDestroyRegion(Fl_Region r) { } +typedef BOOL(WINAPI* flTypeImmAssociateContextEx)(HWND, HIMC, DWORD); +extern flTypeImmAssociateContextEx flImmAssociateContextEx; +typedef HIMC(WINAPI* flTypeImmGetContext)(HWND); +extern flTypeImmGetContext flImmGetContext; +typedef BOOL(WINAPI* flTypeImmSetCompositionWindow)(HIMC, LPCOMPOSITIONFORM); +extern flTypeImmSetCompositionWindow flImmSetCompositionWindow; +typedef BOOL(WINAPI* flTypeImmReleaseContext)(HWND, HIMC); +extern flTypeImmReleaseContext flImmReleaseContext; + + void Fl_GDI_Graphics_Driver::reset_spot() { } diff --git a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx index 89bd68fee..a7b068e69 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx @@ -450,7 +450,7 @@ void Fl_WinAPI_Window_Driver::hide() { # endif } - if (ip->region) Fl_Graphics_Driver::XDestroyRegion(ip->region); + if (ip->region) Fl_Graphics_Driver::default_driver().XDestroyRegion(ip->region); // this little trickery seems to avoid the popup window stacking problem HWND p = GetForegroundWindow(); |
