mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
Add Window stacking support.
New windows are stacked by default.
This commit is contained in:
@@ -220,6 +220,69 @@ index 32860de..90cadde 100644
|
||||
// asynchronously
|
||||
a->Go(NULL);
|
||||
|
||||
diff --git a/beos/scaffolding.cpp b/beos/scaffolding.cpp
|
||||
index 4003b09..3455baf 100644
|
||||
--- a/beos/scaffolding.cpp
|
||||
+++ b/beos/scaffolding.cpp
|
||||
@@ -38,6 +38,9 @@
|
||||
#include <TextControl.h>
|
||||
#include <View.h>
|
||||
#include <Window.h>
|
||||
+#if defined(__HAIKU__)
|
||||
+#include "WindowStack.h"
|
||||
+#endif
|
||||
#include <fs_attr.h>
|
||||
extern "C" {
|
||||
#include "content/content.h"
|
||||
@@ -571,6 +574,12 @@ NSBrowserWindow::NSBrowserWindow(BRect frame, struct beos_scaffolding *scaf)
|
||||
: BWindow(frame, "NetSurf", B_DOCUMENT_WINDOW, 0),
|
||||
fScaffolding(scaf)
|
||||
{
|
||||
+#if defined(__HAIKU__)
|
||||
+ if (stack == NULL)
|
||||
+ stack = new BWindowStack(this);
|
||||
+ else
|
||||
+ stack->AddWindow(this);
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -621,6 +630,8 @@ NSBrowserWindow::QuitRequested(void)
|
||||
}
|
||||
|
||||
|
||||
+BWindowStack* NSBrowserWindow::stack = NULL;
|
||||
+
|
||||
// #pragma mark - implementation
|
||||
|
||||
int32 nsbeos_replicant_main_thread(void *_arg)
|
||||
@@ -2407,3 +2418,4 @@ void nsbeos_scaffolding_popup_menu(nsbeos_scaffolding *g, BPoint where)
|
||||
{
|
||||
g->popup_menu->Go(where);
|
||||
}
|
||||
+
|
||||
diff --git a/beos/scaffolding.h b/beos/scaffolding.h
|
||||
index ae78391..d456c0c 100644
|
||||
--- a/beos/scaffolding.h
|
||||
+++ b/beos/scaffolding.h
|
||||
@@ -29,6 +29,8 @@ extern "C" {
|
||||
#include "desktop/plotters.h"
|
||||
}
|
||||
|
||||
+class BWindowStack;
|
||||
+
|
||||
typedef struct beos_scaffolding nsbeos_scaffolding;
|
||||
|
||||
class NSBaseView : public BView {
|
||||
@@ -66,6 +68,8 @@ struct beos_scaffolding *Scaffolding() const { return fScaffolding; };
|
||||
|
||||
private:
|
||||
struct beos_scaffolding *fScaffolding;
|
||||
+
|
||||
+ static BWindowStack* stack;
|
||||
};
|
||||
|
||||
|
||||
diff --git a/beos/window.cpp b/beos/window.cpp
|
||||
index 253b5d1..b9e6491 100644
|
||||
--- a/beos/window.cpp
|
||||
|
||||
Reference in New Issue
Block a user