summaryrefslogtreecommitdiffstats
path: root/experimental/tqtinterface/qt4/src/dialogs
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-07-23 17:13:36 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-07-23 17:13:36 -0500
commit2f4ee8ef5d1fe9a8daa9d342d71b021e6a25ca01 (patch)
treec7c69fbe21ff704ebb8cf74b25627111ed30efdd /experimental/tqtinterface/qt4/src/dialogs
parent5584c3586a63c9e18513e8df2d6823ec6b33dfc7 (diff)
downloadtde-2f4ee8ef5d1fe9a8daa9d342d71b021e6a25ca01.tar.gz
tde-2f4ee8ef5d1fe9a8daa9d342d71b021e6a25ca01.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 'experimental/tqtinterface/qt4/src/dialogs')
-rw-r--r--experimental/tqtinterface/qt4/src/dialogs/tqdialog.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/experimental/tqtinterface/qt4/src/dialogs/tqdialog.cpp b/experimental/tqtinterface/qt4/src/dialogs/tqdialog.cpp
index 43db3cad4..58093f1c6 100644
--- a/experimental/tqtinterface/qt4/src/dialogs/tqdialog.cpp
+++ b/experimental/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 {