DPI fixes for MSWindows GDI
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8205 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
7dc05cb20e
commit
308c6bc307
@ -1068,8 +1068,12 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||
}
|
||||
}
|
||||
} else if ((lParam & (1<<31))==0){
|
||||
buffer[0] = 0;
|
||||
Fl::e_length = 0;
|
||||
//buffer[0] = 0;
|
||||
//Fl::e_length = 0;
|
||||
xchar u = (xchar) wParam;
|
||||
// Fl::e_length = fl_unicode2utf(&u, 1, buffer);
|
||||
Fl::e_length = fl_utf8fromwc(buffer, 1024, &u, 1);
|
||||
buffer[Fl::e_length] = 0;
|
||||
}
|
||||
Fl::e_text = buffer;
|
||||
if (lParam & (1<<31)) { // key up events.
|
||||
@ -1078,7 +1082,11 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||
}
|
||||
// for (int i = lParam&0xff; i--;)
|
||||
while (window->parent()) window = window->window();
|
||||
if (Fl::handle(FL_KEYBOARD,window)) return 0;
|
||||
if (Fl::handle(FL_KEYBOARD,window)) {
|
||||
if (uMsg==WM_DEADCHAR || uMsg==WM_SYSDEADCHAR)
|
||||
Fl::compose_state = 1;
|
||||
return 0;
|
||||
}
|
||||
break;}
|
||||
|
||||
case WM_MOUSEWHEEL: {
|
||||
|
@ -76,7 +76,7 @@ static BOOL CALLBACK screen_cb(HMONITOR mon, HDC, LPRECT r, LPARAM) {
|
||||
dpi[num_screens][0] = (float)GetDeviceCaps(screen, LOGPIXELSX);
|
||||
dpi[num_screens][1] = (float)GetDeviceCaps(screen, LOGPIXELSY);
|
||||
}
|
||||
ReleaseDC();
|
||||
ReleaseDC(0L, screen);
|
||||
}
|
||||
|
||||
num_screens ++;
|
||||
@ -97,7 +97,7 @@ static void screen_init() {
|
||||
// We do have EnumDisplayMonitors, so lets find out how many monitors...
|
||||
num_screens = GetSystemMetrics(SM_CMONITORS);
|
||||
|
||||
if (num_screens > 1) {
|
||||
// if (num_screens > 1) {
|
||||
// If there is more than 1 monitor, enumerate them...
|
||||
fl_gmi = (fl_gmi_func)GetProcAddress(hMod, "GetMonitorInfoA");
|
||||
|
||||
@ -109,7 +109,7 @@ static void screen_init() {
|
||||
fl_edm(0, 0, screen_cb, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user