diff --git a/src/dialogs/qfiledialog.cpp b/src/dialogs/qfiledialog.cpp index b3dc48e7..864139e1 100644 --- a/src/dialogs/qfiledialog.cpp +++ b/src/dialogs/qfiledialog.cpp @@ -491,6 +491,10 @@ static TQString toRootIfNotExists( const TQString &path ) return drives->getFirst()->filePath(); } +static void tqt_do_qfd_cleanup_pixmap() { + qfd_cleanup_pixmap.clear(); +} + static bool isDirectoryMode( int m ) { return m == TQFileDialog::Directory || m == TQFileDialog::DirectoryOnly; @@ -607,6 +611,10 @@ static void makeVariables() { qfd_cleanup_pixmap.add( &goBackIcon ); fifteenTransparentPixels = new TQPixmap( closedFolderIcon->width(), 1 ); qfd_cleanup_pixmap.add( &fifteenTransparentPixels ); + + // On X11 the pixmaps should be cleanup before we disconnect from the server + tqAddPostRoutine(&tqt_do_qfd_cleanup_pixmap); + TQBitmap m( fifteenTransparentPixels->width(), 1 ); m.fill( TQt::color0 ); fifteenTransparentPixels->setMask( m );