[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kpager
From:       Alexander Neundorf <neundorf () kde ! org>
Date:       2003-06-23 16:15:10
[Download RAW message or body]

CVS commit by neundorf: 

Hopefully fix the bug which caused that sometimes kpager wasn't able to
display newly mapped windows. The reason for this was that in KPager::info()
KWin::info(win); is called, which itself calls the NetWinInfo ctor, which
calls NetWinInfo::update(). This one sets under certain conditions
p->desktop=0; and only sets it to the real value if XGetWindowProperty()
succeeds. From time to time it seems this doesn't succeed. In these cases
KPager::info() returned a KWin::Info* struct which contained
info->desktop==0; Then it wasn't able to display this window correctly,
since kpager didn't update this KWin::Info struct properly. With this patch
kpager doesn't keep the KWin::Info* struct with an invalid (?) desktop
number, so it will reget it until the desktop!=0.

It seems to help here, it didn't happen again since this change, but it also
happened not *that* often before...

Alex


  M +9 -2      kpager.cpp   1.53


--- kdebase/kpager/kpager.cpp  #1.52:1.53
@@ -384,4 +384,11 @@ KWin::WindowInfo* KPager::info( WId win 
         {
             info = new KWin::WindowInfo( KWin::windowInfo( win ) );
+            if (info->desktop==0)
+            {
+               kdDebug()<<"KPager::info("<<win<<") KWin::Info() returned desktop==0 !"<<endl;
+               delete info;
+               info=0;
+            }
+            else
             m_windows.insert( (long) win, info );
         }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic