Merge branch 'master' into sam460ex
This commit is contained in:
@@ -5,4 +5,7 @@ http://elinux.org/images/4/4e/Glikely-powerpc-porting-guide.pdf
|
|||||||
http://ols.fedoraproject.org/OLS/Reprints-2008/likely2-reprint.pdf
|
http://ols.fedoraproject.org/OLS/Reprints-2008/likely2-reprint.pdf
|
||||||
http://www.bsdcan.org/2010/schedule/events/171.en.html
|
http://www.bsdcan.org/2010/schedule/events/171.en.html
|
||||||
http://www.devicetree.org/ (unofficial bindings)
|
http://www.devicetree.org/ (unofficial bindings)
|
||||||
|
http://www.devicetree.org/Device_Tree_Usage
|
||||||
http://elinux.org/Device_Trees
|
http://elinux.org/Device_Trees
|
||||||
|
* OF
|
||||||
|
http://www.openfirmware.info/Bindings
|
||||||
|
|||||||
@@ -1679,6 +1679,8 @@ VariablesView::MessageReceived(BMessage* message)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: we need to also persist/restore the casted state
|
||||||
|
// in VariableViewState
|
||||||
node->NodeChild()->SetNode(valueNode);
|
node->NodeChild()->SetNode(valueNode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ All rights reserved.
|
|||||||
#include <Region.h>
|
#include <Region.h>
|
||||||
#include <ScrollBar.h>
|
#include <ScrollBar.h>
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
|
#include <SupportDefs.h>
|
||||||
#include <Window.h>
|
#include <Window.h>
|
||||||
|
|
||||||
#include <ObjectListPrivate.h>
|
#include <ObjectListPrivate.h>
|
||||||
@@ -4783,16 +4784,20 @@ float
|
|||||||
OutlineView::GetColumnPreferredWidth(BColumn* column)
|
OutlineView::GetColumnPreferredWidth(BColumn* column)
|
||||||
{
|
{
|
||||||
float preferred = 0.0;
|
float preferred = 0.0;
|
||||||
for (RecursiveOutlineIterator iterator(&fRows); iterator.CurrentRow();
|
for (RecursiveOutlineIterator iterator(&fRows); BRow* row =
|
||||||
iterator.GoToNext()) {
|
iterator.CurrentRow(); iterator.GoToNext()) {
|
||||||
BRow* row = iterator.CurrentRow();
|
|
||||||
BField* field = row->GetField(column->fFieldID);
|
BField* field = row->GetField(column->fFieldID);
|
||||||
if (field) {
|
if (field) {
|
||||||
float width = column->GetPreferredWidth(field, this);
|
float width = column->GetPreferredWidth(field, this)
|
||||||
if (preferred < width)
|
+ iterator.CurrentLevel() * kOutlineLevelIndent;
|
||||||
preferred = width;
|
preferred = max_c(preferred, width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BString name;
|
||||||
|
column->GetColumnName(&name);
|
||||||
|
preferred = max_c(preferred, StringWidth(name));
|
||||||
|
|
||||||
// Constrain to preferred width. This makes the method do a little
|
// Constrain to preferred width. This makes the method do a little
|
||||||
// more than asked, but it's for convenience.
|
// more than asked, but it's for convenience.
|
||||||
if (preferred < column->MinWidth())
|
if (preferred < column->MinWidth())
|
||||||
|
|||||||
@@ -106,9 +106,7 @@ BTitledColumn::FontHeight() const
|
|||||||
float
|
float
|
||||||
BTitledColumn::GetPreferredWidth(BField *_field, BView* parent) const
|
BTitledColumn::GetPreferredWidth(BField *_field, BView* parent) const
|
||||||
{
|
{
|
||||||
BFont font;
|
return parent->StringWidth(fTitle.String()) + 2 * kTEXT_MARGIN;
|
||||||
parent->GetFont(&font);
|
|
||||||
return font.StringWidth(fTitle.String()) + 2 * kTEXT_MARGIN;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -202,11 +200,7 @@ float
|
|||||||
BStringColumn::GetPreferredWidth(BField *_field, BView* parent) const
|
BStringColumn::GetPreferredWidth(BField *_field, BView* parent) const
|
||||||
{
|
{
|
||||||
BStringField* field = static_cast<BStringField*>(_field);
|
BStringField* field = static_cast<BStringField*>(_field);
|
||||||
BFont font;
|
return parent->StringWidth(field->String()) + 2 * kTEXT_MARGIN;
|
||||||
parent->GetFont(&font);
|
|
||||||
float width = font.StringWidth(field->String()) + 2 * kTEXT_MARGIN;
|
|
||||||
float parentWidth = BTitledColumn::GetPreferredWidth(_field, parent);
|
|
||||||
return max_c(width, parentWidth);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+40
-19
@@ -1357,21 +1357,30 @@ Desktop::MoveWindowBy(Window* window, float x, float y, int32 workspace)
|
|||||||
AutoWriteLocker _(fWindowLock);
|
AutoWriteLocker _(fWindowLock);
|
||||||
|
|
||||||
Window* topWindow = window->TopLayerStackWindow();
|
Window* topWindow = window->TopLayerStackWindow();
|
||||||
if (topWindow)
|
if (topWindow != NULL)
|
||||||
window = topWindow;
|
window = topWindow;
|
||||||
|
|
||||||
if (workspace == -1)
|
if (workspace == -1)
|
||||||
workspace = fCurrentWorkspace;
|
workspace = fCurrentWorkspace;
|
||||||
if (!window->IsVisible() || workspace != fCurrentWorkspace) {
|
if (!window->IsVisible() || workspace != fCurrentWorkspace) {
|
||||||
if (workspace != fCurrentWorkspace) {
|
if (workspace != fCurrentWorkspace) {
|
||||||
// move the window on another workspace - this doesn't change it's
|
WindowStack* stack = window->GetWindowStack();
|
||||||
// current position
|
if (stack != NULL) {
|
||||||
if (window->Anchor(workspace).position == kInvalidWindowPosition)
|
for (int32 s = 0; s < stack->CountWindows(); s++) {
|
||||||
window->Anchor(workspace).position = window->Frame().LeftTop();
|
Window* stackWindow = stack->WindowAt(s);
|
||||||
|
// move the window on another workspace - this doesn't
|
||||||
|
// change it's current position
|
||||||
|
if (stackWindow->Anchor(workspace).position
|
||||||
|
== kInvalidWindowPosition) {
|
||||||
|
stackWindow->Anchor(workspace).position
|
||||||
|
= stackWindow->Frame().LeftTop();
|
||||||
|
}
|
||||||
|
|
||||||
window->Anchor(workspace).position += BPoint(x, y);
|
stackWindow->Anchor(workspace).position += BPoint(x, y);
|
||||||
window->SetCurrentWorkspace(workspace);
|
stackWindow->SetCurrentWorkspace(workspace);
|
||||||
_WindowChanged(window);
|
_WindowChanged(stackWindow);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
window->MoveBy((int32)x, (int32)y);
|
window->MoveBy((int32)x, (int32)y);
|
||||||
|
|
||||||
@@ -1532,11 +1541,16 @@ Desktop::SetWindowWorkspaces(Window* window, uint32 workspaces)
|
|||||||
if (window->IsNormal() && workspaces == B_CURRENT_WORKSPACE)
|
if (window->IsNormal() && workspaces == B_CURRENT_WORKSPACE)
|
||||||
workspaces = workspace_to_workspaces(CurrentWorkspace());
|
workspaces = workspace_to_workspaces(CurrentWorkspace());
|
||||||
|
|
||||||
uint32 oldWorkspaces = window->Workspaces();
|
WindowStack* stack = window->GetWindowStack();
|
||||||
|
if (stack != NULL) {
|
||||||
window->WorkspacesChanged(oldWorkspaces, workspaces);
|
for (int32 s = 0; s < stack->CountWindows(); s++) {
|
||||||
_ChangeWindowWorkspaces(window, oldWorkspaces, workspaces);
|
window = stack->LayerOrder().ItemAt(s);
|
||||||
|
|
||||||
|
uint32 oldWorkspaces = window->Workspaces();
|
||||||
|
window->WorkspacesChanged(oldWorkspaces, workspaces);
|
||||||
|
_ChangeWindowWorkspaces(window, oldWorkspaces, workspaces);
|
||||||
|
}
|
||||||
|
}
|
||||||
UnlockAllWindows();
|
UnlockAllWindows();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3415,18 +3429,25 @@ Desktop::_SetWorkspace(int32 index, bool moveFocusWindow)
|
|||||||
// But only normal windows are following
|
// But only normal windows are following
|
||||||
uint32 oldWorkspaces = movedWindow->Workspaces();
|
uint32 oldWorkspaces = movedWindow->Workspaces();
|
||||||
|
|
||||||
_Windows(previousIndex).RemoveWindow(movedWindow);
|
WindowStack* stack = movedWindow->GetWindowStack();
|
||||||
_Windows(index).AddWindow(movedWindow,
|
if (stack != NULL) {
|
||||||
movedWindow->Frontmost(_Windows(index).FirstWindow(),
|
for (int32 s = 0; s < stack->CountWindows(); s++) {
|
||||||
index));
|
Window* stackWindow = stack->LayerOrder().ItemAt(s);
|
||||||
|
|
||||||
|
_Windows(previousIndex).RemoveWindow(stackWindow);
|
||||||
|
_Windows(index).AddWindow(stackWindow,
|
||||||
|
stackWindow->Frontmost(
|
||||||
|
_Windows(index).FirstWindow(), index));
|
||||||
|
|
||||||
|
// send B_WORKSPACES_CHANGED message
|
||||||
|
stackWindow->WorkspacesChanged(oldWorkspaces,
|
||||||
|
stackWindow->Workspaces());
|
||||||
|
}
|
||||||
|
}
|
||||||
// TODO: subset windows will always flicker this way
|
// TODO: subset windows will always flicker this way
|
||||||
|
|
||||||
movedMouseEventWindow = true;
|
movedMouseEventWindow = true;
|
||||||
|
|
||||||
// send B_WORKSPACES_CHANGED message
|
|
||||||
movedWindow->WorkspacesChanged(oldWorkspaces,
|
|
||||||
movedWindow->Workspaces());
|
|
||||||
NotifyWindowWorkspacesChanged(movedWindow,
|
NotifyWindowWorkspacesChanged(movedWindow,
|
||||||
movedWindow->Workspaces());
|
movedWindow->Workspaces());
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -368,10 +368,13 @@ StackAndTile::WindowWorkspacesChanged(Window* window, uint32 workspaces)
|
|||||||
if (desktop == NULL)
|
if (desktop == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (int i = 0; i < group->CountItems(); i++) {
|
const WindowAreaList& areaList = group->GetAreaList();
|
||||||
SATWindow* listWindow = group->WindowAt(i);
|
for (int32 i = 0; i < areaList.CountItems(); i++) {
|
||||||
if (listWindow != satWindow)
|
WindowArea* area = areaList.ItemAt(i);
|
||||||
desktop->SetWindowWorkspaces(listWindow->GetWindow(), workspaces);
|
if (area->WindowList().HasItem(satWindow))
|
||||||
|
continue;
|
||||||
|
SATWindow* topWindow = area->TopWindow();
|
||||||
|
desktop->SetWindowWorkspaces(topWindow->GetWindow(), workspaces);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3862,9 +3862,8 @@ vm_page_allocate_page_run(uint32 flags, page_num_t length,
|
|||||||
page_num_t offsetStart = start + sPhysicalPageOffset;
|
page_num_t offsetStart = start + sPhysicalPageOffset;
|
||||||
|
|
||||||
// enforce alignment
|
// enforce alignment
|
||||||
if (alignmentMask != 0 && (offsetStart & alignmentMask) != 0) {
|
if ((offsetStart & alignmentMask) != 0) {
|
||||||
offsetStart = ((offsetStart + alignmentMask) & ~alignmentMask)
|
offsetStart = (offsetStart + alignmentMask) & ~alignmentMask;
|
||||||
- sPhysicalPageOffset;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// enforce boundary
|
// enforce boundary
|
||||||
@@ -3919,7 +3918,7 @@ vm_page_allocate_page_run(uint32 flags, page_num_t length,
|
|||||||
freeClearQueueLocker.Lock();
|
freeClearQueueLocker.Lock();
|
||||||
}
|
}
|
||||||
|
|
||||||
start += max_c(i, alignmentMask) + 1;
|
start += i + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user