From 53f924947144ddbb3e15d3bd1ddc877073c7ec7f Mon Sep 17 00:00:00 2001 From: mickeyl Date: Sun, 26 Jun 2005 12:18:37 +0000 Subject: get the default gfx driver from QWS_DISPLAY instead of hardcoding it to 'Transformed' when launching rotated apps. Patch courtesy Manuel Teira --- (limited to 'library/qpeapplication.h') diff --git a/library/qpeapplication.h b/library/qpeapplication.h index 167fe69..cff3e43 100644 --- a/library/qpeapplication.h +++ b/library/qpeapplication.h @@ -208,7 +208,10 @@ inline void QPEApplication::setCurrentRotation( int r ) // for compatibility with the SharpROM use fallback to setDefaultTransformation() #if QT_VERSION > 233 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 ); #else setDefaultRotation( r ); -- cgit v0.9.0.2