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:
@@ -459,6 +459,7 @@ AutoMounter::MessageReceived(BMessage *message)
|
|||||||
switch (message->what) {
|
switch (message->what) {
|
||||||
case kMsgInitialScan:
|
case kMsgInitialScan:
|
||||||
_MountVolumes(fNormalMode, fRemovableMode, true);
|
_MountVolumes(fNormalMode, fRemovableMode, true);
|
||||||
|
be_app->PostMessage(kOpenPreviouslyOpenWindows);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kMountVolume:
|
case kMountVolume:
|
||||||
@@ -1486,6 +1487,8 @@ AutoMounter::InitialRescan()
|
|||||||
}
|
}
|
||||||
|
|
||||||
sInitialRescan = false;
|
sInitialRescan = false;
|
||||||
|
|
||||||
|
be_app->PostMessage(kOpenPreviouslyOpenWindows);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ const uint32 kCloseWindowAndChildren = 'Tcwc';
|
|||||||
|
|
||||||
// end external app messages
|
// end external app messages
|
||||||
|
|
||||||
|
const uint32 kOpenPreviouslyOpenWindows = 'Topw';
|
||||||
const uint32 kRestoreState = 'Trst';
|
const uint32 kRestoreState = 'Trst';
|
||||||
|
|
||||||
const uint32 kCutMoreSelectionToClipboard = 'Tmvm';
|
const uint32 kCutMoreSelectionToClipboard = 'Tmvm';
|
||||||
|
|||||||
@@ -356,6 +356,11 @@ TTracker::MessageReceived(BMessage *message)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
switch (message->what) {
|
switch (message->what) {
|
||||||
|
case kOpenPreviouslyOpenWindows:
|
||||||
|
if (!BootedInSafeMode())
|
||||||
|
_OpenPreviouslyOpenedWindows();
|
||||||
|
break;
|
||||||
|
|
||||||
case kGetInfo:
|
case kGetInfo:
|
||||||
OpenInfoWindows(message);
|
OpenInfoWindows(message);
|
||||||
break;
|
break;
|
||||||
@@ -1327,10 +1332,6 @@ TTracker::ReadyToRun()
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
delete model;
|
delete model;
|
||||||
|
|
||||||
// open previously open windows
|
|
||||||
if (!BootedInSafeMode())
|
|
||||||
_OpenPreviouslyOpenedWindows();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// kick off building the mime type list for find panels, etc.
|
// kick off building the mime type list for find panels, etc.
|
||||||
|
|||||||
Reference in New Issue
Block a user