DPI fixed for X11

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8207 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2011-01-07 01:37:47 +00:00
parent ecc423c2f1
commit af1d2731d0

View File

@ -146,15 +146,14 @@ static void screen_init() {
} }
} }
#else #else
static XRectangle screen;
static float dpi[2]; static float dpi[2];
static void screen_init() { static void screen_init() {
num_screens = 1; num_screens = 1;
if (!fl_display) fl_open_display(); if (!fl_display) fl_open_display();
int mm = DisplayWidthMM(fl_display, fl_screen); int mm = DisplayWidthMM(fl_display, fl_screen);
dpi[0] = mm ? monitor.w()*25.4f/mm : 0.0f; dpi[0] = mm ? Fl::w()*25.4f/mm : 0.0f;
mm = DisplayHeightMM(fl_display, fl_screen); mm = DisplayHeightMM(fl_display, fl_screen);
dpi[1] = mm ? monitor.h()*25.4f/mm : dpi[0]; dpi[1] = mm ? Fl::h()*25.4f/mm : dpi[0];
} }
#endif // WIN32 #endif // WIN32