Merge branch 'master' into sam460ex

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