summaryrefslogtreecommitdiff
path: root/library/qpeapplication.h
Side-by-side diff
Diffstat (limited to 'library/qpeapplication.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
index 167fe69..cff3e43 100644
--- a/library/qpeapplication.h
+++ b/library/qpeapplication.h
@@ -210,3 +210,6 @@ inline void QPEApplication::setCurrentRotation( int r )
Transformation e = DegToTrans( r );
- ::setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 );
+ QCString old = getenv("QWS_DISPLAY") ? getenv( "QWS_DISPLAY" ) : "Transformed";
+ int j = 0;
+ QString driver( old.left( ( ( j = old.find( ':' ) ) >= 0 ) ? j : old.size() ).data() );
+ ::setenv( "QWS_DISPLAY", QString( "%1:Rot%2:0" ).arg( driver ).arg( r ).latin1(), 1 );
qApp->desktop()->qwsDisplay()->setTransformation( e );