mirror of https://github.com/fltk/fltk
MSWindows fixes for previous commits.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11644 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
cdf85352c4
commit
e2495a760a
|
@ -3,7 +3,9 @@ This documentation will explain how to quickly port FLTK to a new
|
|||
platform using the Pico driver system. For now, only the sample
|
||||
SDL Pico driver on OS X compiles and barely runs.
|
||||
|
||||
cmake -G Xcode -d OPTION_APPLE_SDL=ON ...
|
||||
> mkdir build
|
||||
> mkdir XcodeSDL
|
||||
> cmake -G Xcode -D OPTION_APPLE_SDL=ON ../..
|
||||
|
||||
tl;dr - the recent commit should be transparent to all developers
|
||||
on other platforms. On OS X, the CMake setup add the option OPTION_APPLE_SDL=ON
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -775,10 +775,11 @@ int menuwindow::handle_part1(int e) {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case FL_MOVE:
|
||||
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:
|
||||
|
|
|
@ -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)
|
||||
|
||||
//
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue