summaryrefslogtreecommitdiff
path: root/library
authormickeyl <mickeyl>2005-06-26 12:18:37 (UTC)
committer mickeyl <mickeyl>2005-06-26 12:18:37 (UTC)
commit53f924947144ddbb3e15d3bd1ddc877073c7ec7f (patch) (unidiff)
tree501e5658099d63309fbf56fc7bd046c0a174a024 /library
parentd5a2b0d5ca4daa11894c52f3599dab56205bef4c (diff)
downloadopie-53f924947144ddbb3e15d3bd1ddc877073c7ec7f.zip
opie-53f924947144ddbb3e15d3bd1ddc877073c7ec7f.tar.gz
opie-53f924947144ddbb3e15d3bd1ddc877073c7ec7f.tar.bz2
get the default gfx driver from QWS_DISPLAY instead of hardcoding
it to 'Transformed' when launching rotated apps. Patch courtesy Manuel Teira
Diffstat (limited to 'library') (more/less context) (show whitespace changes)
-rw-r--r--library/applnk.cpp6
-rw-r--r--library/qpeapplication.cpp5
-rw-r--r--library/qpeapplication.h5
3 files changed, 12 insertions, 4 deletions
diff --git a/library/applnk.cpp b/library/applnk.cpp
index c82d3b9..874a1b6 100644
--- a/library/applnk.cpp
+++ b/library/applnk.cpp
@@ -687,5 +687,7 @@ void AppLnk::execute(const QStringList& args) const
687 int rot = QPEApplication::defaultRotation(); 687 int rot = QPEApplication::defaultRotation();
688 int j = 0;
688 rot = (rot+mRotation.toInt())%360; 689 rot = (rot+mRotation.toInt())%360;
689 QCString old = getenv("QWS_DISPLAY"); 690 QCString old = getenv( "QWS_DISPLAY" ) ? getenv( "QWS_DISPLAY" ) : "Transformed";
690 setenv("QWS_DISPLAY", QString("Transformed:Rot%1:0").arg(rot), 1); 691 QString driver( old.left( ( ( j = old.find( ':' ) ) >= 0 ) ? j : old.size() ).data() );
692 setenv( "QWS_DISPLAY", QString( "%1:Rot%2:0" ).arg( driver ).arg( rot ), 1 );
691 invoke(args); 693 invoke(args);
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 0f3e4a4..19e99f2 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -1290,3 +1290,6 @@ void QPEApplication::setDefaultRotation( int r )
1290 deforient = r; 1290 deforient = r;
1291 setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 ); 1291 int j = 0;
1292 QCString old = getenv( "QWS_DISPLAY" ) ? getenv( "QWS_DISPLAY" ) : "Transformed";
1293 QString driver( old.left( ( ( j = old.find( ':' ) ) >= 0 ) ? j : old.size() ).data() );
1294 setenv( "QWS_DISPLAY", QString( "%1:Rot%2:0" ).arg(driver).arg( r ).latin1(), 1 );
1292 Config config("qpe"); 1295 Config config("qpe");
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 )
210 Transformation e = DegToTrans( r ); 210 Transformation e = DegToTrans( r );
211 ::setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 ); 211 QCString old = getenv("QWS_DISPLAY") ? getenv( "QWS_DISPLAY" ) : "Transformed";
212 int j = 0;
213 QString driver( old.left( ( ( j = old.find( ':' ) ) >= 0 ) ? j : old.size() ).data() );
214 ::setenv( "QWS_DISPLAY", QString( "%1:Rot%2:0" ).arg( driver ).arg( r ).latin1(), 1 );
212 qApp->desktop()->qwsDisplay()->setTransformation( e ); 215 qApp->desktop()->qwsDisplay()->setTransformation( e );