Commit Graph

61216 Commits

Author SHA1 Message Date
Adrien Destugues
22ec64553f intel_extreme: some minor fixes
- 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
2020-03-13 15:42:03 +01:00
John Scipione
2e99f0e1fe Appearance Prefs: Remember saved Decorator and ControlLook setting
... 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>
2020-03-13 12:40:35 +00:00
John Scipione
cfdf08e8ba Appearance Prefs: style fixes to LookAndFeelSettings only
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>
2020-03-13 12:40:35 +00:00
Augustin Cavalier
8eaf4427f0 Tracker: Refactor IconCache to use BOpenHashTable.
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>
2020-03-13 12:39:43 +00:00
X512
910651da23 Deskbar: add middle click shortcut
* 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>
2020-03-11 10:32:04 +00:00
Niels Sascha Reedijk
1751209031 Fix error in string.
Reported by a translator. Thanks!
2020-03-10 21:52:14 +00:00
Alexander von Gluck IV
55213e3edb jam/efi: Improve our knowledge of EFI default loader names
Change-Id: I7ae941426a10ceac6771ef0a2a53f81d3c3c39d0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2338
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-10 14:58:43 +00:00
Jérôme Duval
a0adb978da embeddedcontroller: remove child devices if init failed.
Change-Id: I82120ae95936505da06255e6d0cd3b72fb267be5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2335
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-10 13:14:09 +00:00
Jérôme Duval
1b16a232eb acpi_battery: support for _BIX method.
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>
2020-03-10 13:14:09 +00:00
Alexander von Gluck IV
4f732f12a1 efi: drop fdt and fdt drivers on arm
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>
2020-03-10 13:10:48 +00:00
Adrien Destugues
f16db28447 intel_extreme build fix 2020-03-09 20:37:47 +01:00
Alexander von Gluck IV
9775b1fb59 boot/efi: Revert gFDT portion of hrev53960
Change-Id: I6337aea8054840f36d41ac51cf8856eb04c0e6ba
2020-03-09 14:21:43 -05:00
Alexander von Gluck IV
9b91a310bf system/boot/efi: Tweaks to get arm efi further
* Store gFDT as a global in efi to appease non-x86
* gFDT might need refactored out of fdt bus_manager?

Change-Id: I3fb1be04ceb696677aa5476381786c36adc6fc0a
2020-03-09 11:34:47 -05:00
Alexander von Gluck IV
40c4917414 riscv64: Add missing linker scripts, fix some kernel dependencies
Change-Id: Ic63b0bbdddda629bb9bc76017a806746c983023e
2020-03-09 10:19:21 -05:00
Kyle Ambroff-Kao
2a0d1eb890 makeudfimage: Remove this tool completely
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>
2020-03-09 12:18:06 +00:00
John Scipione
ddb8a39005 BWindow: Adjust default zoom for new mini-mode
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>
2020-03-09 12:11:21 +00:00
CruxBox
2deffe2f3f Adding superblock, types, xfs_mount and volume
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>
2020-03-09 08:52:50 +00:00
John Scipione
0d2645e44f Deskbar: New single line mini-mode
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>
2020-03-09 08:48:46 +00:00
Adrien Destugues
23be24d2d2 intel_extreme: fix panel fitting code
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).
2020-03-08 16:01:43 +01:00
Adrien Destugues
168aff90a7 intel_extreme: program the DPLL_SEL register on SandyBridge
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.
2020-03-08 16:01:43 +01:00
Adrien Destugues
7991d1b79d intel_extreme: fix assigning pipes to displays
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.
2020-03-08 16:01:42 +01:00
Adrien Destugues
deb591ec89 intel_extreme: fix detection of BDB block with LVDS panel info
The terminator is not always present, but the mode (at least the fields
we use) seems to be there nonetheless.
2020-03-08 16:01:42 +01:00
Adrien Destugues
54e9c79ba4 nvme: build fix. 2020-03-08 16:01:42 +01:00
Niels Sascha Reedijk
b341eef43a Haiku Book: revert accidental overzealous search & replace all 2020-03-08 09:21:06 +00:00
Niels Sascha Reedijk
a8081885d2 HaikuBook: fix warnings generated by Doxygen 1.18.16.
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.
2020-03-08 08:57:37 +00:00
Augustin Cavalier
d4dbce2983 app_server: Drop custom HashTable and use HashMap instead.
Change-Id: I7d5aae6a7fd2b4f47704a931a23eee09a4eedcac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2323
Reviewed-by: John Scipione <jscipione@gmail.com>
2020-03-08 08:26:27 +00:00
Augustin Cavalier
1ba9396139 Tracker: Replace the deprecated std::hash_set with our HashSet.
Change-Id: I7d29f0c905a3ab1a20f6eca252ff1f168218c23f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2322
Reviewed-by: John Scipione <jscipione@gmail.com>
2020-03-08 08:26:27 +00:00
Augustin Cavalier
996c9bf0dd Tracker: Use ObjectDeleter instead of the deprecated std::auto_ptr.
Change-Id: I5d358076065fefa39df923e4554599b716d9883b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2321
Reviewed-by: John Scipione <jscipione@gmail.com>
2020-03-08 08:26:27 +00:00
Preetpalkaur3701
c8c9723ae5 Input preferences: Make Device list width is font sensitive
Fixes #15738

Change-Id: I125c47f015c939acbd70c9509310ec3cdef7d2c5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2308
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-08 07:53:27 +00:00
Humdinger
21cb95732e Fix missing space/add newline in alert text
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.
2020-03-08 06:45:59 +01:00
Augustin Cavalier
96d5cadcdb atomizer: Remove.
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...
2020-03-07 17:50:21 -05:00
Augustin Cavalier
cbdbe1cf43 nvme_disk: Protect against simultaneous writes to "rounded" blocks.
May help with some of the stranger NVMe KDL tickets.
2020-03-07 17:41:35 -05:00
Augustin Cavalier
f87a7ab0f7 nvme_disk: Add missing linebreaks in error messages. 2020-03-07 17:18:16 -05:00
Augustin Cavalier
0bf26bd17e nvme_disk: Poll before checking the "status" again.
Otherwise, we may have missed an interrupt and wind up in
a dead-wait.
2020-03-07 17:17:28 -05:00
Augustin Cavalier
475c3b42e2 nvme_disk: Remove do_nvme_segmented_io.
It appears that libnvme handles breaking up I/O operations already
and submit them in a more organized fashion, so this is not needed.
2020-03-07 17:16:34 -05:00
Augustin Cavalier
d447d74781 nvme_disk: Use interrupts instead of polling.
Requires the preceding commit due to how it uses ConditionVariables.
Massively decreases CPU usage under heavy disk load.

Change-Id: I967e5ed000751d9f3971dd811563e23bcb13dd50
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2302
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-03-07 21:27:05 +00:00
Augustin Cavalier
1728b8c777 kernel: Rework ConditionVariableEntry destruction.
It is no longer an error to destroy a ConditionVariableEntry
that is still attached to a ConditionVariable; it will
now be implicitly detached in that case.

This makes ConditionVariableEntrys much eaiser to use
from an API standpoint.

Change-Id: I03c676d3a198aa885de733d3e1729b15f80de031
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2301
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-03-07 21:27:05 +00:00
X512
1c9c772967 Interface Kit: make BTextControl behave like BeOS
Contents of BTextControl should be not selected if text is directly clicked.
Selection should be removed if BTextView lose focus.

Change-Id: Ifba914c2ada4fc1aac88205f69a64a4356009469
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2109
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-03-07 18:48:32 +00:00
X512
5d17f05f5f BFS: allow deleting "bad data" files
"bad data" files now can be deleted with "rm --force <name>".

Fixes #15730.

Change-Id: I44bda91f3c2198d30212b4d7791a9b55f947c926
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2257
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-03-07 18:15:10 +00:00
John Scipione
98a8bc858e PowerStatus: Draw battery icon even if there isn't enough space
This allows for drawing the battery icon in Deskbar at 8pt font.

Change-Id: Ibd8f151fe5a16da5f812083a3d5457991b3c49a8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2300
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-07 18:12:59 +00:00
X512
9b33a309da Interface Kit: fix menu resizing when scrolling is enabled
BMenuWindow::Attach/DetachScrollers can be called when scrollers are
already attached/detached and it should handle this case properly.

Call BMenuWindow::DetachScrollers when scrolling is not needed anymore.

Fixes #8513.

Change-Id: I1f70b63d75106cf33ab1f72d34e221a54b45a75e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2310
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
2020-03-07 17:33:25 +00:00
Autocomitter
30f2ededbf Update translations from Pootle 2020-03-07 08:58:35 +00:00
John Scipione
74ceffa889 Deskbar: Reimplement auto-raise/implement auto-lower
This changes auto-raise so that when the mouse moves over the screen edge
within the Deskbar window it raises Deskbar up and when the mouse leaves
the Deskbar window it lowers it back down again as described in #13304.

Activate Deskbar on click only if not in auto-raise mode and not in
always-on-top mode. In auto-raise mode click activates through foreground
windows, which we don't want. We don't ever want to activate Deskbar in
always-on-top mode because Deskbar is already on top and we don't want to
change the active window.

However, if a menu is opened on click in auto-raise Deskbar is raised and
stays on top as long as a menu remains open. Once menu is closed Deskbar
lowers back down again. Only lower Deskbar on menu close in auto-raise mode
if there isn't another menu open.

Don't raise/lower Deskbar if window has been dragged from the outside in
auto-raise mode.

Change bool fShowingMenu to int32 fMenusShown and use it to store a
reference count of open menus. In the previous design menus could be
opened from multiple locations clobbering the bool.

Add an fBarWindow member to BarView and initialize it in AttachedToWindow()
Use this throughout the class so that we don't have to keep getting it over
and over again. Also add an fBarApp member to BarWindow and use that
instead of creating it again and again.

Change order of methods in BarView to MouseDown(), MouseMoved(), then
MouseUp() because that order is both logical and alphabetical.

Fixes #15678, #13304

Change-Id: I076a452b26250d9eb9a4eccb4a6aa6f939e11d34
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2281
Reviewed-by: Sergei Reznikov <diver@gelios.net>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: humdinger <humdingerb@gmail.com>
2020-03-06 09:50:34 +00:00
Alexander von Gluck IV
a8cd19b641 system/boot: Begin factoring gFDT out of non-u-boot code
Change-Id: Ibe010c6c7ed71a20fc852ce6c72c6f32b98dfad2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2292
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-04 14:24:26 +00:00
Jérôme Duval
cffa2c68a8 PCI: update subclasses and capabilities, add usb4 programming interface
from https://pcisig.com/sites/default/files/files/PCI_Code-ID_r_1_12__v9_Jan_2020.pdf

Change-Id: I0a9ec565c742f4ee230759be0834aff5b7ffcb97
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2307
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-03 19:12:39 +00:00
John Scipione
2e08685b99 BMenu: Rename FrameMoved and FrameResized variable names
No functional change. lowercase_with_underscore file names are not
in-line with Haiku's style guidelines.

Change-Id: I254c975ee60168963ca4039a61dc428c05e0e6ba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2306
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-03 10:56:05 +00:00
Niels Sascha Reedijk
02e45e32ae HaikuBook: Initial documentation for BNotification
The implementation file contained some documentation. This has been moved
to the Haiku Book (and is rewritten in most cases). The documentation gives
some insight on how the notification_server works.

Change-Id: I82bafcf57101d4882bdf07e7f731df9cd8adc861
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2299
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-02 22:10:04 +00:00
Augustin Cavalier
0da74916e2 nvme_disk: Initialize "status" in nvme_disk_write.
It is possible that no code path which assigns "status" is taken,
so we need to initialize this before it is checked against.

Spotted by Coverity.
2020-03-01 18:25:56 -05:00
Augustin Cavalier
58dcc29b6d runtime_loader: Fix memory leak in init_dependencies.
get_sorted_image_list allocates initList even if "count" winds up
being 0, so we need to free it in this case also.

Spotted by Coverity.
2020-03-01 18:18:47 -05:00
Augustin Cavalier
51d0d6e229 XHCI: Remove logically dead code.
This is inside a "endpointId > 0" block, and endpointNum=id+1,
so we will never call EvaluateContext here. (Endpoint "1" is
configured by AllocateDevice.)

Spotted by Coverity.
2020-03-01 16:19:03 -05:00