@ -1804,9 +1804,7 @@ bool KApplication::isCompositionManagerAvailable() {
// Now that we did all that by way of introduction...read the file!
// Now that we did all that by way of introduction...read the file!
FILE * pFile ;
FILE * pFile ;
char buffer [ 255 ] ;
pFile = fopen ( filename , " r " ) ;
pFile = fopen ( filename , " r " ) ;
int kompmgrpid = 0 ;
if ( pFile ) {
if ( pFile ) {
have_manager = true ;
have_manager = true ;
fclose ( pFile ) ;
fclose ( pFile ) ;
@ -1840,18 +1838,23 @@ bool KApplication::detectCompositionManagerAvailable(bool force_available, bool
compositing_manager_available = false ;
compositing_manager_available = false ;
}
}
else {
else {
Window root_window = XDefaultRootWindow ( dpy ) ;
if ( available ) { // FIXME This variable does double duty to avoid breaking the ABI for R14.0. In reality it should be called perform_deep_check
XCompositeRedirectSubwindows ( dpy , root_window , CompositeRedirectManual ) ;
Window root_window = XDefaultRootWindow ( dpy ) ;
XSync ( dpy , false ) ;
XCompositeRedirectSubwindows ( dpy , root_window , CompositeRedirectManual ) ;
if ( x11_composite_error_generated = = true ) {
XSync ( dpy , false ) ;
compositing_manager_available = true ;
if ( x11_composite_error_generated = = true ) {
compositing_manager_available = true ;
}
else {
XCompositeUnredirectSubwindows ( dpy , root_window , CompositeRedirectManual ) ;
compositing_manager_available = false ;
}
XSetErrorHandler ( NULL ) ;
XCloseDisplay ( dpy ) ;
}
}
else {
else {
XCompositeUnredirectSubwindows ( dpy , root_window , CompositeRedirectManual ) ;
compositing_manager_available = true ;
compositing_manager_available = false ;
}
}
XSetErrorHandler ( NULL ) ;
XCloseDisplay ( dpy ) ;
}
}
}
}
@ -1913,7 +1916,7 @@ Qt::HANDLE KApplication::getX11RGBAVisual(Display *dpy) {
return argb_x11_visual ;
return argb_x11_visual ;
}
}
else {
else {
return NULL ;
return ( Qt : : HANDLE ) NULL ;
}
}
}
}
@ -1923,7 +1926,7 @@ Qt::HANDLE KApplication::getX11RGBAColormap(Display *dpy) {
return argb_x11_colormap ;
return argb_x11_colormap ;
}
}
else {
else {
return NULL ;
return ( Qt : : HANDLE ) NULL ;
}
}
}
}
@ -1997,8 +2000,20 @@ bool KApplication::detectCompositionManagerAvailable(bool force_available) {
strcat ( filename , home ) ;
strcat ( filename , home ) ;
strcat ( filename , configfile ) ;
strcat ( filename , configfile ) ;
/* now that we did all that by way of introduction...remove the file! */
/* now that we did all that by way of introduction...create or remove the file! */
unlink ( filename ) ;
if ( force_available ) {
FILE * pFile ;
char buffer [ 255 ] ;
sprintf ( buffer , " available " ) ;
pFile = fopen ( filename , " w " ) ;
if ( pFile ) {
fwrite ( buffer , 1 , strlen ( buffer ) , pFile ) ;
fclose ( pFile ) ;
}
}
else {
unlink ( filename ) ;
}
free ( filename ) ;
free ( filename ) ;
filename = NULL ;
filename = NULL ;
@ -2886,12 +2901,15 @@ void KApplication::invokeMailer(const TQString &_to, const TQString &_cc, const
TQString error ;
TQString error ;
// TODO this should check if cmd has a .desktop file, and use data from it, together
// TODO this should check if cmd has a .desktop file, and use data from it, together
// with sending more ASN data
// with sending more ASN data
if ( tdeinitExec ( cmd , cmdTokens , & error , NULL , startup_id ) )
if ( tdeinitExec ( cmd , cmdTokens , & error , NULL , startup_id ) ) {
if ( Tty ! = kapp - > type ( ) )
if ( Tty ! = kapp - > type ( ) ) {
TQMessageBox : : critical ( kapp - > mainWidget ( ) , i18n ( " Could not Launch Mail Client " ) ,
TQMessageBox : : critical ( kapp - > mainWidget ( ) , i18n ( " Could not Launch Mail Client " ) ,
i18n ( " Could not launch the mail client: \n \n %1 " ) . arg ( error ) , i18n ( " &OK " ) ) ;
i18n ( " Could not launch the mail client: \n \n %1 " ) . arg ( error ) , i18n ( " &OK " ) ) ;
else
}
else {
kdWarning ( ) < < " Could not launch mail client: \n " < < error < < endl ;
kdWarning ( ) < < " Could not launch mail client: \n " < < error < < endl ;
}
}
}
}
# endif
# endif
@ -3597,7 +3615,9 @@ void KApplication::sigpipeHandler(int)
# ifndef NDEBUG
# ifndef NDEBUG
char msg [ 1000 ] ;
char msg [ 1000 ] ;
sprintf ( msg , " *** SIGPIPE *** (ignored, pid = %ld) \n " , ( long ) getpid ( ) ) ;
sprintf ( msg , " *** SIGPIPE *** (ignored, pid = %ld) \n " , ( long ) getpid ( ) ) ;
write ( 2 , msg , strlen ( msg ) ) ;
if ( write ( 2 , msg , strlen ( msg ) ) < 0 ) {
// ERROR
}
# endif
# endif
// Do nothing.
// Do nothing.