diff options
Diffstat (limited to 'fpicker/source/unx/kde')
-rw-r--r-- | fpicker/source/unx/kde/kdefpmain.cxx | 15 | ||||
-rw-r--r-- | fpicker/source/unx/kde/kdemodalityfilter.cxx | 2 |
2 files changed, 14 insertions, 3 deletions
diff --git a/fpicker/source/unx/kde/kdefpmain.cxx b/fpicker/source/unx/kde/kdefpmain.cxx index 30c832bc613b..201c389ddf93 100644 --- a/fpicker/source/unx/kde/kdefpmain.cxx +++ b/fpicker/source/unx/kde/kdefpmain.cxx @@ -40,6 +40,12 @@ // Main ////////////////////////////////////////////////////////////////////////// +static KCmdLineOptions sOptions[] = +{ + { "winid <argument>", I18N_NOOP("Window ID to which is the fpicker modal"), "0" }, + KCmdLineLastOption +}; + int main( int argc, char* argv[] ) { // we fake the name of the application to have "OpenOffice.org" in the @@ -54,12 +60,19 @@ int main( int argc, char* argv[] ) ::std::cerr << "kdefilepicker, an implementation of KDE file dialog for OOo." << ::std::endl << "Type 'exit' and press Enter to finish." << ::std::endl; + KCmdLineArgs::addCmdLineOptions( sOptions ); KCmdLineArgs::init( argc, argv, &qAboutData ); KLocale::setMainCatalogue( "kdialog" ); KApplication kApplication; - //ModalityFilter qFilter( /*winid*/ 79691780 ); + + // Setup the modality + KCmdLineArgs *pArgs = KCmdLineArgs::parsedArgs(); + long nWinId = atol( pArgs->getOption( "winid" ) ); + pArgs->clear(); + + ModalityFilter qModalityFilter( nWinId ); FileDialog aFileDialog( NULL, QString(), NULL, "kdefiledialog" ); diff --git a/fpicker/source/unx/kde/kdemodalityfilter.cxx b/fpicker/source/unx/kde/kdemodalityfilter.cxx index c214bca001e8..cf39da77eb85 100644 --- a/fpicker/source/unx/kde/kdemodalityfilter.cxx +++ b/fpicker/source/unx/kde/kdemodalityfilter.cxx @@ -57,8 +57,6 @@ bool ModalityFilter::eventFilter( QObject *pObject, QEvent *pEvent ) if ( pDlg != NULL && m_nWinId != 0 ) { XSetTransientForHint( qt_xdisplay(), pDlg->winId(), m_nWinId ); - NETWinInfo aInfo( qt_xdisplay(), pDlg->winId(), qt_xrootwin(), NET::WMState ); - aInfo.setState( NET::Modal, NET::Modal ); m_nWinId = 0; } } |