Opening previously open windows on non-boot partitions obviously only worked if the

automounter already mounted these partitions. Since this happens asynchronously,
it sometimes worked and sometimes not. The very simply and non-hacky fix for this
problem is to send a message from the automounter to the application looper to
have it open the previous windows after the initial mount scan is done.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26549 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2008-07-21 16:01:51 +00:00
parent 499c81036f
commit a86d99e0da
3 changed files with 9 additions and 4 deletions

View File

@ -459,6 +459,7 @@ AutoMounter::MessageReceived(BMessage *message)
switch (message->what) {
case kMsgInitialScan:
_MountVolumes(fNormalMode, fRemovableMode, true);
be_app->PostMessage(kOpenPreviouslyOpenWindows);
break;
case kMountVolume:
@ -1486,6 +1487,8 @@ AutoMounter::InitialRescan()
}
sInitialRescan = false;
be_app->PostMessage(kOpenPreviouslyOpenWindows);
}

View File

@ -53,6 +53,7 @@ const uint32 kCloseWindowAndChildren = 'Tcwc';
// end external app messages
const uint32 kOpenPreviouslyOpenWindows = 'Topw';
const uint32 kRestoreState = 'Trst';
const uint32 kCutMoreSelectionToClipboard = 'Tmvm';

View File

@ -356,6 +356,11 @@ TTracker::MessageReceived(BMessage *message)
return;
switch (message->what) {
case kOpenPreviouslyOpenWindows:
if (!BootedInSafeMode())
_OpenPreviouslyOpenedWindows();
break;
case kGetInfo:
OpenInfoWindows(message);
break;
@ -1327,10 +1332,6 @@ TTracker::ReadyToRun()
}
} else
delete model;
// open previously open windows
if (!BootedInSafeMode())
_OpenPreviouslyOpenedWindows();
}
// kick off building the mime type list for find panels, etc.