Skip to content
Browse files

fix

git-svn-id: file:///home/justin/tmp/tmp/svn/neatstuff/trunk@35 972056c0-ec0e-4c9f-ad5b-9eb1d9b6bad5
  • Loading branch information...
1 parent 66a01a5 commit e90b151e5d9cc6ed95686d966ca6823d539288d2 @mblsha mblsha committed Apr 13, 2004
Showing with 4 additions and 6 deletions.
  1. +4 −6 advwidget/advwidget.cpp
View
10 advwidget/advwidget.cpp
@@ -33,10 +33,7 @@ AdvancedWidget::Private::Private(AdvancedWidget *_parent)
void AdvancedWidget::Private::posChanging(int *x, int *y, int width, int height)
{
// maybe cache this value?
- QRect desktop = qApp->desktop()->availableGeometry(parent);
-
- //QValueList<QRect> windows;
- //windows.append( desktop );
+ QDesktopWidget *desktop = qApp->desktop();
QWidgetList *list = QApplication::topLevelWidgets();
list->append( qApp->desktop() );
@@ -48,10 +45,11 @@ void AdvancedWidget::Private::posChanging(int *x, int *y, int width, int height)
if ( w->isDesktop() )
rect = ((QDesktopWidget *)w)->availableGeometry(parent);
else {
- if ( qApp->desktop()->screenNumber(parent) != qApp->desktop()->screenNumber(w) )
+ if ( w == parent ||
+ desktop->screenNumber(parent) != desktop->screenNumber(w) )
continue;
- rect = w->rect();
+ rect = w->geometry();
}
if ( *x <= rect.left() + stickAt &&

0 comments on commit e90b151

Please sign in to comment.
Something went wrong with that request. Please try again.