* We don't need the BeOS FrameMoved() work-around for Haiku.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28909 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-01-15 11:39:55 +00:00
parent 3dc4e7fa47
commit ff6ab52278
+4 -15
View File
@@ -116,7 +116,6 @@ class WorkspacesWindow : public BWindow {
private: private:
WorkspacesSettings *fSettings; WorkspacesSettings *fSettings;
BRect fPreviousFrame;
bool fAutoRaising; bool fAutoRaising;
}; };
@@ -257,14 +256,16 @@ WorkspacesSettings::UpdateFramesForScreen(BRect newScreenFrame)
return; return;
// adjust horizontal position // adjust horizontal position
if (fWindowFrame.right > fScreenFrame.right / 2) if (fWindowFrame.right > fScreenFrame.right / 2) {
fWindowFrame.OffsetTo(newScreenFrame.right fWindowFrame.OffsetTo(newScreenFrame.right
- (fScreenFrame.right - fWindowFrame.left), fWindowFrame.top); - (fScreenFrame.right - fWindowFrame.left), fWindowFrame.top);
}
// adjust vertical position // adjust vertical position
if (fWindowFrame.bottom > fScreenFrame.bottom / 2) if (fWindowFrame.bottom > fScreenFrame.bottom / 2) {
fWindowFrame.OffsetTo(fWindowFrame.left, fWindowFrame.OffsetTo(fWindowFrame.left,
newScreenFrame.bottom - (fScreenFrame.bottom - fWindowFrame.top)); newScreenFrame.bottom - (fScreenFrame.bottom - fWindowFrame.top));
}
fScreenFrame = newScreenFrame; fScreenFrame = newScreenFrame;
} }
@@ -474,7 +475,6 @@ WorkspacesWindow::WorkspacesWindow(WorkspacesSettings *settings)
fAutoRaising(false) fAutoRaising(false)
{ {
AddChild(new WorkspacesView(Bounds())); AddChild(new WorkspacesView(Bounds()));
fPreviousFrame = Frame();
if (!fSettings->HasTitle()) if (!fSettings->HasTitle())
SetLook(B_MODAL_WINDOW_LOOK); SetLook(B_MODAL_WINDOW_LOOK);
@@ -497,9 +497,6 @@ WorkspacesWindow::~WorkspacesWindow()
void void
WorkspacesWindow::ScreenChanged(BRect rect, color_space mode) WorkspacesWindow::ScreenChanged(BRect rect, color_space mode)
{ {
fPreviousFrame = fSettings->WindowFrame();
// work-around for a bug in BeOS, see explanation in FrameMoved()
fSettings->UpdateFramesForScreen(rect); fSettings->UpdateFramesForScreen(rect);
MoveTo(fSettings->WindowFrame().LeftTop()); MoveTo(fSettings->WindowFrame().LeftTop());
} }
@@ -508,14 +505,6 @@ WorkspacesWindow::ScreenChanged(BRect rect, color_space mode)
void void
WorkspacesWindow::FrameMoved(BPoint origin) WorkspacesWindow::FrameMoved(BPoint origin)
{ {
if (origin == fPreviousFrame.LeftTop()) {
// This works around a bug in BeOS; when you change the window
// position in WorkspaceActivated() or ScreenChanged(), it will
// send an old repositioning message *after* the FrameMoved()
// that originated your change has arrived
return;
}
fSettings->SetWindowFrame(Frame()); fSettings->SetWindowFrame(Frame());
} }