diff options
| author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-07-23 17:13:36 -0500 |
|---|---|---|
| committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-07-23 17:13:36 -0500 |
| commit | d3f7a9d6f1b8f6e24fb49aaa8caeaa7623ae48b5 (patch) | |
| tree | baeeba639393f46abab749f4700a250091c3cc16 /tqtinterface/qt4/src/dialogs/tqdialog.cpp | |
| parent | d7be1694839bacae31e500ea9e36b3c13257ce28 (diff) | |
| download | experimental-d3f7a9d6f1b8f6e24fb49aaa8caeaa7623ae48b5.tar.gz experimental-d3f7a9d6f1b8f6e24fb49aaa8caeaa7623ae48b5.zip | |
Apply all Qt3.3.8d patches
NOTE: This will *likely* break compilation of TQt4
Please wait a few days for fixes to be committed as needed!
Diffstat (limited to 'tqtinterface/qt4/src/dialogs/tqdialog.cpp')
| -rw-r--r-- | tqtinterface/qt4/src/dialogs/tqdialog.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/tqtinterface/qt4/src/dialogs/tqdialog.cpp b/tqtinterface/qt4/src/dialogs/tqdialog.cpp index 43db3ca..58093f1 100644 --- a/tqtinterface/qt4/src/dialogs/tqdialog.cpp +++ b/tqtinterface/qt4/src/dialogs/tqdialog.cpp @@ -681,6 +681,11 @@ bool TQDialog::event( TQEvent *e ) #if defined(TQ_WS_X11) extern "C" { int XSetTransientForHint( Display *, unsigned long, unsigned long ); } +#include <private/tqt_x11_p.h> +#undef FocusIn +// defined in qapplication_x11.cpp +extern Atom qt_net_wm_full_placement; +extern bool qt_net_supports(Atom atom); #endif // TQ_WS_X11 /*! @@ -702,10 +707,12 @@ void TQDialog::show() if ( !did_resize ) adjustSize(); - if ( has_relpos && !did_move ) { - adjustPositionInternal( parentWidget(), TRUE ); - } else if ( !did_move ) { - adjustPositionInternal( parentWidget() ); + if( !qt_net_supports( qt_net_wm_full_placement )) { + if ( has_relpos && !did_move ) { + adjustPositionInternal( parentWidget(), TRUE ); + } else if ( !did_move ) { + adjustPositionInternal( parentWidget() ); + } } if (windowState() != state) @@ -716,7 +723,7 @@ void TQDialog::show() && tqApp->mainWidget() && tqApp->mainWidget()->isVisible() && !tqApp->mainWidget()->isMinimized()) { // make sure the transient for hint is set properly for modal dialogs - XSetTransientForHint( x11Display(), winId(), tqApp->mainWidget()->winId() ); + x11SetWindowTransient( tqApp->mainWidget()); } #endif // TQ_WS_X11 @@ -811,7 +818,9 @@ void TQDialog::adjustPositionInternal( TQWidget*w, bool useRelPos) w = w->tqtopLevelWidget(); TQRect desk; if ( w ) { - scrn = TQApplication::desktop()->screenNumber( w ); + // Use mapToGlobal rather than tqgeometry() in case w might + // be embedded in another application + scrn = TQApplication::desktop()->screenNumber( w->mapToGlobal( TQPoint(0,0) ) ); } else if ( TQApplication::desktop()->isVirtualDesktop() ) { scrn = TQApplication::desktop()->screenNumber( TQCursor::pos() ); } else { |
