summaryrefslogtreecommitdiffstats
path: root/tqtinterface/qt4/src/kernel/tqpaintdevice_x11.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-07-23 17:13:36 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-07-23 17:13:36 -0500
commitd3f7a9d6f1b8f6e24fb49aaa8caeaa7623ae48b5 (patch)
treebaeeba639393f46abab749f4700a250091c3cc16 /tqtinterface/qt4/src/kernel/tqpaintdevice_x11.cpp
parentd7be1694839bacae31e500ea9e36b3c13257ce28 (diff)
downloadexperimental-d3f7a9d6f1b8f6e24fb49aaa8caeaa7623ae48b5.tar.gz
experimental-d3f7a9d6f1b8f6e24fb49aaa8caeaa7623ae48b5.zip
Apply all Qt3.3.8d patches
NOTE: This will *likely* break compilation of TQt4 Please wait a few days for fixes to be committed as needed!
Diffstat (limited to 'tqtinterface/qt4/src/kernel/tqpaintdevice_x11.cpp')
-rw-r--r--tqtinterface/qt4/src/kernel/tqpaintdevice_x11.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/tqtinterface/qt4/src/kernel/tqpaintdevice_x11.cpp b/tqtinterface/qt4/src/kernel/tqpaintdevice_x11.cpp
index 2432607..fd4cc0b 100644
--- a/tqtinterface/qt4/src/kernel/tqpaintdevice_x11.cpp
+++ b/tqtinterface/qt4/src/kernel/tqpaintdevice_x11.cpp
@@ -1105,11 +1105,16 @@ static void create_dpis()
TQ_CHECK_PTR( dpisX );
TQ_CHECK_PTR( dpisY );
for ( i = 0; i < screens; i++ ) {
- dpisX[ i ] = (DisplayWidth(dpy,i) * 254 + DisplayWidthMM(dpy,i)*5)
-
- / (DisplayWidthMM(dpy,i)*10);
- dpisY[ i ] = (DisplayHeight(dpy,i) * 254 + DisplayHeightMM(dpy,i)*5)
- / (DisplayHeightMM(dpy,i)*10);
+ if (DisplayWidthMM(dpy,i) < 1)
+ dpisX[ i ] = 75; // default the dpi to 75.
+ else
+ dpisX[ i ] = (DisplayWidth(dpy,i) * 254 + DisplayWidthMM(dpy,i)*5)
+ / (DisplayWidthMM(dpy,i)*10);
+ if (DisplayHeightMM(dpy,i) < 1)
+ dpisY[ i ] = 75; // default the dpi to 75.
+ else
+ dpisY[ i ] = (DisplayHeight(dpy,i) * 254 + DisplayHeightMM(dpy,i)*5)
+ / (DisplayHeightMM(dpy,i)*10);
}
}