@ -180,7 +180,7 @@ TQString KRandrSimpleAPI::applyIccFile(TQString screenName, TQString fileName) {
printf ( " Xcalib pipe error \n \r " ) ;
}
else {
fgets ( xcalib_result , 2048 , pipe_xcalib ) ;
if ( fgets ( xcalib_result , 2048 , pipe_xcalib ) ) {
pclose ( pipe_xcalib ) ;
for ( i = 1 ; i < 2048 ; i + + ) {
if ( xcalib_result [ i ] = = 0 ) {
@ -192,6 +192,10 @@ TQString KRandrSimpleAPI::applyIccFile(TQString screenName, TQString fileName) {
return xcalib_result ;
}
}
else {
printf ( " Xcalib pipe error \n \r " ) ;
}
}
}
}
else {
@ -245,7 +249,7 @@ TQString KRandrSimpleAPI::applyIccFile(TQString screenName, TQString fileName) {
printf ( " Xcalib pipe error \n \r " ) ;
}
else {
fgets ( xcalib_result , 2048 , pipe_xcalib ) ;
if ( fgets ( xcalib_result , 2048 , pipe_xcalib ) ) {
pclose ( pipe_xcalib ) ;
for ( i = 1 ; i < 2048 ; i + + ) {
if ( xcalib_result [ i ] = = 0 ) {
@ -257,6 +261,10 @@ TQString KRandrSimpleAPI::applyIccFile(TQString screenName, TQString fileName) {
return xcalib_result ;
}
}
else {
printf ( " Xcalib pipe error \n \r " ) ;
}
}
}
}
return " " ;
@ -396,7 +404,7 @@ TQString KRandrSimpleAPI::applySystemWideIccConfiguration(TQString kde_confdir)
printf ( " Xcalib pipe error \n \r " ) ;
}
else {
fgets ( xcalib_result , 2048 , pipe_xcalib ) ;
if ( fgets ( xcalib_result , 2048 , pipe_xcalib ) ) {
pclose ( pipe_xcalib ) ;
for ( i = 1 ; i < 2048 ; i + + ) {
if ( xcalib_result [ i ] = = 0 ) {
@ -408,6 +416,10 @@ TQString KRandrSimpleAPI::applySystemWideIccConfiguration(TQString kde_confdir)
return xcalib_result ;
}
}
else {
printf ( " Xcalib pipe error \n \r " ) ;
}
}
return " " ;
}
@ -1109,6 +1121,8 @@ TQPtrList<SingleScreenData> KRandrSimpleAPI::readCurrentDisplayConfiguration() {
screendata - > rotations . append ( i18n ( " Rotate 90 degrees " ) ) ;
screendata - > rotations . append ( i18n ( " Rotate 180 degrees " ) ) ;
screendata - > rotations . append ( i18n ( " Rotate 270 degrees " ) ) ;
screendata - > supports_transformations = ( cur_screen - > rotations ( ) ! = RandRScreen : : Rotate0 ) ;
if ( screendata - > supports_transformations ) {
screendata - > current_orientation_mask = cur_screen - > proposedRotation ( ) ;
switch ( screendata - > current_orientation_mask & RandRScreen : : RotateMask ) {
case RandRScreen : : Rotate0 :
@ -1126,11 +1140,17 @@ TQPtrList<SingleScreenData> KRandrSimpleAPI::readCurrentDisplayConfiguration() {
default :
// Shouldn't hit this one
Q_ASSERT ( screendata - > current_orientation_mask & RandRScreen : : RotateMask ) ;
screendata - > current_rotation_index = 0 ;
break ;
}
screendata - > has_x_flip = ( screendata - > current_orientation_mask & RandRScreen : : ReflectX ) ;
screendata - > has_y_flip = ( screendata - > current_orientation_mask & RandRScreen : : ReflectY ) ;
screendata - > supports_transformations = ( cur_screen - > rotations ( ) ! = RandRScreen : : Rotate0 ) ;
}
else {
screendata - > has_x_flip = false ;
screendata - > has_y_flip = false ;
screendata - > current_rotation_index = 0 ;
}
// Determine if this display is primary and/or extended
RROutput primaryoutput = XRRGetOutputPrimary ( tqt_xdisplay ( ) , DefaultRootWindow ( tqt_xdisplay ( ) ) ) ;
@ -1279,7 +1299,7 @@ TQString KRandrSimpleAPI::clearIccConfiguration() {
printf ( " Xcalib pipe error \n \r " ) ;
}
else {
fgets ( xcalib_result , 2048 , pipe_xcalib ) ;
if ( fgets ( xcalib_result , 2048 , pipe_xcalib ) ) {
pclose ( pipe_xcalib ) ;
for ( i = 1 ; i < 2048 ; i + + ) {
if ( xcalib_result [ i ] = = 0 ) {
@ -1291,6 +1311,10 @@ TQString KRandrSimpleAPI::clearIccConfiguration() {
return xcalib_result ;
}
}
else {
printf ( " Xcalib pipe error \n \r " ) ;
}
}
return " " ;
}