Bug 135373

Summary: kpdf is not restored to the correct virtual desktop when resuming the session
Product: [Unmaintained] kpdf Reporter: gambas <g4mba5>
Component: generalAssignee: Albert Astals Cid <aacid>
Status: RESOLVED FIXED    
Severity: normal CC: aacid, iyosifov, l.lunak
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Mandriva RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description gambas 2006-10-09 23:09:02 UTC
Version:            (using KDE KDE 3.5.4)
Installed from:    Mandriva RPMs

The virtual desktop where it is restored seems to be random.
The PDF file is local.
Comment 1 Bram Schoenmakers 2006-10-10 12:47:18 UTC
Do you only see this happening with KPDF or with other applications as well. Because I suspect the KDE Session Manager is responsible for this.
Comment 2 gambas 2006-10-10 18:05:53 UTC
I just have noticed that for KMail. But it has happened only once at the moment.

Note that I upgraded from KDE 3.4 to KDE 3.5 without changing my /home directory.
Comment 3 Albert Astals Cid 2006-10-10 19:22:41 UTC
Reassigning to lubos
Comment 4 Lubos Lunak 2006-10-10 20:11:35 UTC
Can you confirm the bugreport with any other version that 3.5.4 (3.5.5 will be released very soon)?

Comment 5 gambas 2006-10-10 20:31:16 UTC
The last KDE version I used was the one delivered with Mandriva 2006, and I think it was KDE 3.4.3. 

With KDE 3.4.3, I had this problem with Kate, and so I compelled Kate to appear always on the same virtual desktop. It was not a problem, as this is an application that I launch only once. But this was the only application that had this problem.

I'm going to remove the virtual desktop forcing for Kate to see how it behaves now. I will post the result a.s.a.p.
Comment 6 gambas 2006-10-10 20:39:11 UTC
I made a little test with a virgin user:

This user has 4 virtual desktop, with a KPDF on the desktop 2 and a Kate on the desktop 3, all maximized.

When I log in again, the Kate window is restored on the good desktop, but the KPDF one is restored on the same desktop (3). Moreover, its window is a little one, not maximized.
Comment 7 Lubos Lunak 2006-11-21 17:48:57 UTC
KPDF's widget name is messed up. Just a quick look at the two ctors in kpdf/shell/shell.cpp shows they don't do the same.
Comment 8 Albert Astals Cid 2006-11-21 20:06:00 UTC
SVN commit 606774 by aacid:

Fix ¿finally? kpdf wrong restoring on session restore, thanks a lot Lubos for finding the problem.
BUGS: 135373


 M  +1 -0      shell.cpp  


--- branches/KDE/3.5/kdegraphics/kpdf/shell/shell.cpp #606773:606774
@@ -47,6 +47,7 @@
 }
 
 Shell::Shell(const KURL &url)
+ : KParts::MainWindow(0, "KPDF::Shell"), m_menuBarWasShown(true), m_toolBarWasShown(true)
 {
   m_openUrl = url;
   init();
Comment 9 Ivan Yosifov 2006-12-26 12:06:42 UTC
I am running KDE 3.5.5 on Gentoo. I have applied the patch from comment #8 and kpdf widnows are now restored on the correct desktop. But, as mentioned in comment #6, they are restored as little windows and not as maximized ones ( they were maximized when I logged out ). Is there some other patch I need to apply to make kpdf restore widnow sizes properly or should I open a new bug ?