Re-offset red_error, green_error and blue_error when deleted,
since they are offseted at line 99, 109 and 120
after they are allocated.
Pointed out by Clang Static Analyzer
Change-Id: Ic12a754dff7049fc4fbfd25ababafd8243db6baa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2354
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
The dma-alloc method is in the parent node (the PCI bus), not directly
in the network device.
Change-Id: I18f6a9333f3afa78033042e75a86b00872515f2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2359
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Sending packets from 0.0.0.0 doesn't work quite right, so better admit
we failed.
Change-Id: Iddece4a7269abbdd8e93f0cbbc9a9e43fcbe8a69
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2358
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Of course Sun and Apple didn't put it at the same place...
Change-Id: I974caff7335bb25a0e8dd4f7da8bdb9a737d011e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2357
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
It is used only in the TCP loader to initialize a random TCP source port.
Since the RTC device does not exist on sparc, this is not portable. A
simple solution is to use a non-random source port, maybe based on the
powercycle count or something like that. For now, I don't need the TCP
loader, so I'll just disable this.
Change-Id: I6e279a77bb90a8b8b989f06dd9fb256156f71635
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1988
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The address-size property is missing, but we don't really need it.
Change-Id: Iff3de89c811d16a263eadf796a0e6eb157dbe18b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2356
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Apparently it worked by luck only on the Ultra60. Physical addresses for
openfirmware are on two cells (128 bits!) and we were passing only one
cell, of course this wouldn't go well. On the Ultra5 it ended up having
the heap point to unused space besides the RAM, so it was mostly reading
random data from there.
Change-Id: I4f9010013fe91a582e5daa83e6bf458703adba2b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2350
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The position is on 2 cells even on 64bit systems.
Change-Id: I97f4e3fc02734c548ed23445a917a894ff548379
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2351
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Activating all these packages on live boot (especially live DVD where we
also have the write overlay eating up RAM) significantly increases
memory requirements for running Haiku, to the point that Installer may
fail to run. Move them outside the packages/ directory so they are not
activated.
Installer already skips the _sources_ directory when installing, and
lists the contents of _packages_ with checkbox to decide what to include
in the install (they are put in system/packages on the target disk).
Fixes#15621.
Change-Id: Ibfac14c43dbe708316a0d82ca1c9d49b5cba2aef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2157
Reviewed-by: Sergei Reznikov <diver@gelios.net>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Until now the activated-packages file was not used for anything, because
it was not looked for in the correct place.
Change-Id: Ib38f28b52e85af6900c0e2b61a9621734428ad25
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2341
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The current implementation of the keystore_server is not perfect. While the
source has many seeds for a future of having keyrings encrypted, and having
more fine grained permissions, it is far from complete.
The main arguments for adding documentation about this new but incomplete
functionality is that while it is incomplete, the API is part of the public
headers, and there are some legitimate use cases for developers.
The documentation aims to give the proper amount of caution to any developer
that is considering using this API.
Change-Id: I154a3f8374b22dc6929758cba7ba810833bcfe9d
- Cleanup HEAD_MODE constants. These should be completely removed, now
that we have a proper notion of pipes and displays. But the DPMS code
still uses them, for now.
- Fix the ie_pipe command where width and height were swapped and
missing a +1 to show the actual videomode values
... and make the Defaults and Revert buttons revert back to the
default/saved decorator and control look.
Add private _SetControlLook() method to set the control look which is
the equivalent of _SetDecor() but for control looks.
The person who implemented the ControlLook menu field made it so that
it would truncate the trailing "ControlLook" from the control look name,
do the same for Decorators so that BeDecorator is listed as simply "Be"
in the menu field. This is an alteration to the menu item label only and
does not affect the name of the decorator or control look.
Add private _DecorLabel() and _ControlLookLabel() methods to build
the truncated Decorator and ControlLook menu item labels respectively.
Set the current and saved decorator and control look in the constructor
and get rid of some private setter methods _AdoptToCurrentDecor() and
_AdoptInterfaceToCurrentDecor() that are no longer needed. These actions
are now done exclusively in the constructor and _SetDecor() respectively.
Remove unused knob style message constants (for now...)
Update copyright year to 2020
Change-Id: I0444a6198116d7699a84487cf97e9d826b14d1cb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2315
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
msg => message
pointer style
80 char limit fixes
Rename variable newControlLook => controlLook
Add #pragma descriptor comments.
Replace for (; condition;) loop with a while loop
Initialize count outside a different for loop
Change iterator variable i type from int => int32 (not purely style.)
2 lines of whitespace before ending header guard
Alphabetize (my) author name below Ryan Leavengood in header top comment
No functional change intended in this commit except for int => int32.
Change-Id: Ic78e3b0c85207ba07a3a71696d741344e148ac9d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2317
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This removes the last usage of the old OpenTracker OpenHashTable,
and so it can now be removed.
Change-Id: I7a7bceef1d3fc74c7fdfa7b079e53576452703dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2339
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
* Middle click on team item launch new instance of team.
* Shift+middle click on window item closes window.
Change-Id: Iaf201b8fe87dcc4430afd451a7ad3654178389a0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2337
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Sergei Reznikov <diver@gelios.net>
change int types to uint32, as it's more correct.
Change-Id: Iae7043abe4c8b8a121548fe6d6a809f1bd879c8a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2334
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Change-Id: I3a11e7b3aae043deb72a2dd0de543cb488d75eb6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2336
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
* Store gFDT as a global in efi to appease non-x86
* gFDT might need refactored out of fdt bus_manager?
Change-Id: I3fb1be04ceb696677aa5476381786c36adc6fc0a
The AllocatorTest suite fails, and when investigating why it was
broken I realized that it was testing code that has been dead and
unused for quite some time. makeudfimage hasn't been touched since
2004 (5f2185ea0), and was removed from the build in 2006 (5adca30a1).
The only changes that have been made to it since then are build fixes
for the tests. Adding it back to the build would require some work
since many things have changed since then.
Since there are many other tools and libraries out there which can
make UDF images (and which have been ported to Haiku), this code
doesn't really seem worth maintaining at this point.
This patch just removes it, as well as the associated tests.
Change-Id: I23da8df83b7f141b3394a022030545d42a287881
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2332
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Treat bottom left, bottom right, and top left mini-mode like
horizontal mode and go full screen in top right mini-mode.
Change-Id: I55c4c0875b5696e6c193a72d96f309c3b058bf9c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2254
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Superblock work is done. A valid superblock is now detected.
xfs_shell will fail though, because the filesystem does not own it's
root node.
Change-Id: I78e3c21c4d0dd8e535fd24df4a0c107ed5fb201c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2286
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Mini-mode is when Deskbar is in the 4 corners with the application
menu tucked away into the leaf menu bar. This commit changes mini-
mode from putting the clock and replicants below the leaf menu to
attaching them to the side forming a single line.
The main advantage of this is that if Deskbar is in the top right
corner you can maximize a window without losing any access to
Deskbar or any screen real-estate. The other three corners lose screen
real-estate similar to horizontal mode.
Replace team icon with HVIF version kindly donated by meanwhile.
Scale icon size according to font size. Grow the vector rendered icon
size by 1px to match bitmap size. Add Team_Registrar icon to
data/artwork/icons. Tweak Team_Registrar icon to match the area of the
bitmap taken up by the bitmap icon so they will render at the same size.
The bitmap can be now NULL if an invalid icon is passed, handle this
case with an fInitStatus member in BarMenuTitle.
Switch order of leaf and team menus on the left side so that the
team menu is always on the screen edge. The team menu is more in
need of quick corner access than the leaf menu in this mode.
Adjust leaf menu position so that it continues to be cut-off while
allowing the team menu icon to display normally. Center vertically in
horizontal mode but it's still cut-off at 16x16. In vertical mode the
leaf continues to be cut-off at all font sizes. Constrain leaf bitmap
to its menu item frame as it can bleed out into the adjacent team menu
item at larger font sizes.
Grow team menu items to fit the widest label up to the max vertical
expando window width (currently 2x min) before truncating.
LegacyPackageInstaller now fits in the team menu. More on
LegacyPackageInstaller in horizontal mode below.
Update SetSizeLimits for mini-mode - no upper limit on height or width.
Switch to mini-mode using 1/4 screen left and right of screen instead
of using 1/6. Mini mode is now wider and this change makes switching
between mini mode and horizontal mode more reliable.
* Rename frame to screenFrame here for clarity.
Set menu bar height to window tab height in vertical mode. This is
so that when you maximize a window the tab size will match. The menu
bar height is also a few pixels taller (25px vs 21px) than it was in
vertical expando mode at the default 12px font size. The change was
made to match the tab height. 21px was the height of a window tab
on BeOS R5's default decorator.
Adjust the width of the team menu for larger icon sizes. If app
names are hidden limit to half of min width so the menu doesn't
appear too short. SetMaxContentSize to width, this fixes a bug where
the menu item wasn't quite the right size for the menu.
No longer truncate time in vertical mini mode because the time can now
expand itself horizontally without limit (within reason.)
Center replicants vertically in mini-mode based on tab height and max
replicant height. Simplify mini-mode menu width and position calculation.
Fix a bar menu bar placement bug when Deskbar starts hidden in mini-mode.
Fix numerous layout issues. Put replicant tray where it should be in all
modes and then start adjusting things. The Replicant tray is now where
it should be in all modes, any fiddling with replicant icon locations
now can be relegated solely to LocationForReplicant().
Implements bug #5876 step 1.
*** Other related Deskbar improvements also made in this commit ***
Implemented underflow in horizontal mode ExpandoMenuBar to make items
wider when you close a team to take up more of available space. Max item
width is currently set to 1.25x min width so that LegacyPackageInstaller
fits in horizontal mode as well. In team menu it make sense to calculate
the widest label but in horizontal mode it would not be very nice if
ARogueAppWithAVeryVeryLongAndAnnoyingName were to grow all of your team
menu items. 1.25x is a fair compromise that gets us some extra width but
not too much. ExpandoMenuBar will truncate items to minimum width to buy
some space before it turns on the scroll arrows. Eliminate
kMinMenuItemWidth, create convinience methods to calculate limits.
Add BarView pointer to TimeView. Ditch fVertical and SetOrientation
in TTimeView and get the information from BarView instead. This way
we don't have to keep the state in sync. Also pass BarView pointer to
TTeamMenu constructor and use it instead of getting the pointer in a
roundabout way from be_app.
Eliminate kMiniHeight constant, the mini-mode height is now based
on the height of a window tab which changes with be_bold_font size.
Limit maximum height of replicants by be_bold_font size as well.
Also limit team menu and leaf menu icon heights by be_bold_font size.
Eliminate TExpandoMenuBar::fVertical, use fBarView instead. Switch the
order of layout and barView in ctor so that barView can be optional.
Change the ctor vertical param to layout and use the passed-in menu_layout
to pass to BMenuBar only. Once TExpandoMenuBar has been constructed, use
fBarView from then on. In Deskbar the menu_layout can change via
BMenuPrivate::SetLayout, if we needed to know TExpandoMenuBar's menu_layout
for some reason, we can call Layout().
Maintain 2px border around replicants in vertical expando mode on all
sides. Maintain 2px border around replicants in horizontal mode, except for
at 16x16 reduce the border to 1px because we're really short on height.
Improve clock centering in vertical expando mode. Also improve clock
centering in mini-mode across all font sizes. Reduce clock height by 2px
so that it won't draw over the top and bottom borders in horizontal mode.
Refactor TBarView::PlaceTray(). The code is basically the same but the
method is now better layed out. Calculate resize dragger location based
on width setting. This is valid since it is only ever used in vertical
expando mode. Hide the resize control better by moving it off-screen
when not in use. Hide() alone was not enough.
Fix size and position of the drag region to prevent minor drawing glitches
that were occuring in horizontal and left vertical mode because the drag
region was not in quite the right size and place.
Call DrawDragger() from DrawAfterChildren() instead of Draw() (and set
B_DRAW_ON_CHILDREN flag) so that the dragger will always be drawn even if
there are other items on top. In theory this should not be needed but in
practice this fixes a few drawing glitches. Rename DrawDragRegion() to
private DrawDragger() method - the name was confusing and other classes
shouldn't be allowed to draw the dragger directly.
TDragRegion should be renamed to TStatusView since that's what it really is.
Then we should create a new TDragControl class based on TResizeControl that
is a child of TStatusView like everybody else. TDragControl would be
responsible for drawing itself and knowing where its bounds are. For now
DrawAfterChildren() will have to do.
Rework status tray border drawing. It is identical in vertical exando mode
and in the same spirit in horizontal mode just a little bit nicer looking.
Draw hilight on top, left, and bottom edges in horizontal mode. Draw hilight
on top, and left edges in mini-mode this creates the appearance of a shadow.
Best appreciated using Magnify.
May the following (Open Tracker License) code forever be memorialized in
this commit message:
void
TDragRegion::Draw(BRect updateRect)
{
rgb_color menuColor = ViewColor();
rgb_color hilite = tint_color(menuColor, B_DARKEN_1_TINT);
rgb_color ldark = tint_color(menuColor, 1.02);
rgb_color dark = tint_color(menuColor, B_DARKEN_2_TINT);
rgb_color vvdark = tint_color(menuColor, B_DARKEN_4_TINT);
rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT);
BRect frame(Bounds());
BeginLineArray(4);
if (be_control_look != NULL) {
if (fBarView->Vertical()) {
AddLine(frame.LeftTop(), frame.RightTop(), dark);
AddLine(BPoint(frame.left, frame.top + 1),
BPoint(frame.right, frame.top + 1), ldark);
AddLine(frame.LeftBottom(), frame.RightBottom(), hilite);
} else if (fBarView->AcrossTop() || fBarView->AcrossBottom()) {
AddLine(frame.LeftTop(),
BPoint(frame.left, frame.bottom), dark);
AddLine(BPoint(frame.left + 1, frame.top + 1),
BPoint(frame.right - 1, frame.top + 1), light);
AddLine(BPoint(frame.right, frame.top + 2),
BPoint(frame.right, frame.bottom), hilite);
AddLine(BPoint(frame.left + 1, frame.bottom),
BPoint(frame.right - 1, frame.bottom), hilite);
}
} else {
if (fBarView->Vertical()) {
AddLine(frame.LeftTop(), frame.RightTop(), light);
AddLine(frame.LeftTop(), frame.LeftBottom(), light);
AddLine(frame.RightBottom(), frame.RightTop(), hilite);
} else if (fBarView->AcrossTop()) {
AddLine(BPoint(frame.left, frame.top + 1),
BPoint(frame.right - 1, frame.top + 1), light);
AddLine(frame.RightTop(), frame.RightBottom(), vvdark);
AddLine(BPoint(frame.right - 1, frame.top + 2),
BPoint(frame.right - 1, frame.bottom - 1), hilite);
AddLine(frame.LeftBottom(),
BPoint(frame.right - 1, frame.bottom), hilite);
} else if (fBarView->AcrossBottom()) {
AddLine(BPoint(frame.left, frame.top + 1), BPoint(frame.right - 1, frame.top + 1), light);
AddLine(frame.LeftBottom(), frame.RightBottom(), hilite);
AddLine(frame.RightTop(), frame.RightBottom(), vvdark);
AddLine(BPoint(frame.right - 1, frame.top + 1),
BPoint(frame.right - 1, frame.bottom - 1), hilite);
}
}
EndLineArray();
}
Refactor mode switching.
Change TDragRegion::SwitchModeForRect() to SwitchModeForRegion() and pass
in BRegion's instead of BRect's. Create a new CalculateRegions() method
which is called once at startup and again on ScreenChanged() instead of
calculating the rect's over and over again inside MouseMoved(). Simplify
calculations using BRegion's.
Get the screen_where parameter from the Window()'s CurrentMessage() instead
of converting the passed in where parameter to screen coordinates. This
makes mode switching work 100% better.
Restore full state, fix all issues, and disable it again.
Fix issue with the window not resizing itself correctly when hiding the
scroller arrows in vertical expando mode because Deskbar was using the
bottom value of a scrolled view rather than its height. We only need to
call CheckForScrolling() once before we resize the window. Consolidate all
the window resizing code into ExpandoMenuBar::SizeWindow(), call
CheckForScrolling() there one time, then resize the window and lay
everything out again.
Simplify expando menu bar background drawing. The only part of this
drawing code that was actually being shown was the part where it stroked a
vertical line like this:
rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR);
SetHighColor(tint_color(menuColor, 1.22));
StrokeLine(bounds.LeftTop(), bounds.LeftBottom());
The rest of the code was never seen. May the following code also be forever
memorialized in this commit message:
void
TExpandoMenuBar::DrawBackground(BRect updateRect)
{
if (Vertical())
return;
BRect bounds(Bounds());
rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR);
rgb_color hilite = tint_color(menuColor, B_DARKEN_1_TINT);
rgb_color vlight = tint_color(menuColor, B_LIGHTEN_2_TINT);
int32 count = CountItems() - 1;
if (count >= 0)
bounds.left = ItemAt(count)->Frame().right + 1;
else
bounds.left = 0;
if (be_control_look != NULL) {
SetHighColor(tint_color(menuColor, 1.22));
StrokeLine(bounds.LeftTop(), bounds.LeftBottom());
bounds.left++;
uint32 borders = BControlLook::B_TOP_BORDER
| BControlLook::B_BOTTOM_BORDER | BControlLook::B_RIGHT_BORDER;
be_control_look->DrawButtonBackground(this, bounds, bounds, menuColor,
0, borders);
} else {
SetHighColor(vlight);
StrokeLine(bounds.LeftTop(), bounds.RightTop());
StrokeLine(BPoint(bounds.left, bounds.top + 1), bounds.LeftBottom());
SetHighColor(hilite);
StrokeLine(BPoint(bounds.left + 1, bounds.bottom),
bounds.RightBottom());
}
}
Change-Id: Id9ddd60c997a785184208ba02938bee1416aeae9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2253
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This could also help with VGA output, a logic error in the pipe code
would lead to never configuring the pipe resolution. May help with VGA
output on SandyBridge and IvyBridge (but I get DPMS off on my laptop for
now, so I think something isn't quite right yet).
We need to assign PLLs to pipes and transcoders. The assignments on
previous generations were fixed, but now it's up to us to set it up.
Do the simplest thing for now: assign PLL1 to pipe A and PLL2 to pipe B.
The previous code did not handle correctly the case where a display
requested a fixed mapping, and cloud end up assigning the same pipe to
multiple displays. But we want a separate pipe for each display,
allowing multihead support later on.
Rewrite the algorithm to first assign pipes to devices with fixed
constraints, and in a second pass assing the remaining pipes to other
displays.
This version generates some warnings and identified some problems in our
documentation. It is also a bit more vigilant about undocumented elements, so
these are now decorated with a brief description. In the BNotification docs I
used a stray \p to create some whitespace between code and an image. This is
now fixed in the CSS instead.
The text defined as ALERT_MSG_LOGS_USER_GUIDE is added to currently
two alert texts. If those lack a space at the end - one of them did -
there'll be a space missing after the full stop.
Adding \n to the start of ALERT_MSG_LOGS_USER_GUIDE solves this and,
as it's relatively much text, it reads better in its own paragraph.
Not used by anything at all, and not included in the build.
Even the BeOS engineer who created it wrote in a Be Newsletter
that he was uncertain how useful it was, which is why BeOS
did not ship it as a kernel add-on...