CVS commit by lunakl: Better error detection from KWin::WindowInfo. I removed the check for desktop == 0, as now it really really shouldn't happen. I left an assert() there though, just in case I'm wrong. CCMAIL: neundorf@kde.org M +8 -15 kpager.cpp 1.58 --- kdebase/kpager/kpager.cpp #1.57:1.58 @@ -59,4 +59,5 @@ #include #include +#include KPagerMainWindow::KPagerMainWindow(QWidget *parent, const char *name) @@ -380,20 +381,12 @@ KWin::WindowInfo* KPager::info( WId win if (!info ) { - // check if window is valid or not - XWindowAttributes attr; - bool bIsValid = XGetWindowAttributes(qt_xdisplay(), win, &attr); - - if (bIsValid) - { info = new KWin::WindowInfo( KWin::windowInfo( win ) ); - if (info->desktop() ==0) + if( !info->valid()) { - kdDebug()<<"KPager::info("<desktop() !=0 ); m_windows.insert( (long) win, info ); - } } return info;