[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 117618] kate: windows are on wrong desktops in restored session
From: gambas <gambas () users ! sourceforge ! net>
Date: 2008-07-21 10:11:23
Message-ID: 20080721101123.5365.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=117618
------- Additional Comments From gambas users sourceforge net 2008-07-21 12:11 \
------- Being really bored by this bug, I finally decided to download the KDE 3.5.9 \
source archives, hold my breath and dive into Kate's source code.
Many hours of Kate and KWin recompilations later, I think I can fix that bug. :-)
The problem seems to come from the KateApp::restoreKate() method, located in the \
kateapp.cpp source file.
At line 161, you see that:
KStartupInfo::setNewStartupId(activeMainWindow(), startupId());
This call seems to make kicker crazy. If you remove it, Kate behaves correctly.
I look in other KDE programs, and apparently none of them use this method during \
session restore. So I think it is safe to remove it.
When Kate reopens its documents, it displays a progress bar. The code is located in \
the KateDocManager::restoreDocumentList() method, in the katedocmanager.cpp source \
file.
With the previous change, you won't see it anymore unless the current virtual desktop \
is the one Kate is located on.
Adding two lines in katedocmanager.cpp fixes the problem:
#include <kencodingfiledialog.h>
#include <kio/job.h>
+ #include <kwin.h>
...
QProgressDialog *pd=new QProgressDialog(
i18n("Reopening files from the last session..."),
QString::null,
count,
0,
"openprog");
+ KWin::setOnDesktop(pd->winId(), KWin::currentDesktop());
pd->setCaption (KateApp::self()->makeStdCaption(i18n("Starting Up")));
IMHO, this progress bar is not really useful when restoring the session at login. But \
removing it in that specific case will need more changes.
Well, it seems that it works for me, and I'm really happy. :-).
Now what should I do to merge these changes?
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic