* Introduced an initial application workspace - should be retrieved differently,
though (ideally when launched). * B_MODAL_APP_WINDOW_FEEL windows are now visible on the initial app workspace in case it has no other window visible. This fixes the missing BAlerts in the debug_server or just the "alert" command. Thanks to Stephan for pointing this out. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15811 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
574af5597c
commit
843bc3cd0d
@ -126,6 +126,9 @@ ServerApp::ServerApp(Desktop* desktop, port_id clientReplyPort,
|
|||||||
fAppCursor->SetOwningTeam(fClientTeam);
|
fAppCursor->SetOwningTeam(fClientTeam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fInitialWorkspace = desktop->CurrentWorkspace();
|
||||||
|
// TODO: this should probably be retrieved when the app is loaded!
|
||||||
|
|
||||||
STRACE(("ServerApp %s:\n", Signature()));
|
STRACE(("ServerApp %s:\n", Signature()));
|
||||||
STRACE(("\tBApp port: %ld\n", fClientReplyPort));
|
STRACE(("\tBApp port: %ld\n", fClientReplyPort));
|
||||||
STRACE(("\tReceiver port: %ld\n", fMessagePort));
|
STRACE(("\tReceiver port: %ld\n", fMessagePort));
|
||||||
|
@ -66,6 +66,7 @@ class ServerApp : public MessageLooper {
|
|||||||
void RemoveWindow(ServerWindow* window);
|
void RemoveWindow(ServerWindow* window);
|
||||||
bool InWorkspace(int32 index) const;
|
bool InWorkspace(int32 index) const;
|
||||||
uint32 Workspaces() const;
|
uint32 Workspaces() const;
|
||||||
|
int32 InitialWorkspace() const { return fInitialWorkspace; }
|
||||||
|
|
||||||
int32 CountBitmaps() const;
|
int32 CountBitmaps() const;
|
||||||
ServerBitmap *FindBitmap(int32 token) const;
|
ServerBitmap *FindBitmap(int32 token) const;
|
||||||
@ -105,6 +106,8 @@ class ServerApp : public MessageLooper {
|
|||||||
BObjectList<ServerWindow> fWindowList;
|
BObjectList<ServerWindow> fWindowList;
|
||||||
BPrivate::BTokenSpace fViewTokens;
|
BPrivate::BTokenSpace fViewTokens;
|
||||||
|
|
||||||
|
int32 fInitialWorkspace;
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// - Are really Bitmaps and Pictures stored per application and not globally ?
|
// - Are really Bitmaps and Pictures stored per application and not globally ?
|
||||||
// - As we reference these stuff by token, what about putting them in hash tables ?
|
// - As we reference these stuff by token, what about putting them in hash tables ?
|
||||||
|
@ -1237,10 +1237,20 @@ WindowLayer::InWorkspace(int32 index) const
|
|||||||
|| fFeel == B_FLOATING_ALL_WINDOW_FEEL)
|
|| fFeel == B_FLOATING_ALL_WINDOW_FEEL)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (fFeel == B_MODAL_APP_WINDOW_FEEL
|
if (fFeel == B_FLOATING_APP_WINDOW_FEEL)
|
||||||
|| fFeel == B_FLOATING_APP_WINDOW_FEEL)
|
|
||||||
return ServerWindow()->App()->InWorkspace(index);
|
return ServerWindow()->App()->InWorkspace(index);
|
||||||
|
|
||||||
|
if (fFeel == B_MODAL_APP_WINDOW_FEEL) {
|
||||||
|
uint32 workspaces = ServerWindow()->App()->Workspaces();
|
||||||
|
if (workspaces == 0) {
|
||||||
|
// The application doesn't seem to have any other windows
|
||||||
|
// open or visible - but we'd like to see modal windows
|
||||||
|
// anyway, at least when they are first opened.
|
||||||
|
return index == ServerWindow()->App()->InitialWorkspace();
|
||||||
|
}
|
||||||
|
return (workspaces & (1UL << index)) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (fFeel == B_MODAL_SUBSET_WINDOW_FEEL
|
if (fFeel == B_MODAL_SUBSET_WINDOW_FEEL
|
||||||
|| fFeel == B_FLOATING_SUBSET_WINDOW_FEEL) {
|
|| fFeel == B_FLOATING_SUBSET_WINDOW_FEEL) {
|
||||||
for (int32 i = 0; i < fSubsets.CountItems(); i++) {
|
for (int32 i = 0; i < fSubsets.CountItems(); i++) {
|
||||||
@ -1422,10 +1432,20 @@ WindowLayer::SubsetWorkspaces() const
|
|||||||
|| fFeel == B_FLOATING_ALL_WINDOW_FEEL)
|
|| fFeel == B_FLOATING_ALL_WINDOW_FEEL)
|
||||||
return B_ALL_WORKSPACES;
|
return B_ALL_WORKSPACES;
|
||||||
|
|
||||||
if (fFeel == B_MODAL_APP_WINDOW_FEEL
|
if (fFeel == B_FLOATING_APP_WINDOW_FEEL)
|
||||||
|| fFeel == B_FLOATING_APP_WINDOW_FEEL)
|
|
||||||
return ServerWindow()->App()->Workspaces();
|
return ServerWindow()->App()->Workspaces();
|
||||||
|
|
||||||
|
if (fFeel == B_MODAL_APP_WINDOW_FEEL) {
|
||||||
|
uint32 workspaces = ServerWindow()->App()->Workspaces();
|
||||||
|
if (workspaces == 0) {
|
||||||
|
// The application doesn't seem to have any other windows
|
||||||
|
// open or visible - but we'd like to see modal windows
|
||||||
|
// anyway, at least when they are first opened.
|
||||||
|
return 1UL << ServerWindow()->App()->InitialWorkspace();
|
||||||
|
}
|
||||||
|
return workspaces;
|
||||||
|
}
|
||||||
|
|
||||||
if (fFeel == B_MODAL_SUBSET_WINDOW_FEEL
|
if (fFeel == B_MODAL_SUBSET_WINDOW_FEEL
|
||||||
|| fFeel == B_FLOATING_SUBSET_WINDOW_FEEL) {
|
|| fFeel == B_FLOATING_SUBSET_WINDOW_FEEL) {
|
||||||
uint32 workspaces = 0;
|
uint32 workspaces = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user