Commit Graph

61934 Commits

Author SHA1 Message Date
Augustin Cavalier
a06b52bee8 BScrollView: Revert to earlier document-window adjust behavior.
We need a different constant or mechanism to get the document
window border size, it appears, or a static method to get
a scroll bar's preferred size.

Should fix #16422.
2020-07-28 21:04:24 -04:00
Augustin Cavalier
64ba528788 libroot/glibc: Remove two unneeded headers.
The system nl_types.h suffices for this.
2020-07-28 20:39:22 -04:00
Alexander von Gluck IV
6f92b552f3 libroot: Add fake libc static library
* It's specified in POSIX: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html
* wine hardcodes a -lc in its winegcc compiler

Change-Id: I592b62085787d8f1a1ead2df32e978a91ab03ea9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3086
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-28 17:01:13 +00:00
Panagiotis Vasilopoulos
6a40fd892c Cleaned up InstallerApp
- Removed outdated, unused EULA text
- Removed unused BAboutWindow instance
- Changed instance name from 'theApp' to 'installer'

Change-Id: I6b8e078dc6e469df4cd2f254ccab719c061561d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3066
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-28 17:01:11 +00:00
Emir SARI
60a6f1d5d7 Set Noto Sans Mono as monospace default font
Should help improve [1].

[1]: https://github.com/haikuports/haikuports/issues/3116

Change-Id: I29dd94e3380c3a5935d47d97e2a2ac1c5fb7e774
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3070
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-28 16:42:18 +00:00
Adrien Destugues
e10762d1ce Set a version for Noto font dependency 2020-07-28 18:27:18 +02:00
Adrien Destugues
affb3a4a62 Expander: don't allow selecting text while listing files
Selecting moves the cursor and results in file listing being inserted
at the wrong place.
2020-07-27 21:14:59 +02:00
Adrien Destugues
d0e9e3ca27 Printer test page: fix typo
No functional change intended.
2020-07-27 19:47:14 +02:00
X512
6aee9d6424 Tracker: fix count view border problem
Fixes #16439.

Change-Id: If936517a0ecfaba994f5d48fcc2fd159cb8ea11f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3093
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-26 03:07:11 +00:00
Michael Lotz
cf238ffce1 multi_audio: Fix use of uninitialized entry to calculate drift.
Two indices into the fEntries ring buffer are used in TimeComputer,
fLastEntry which points to the most recent sample and fFirstEntry which
points to the oldest one. The drift calculation then uses the oldest
values pointed at by fFirstEntry to produce smoother values.

Both indices are initialized to 0, then fLastEntry is incremented prior
to writing the first sample, resulting in the first sample to be written
to fEntries[1]. When drift is calculated on subsequent samples, they
were using the uninitialized data from fEntries[0] due to fFirstEntry
still pointing there, until enough samples had been added for
fFirstEntry to be moved forward. The resulting incorrect drift values
would depend on the entry content and ratio between real and performance
time and generally end up being much too small.

The drift values are published on the time source and used to correct
the conversion between performance and real time in
BTimeSource::RealTimeFor(). Given the incorrectly small drift values,
this conversion produced real time values far in the future, causing
increased delays in processes that wait for such computed real times.

One likely victim was the startup of the AudioMixer, as it generally
starts soon after the driver and its MultiAudioNode. If it started right
in the time window where the drift was broken, it would end up delaying
its initial buffer processing by a factor generally depending on the
difference between real and performance time start points, so usually
the difference of the start of the boot process to the start of the
audio driver.

The symptom was then noticable by initial silence after boot, as the
mixer was not producing any buffers until the wrongly calculated real
time had been reached. After that, lots of queued up events were
processed at once, resulting in a CPU spike and glitchy audio for a
couple of seconds after which audio finally normalized. As the problem
was in the MultiAudioNode all mutli audio drivers were affected, HDA
being the most prominent.

As the erroneous delay depended on the initial entry content and the
boot time, it was highly variable. Whether or not the mixer was affected
at all also depended on it starting reasonably early after the driver,
which made the symptom of the bug appear and disappear depending on
slight timing changes, making unrelated code changes look like they were
affecting the bug.

The fFirstEntry index is now updated to fLastEntry after the initial
entry is added, so that the drift calculation always uses valid data.

Fixes #16222, may also affect #15472 and possibly other "no audio"
tickets in case they are really "delayed" audio tickets.

Change-Id: I61f4a67e8b8bf14d2f311cb41b24a1c385aebc19
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3092
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-26 00:42:59 +00:00
Leorize
b4024938bd BUrlProtocolListener: Update DownloadProgress() docs
Updated to reflect the consistency changes done to
BUrlProtocolListener::DownloadProgress().

Change-Id: I05cfac647507a3fff294900a107293b85eff60fb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3079
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-25 18:13:20 +00:00
Leorize
7bac04e684 HttpRequest: Don't wait for socket to be readable
The socket is a blocking one, which means Read() will block unless data
is available, thus WaitForReadable() is useless in this context.

Testing also shows a 2x performance increase from removing this call due
to poll() performance being botched when KDEBUG_LEVEL >= 2.

Change-Id: I3170f865e961112b420c1548726bb6fd38e94cb2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3078
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-25 18:13:20 +00:00
Leorize
846c12f5df HttpRequest: Use an ArrayDeleter to manage the temporary buffer
This make sure that the temporary buffer will always be deleted should
any premature return happens.

Change-Id: I448ec7c3f3eeca1ef2b6473b49323f34bcb7bf86
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3077
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-25 18:13:20 +00:00
Leorize
0d0f613f17 GopherRequest: Don't wait for socket to be readable
Instead we can trigger a Read() immediately, as our socket is blocking
and won't return until some data has been made available. This avoids a
potentially costly syscall in the loop body.

Change-Id: I899f55ede41af7cb7e9311aa04006b33c40d3ee4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3076
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-25 18:13:20 +00:00
Leorize
d64d305cf6 GopherRequest: Accurate progress reports and listener bugfixes
This commit brings the following changes:
- DownloadProgress() should now be reported for every DataReceived()
calls, similar to other BUrlRequest classes.
- Properly verify whether a listener has been set before invoking them.

Change-Id: I4ded82e318ba580b8869c3d1751da4e36882c39f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3075
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-25 18:13:20 +00:00
Leorize
2056d60ff1 DataRequest: Use ArrayDeleter to manage the temporary buffer
This simplify the clean up code path and make sure that the temporary
buffer will always be freed on exit.

Change-Id: I70c1a25bfa66c4f4a96dd3d0af3765a67e305fb2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3074
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-25 18:13:20 +00:00
Leorize
e1de8e8c21 DataRequest: More consistent progress report
Trigger DownloadProgress after DataReceived, similar to how other BUrlRequest
classes behave.

Change-Id: I4858c3736b1b1ebec55af9903dbfd4b976a77df3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3073
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-25 18:13:20 +00:00
Leorize
9e404c539f FileRequest: More consistent progress reporting
Make BFileRequest reports download progress after every DataReceived()
calls.

DownloadProgress() format has also been changed to use 0 as
`bytesTotal` when the total size is unknown. This is similar to
BHttpRequest functions currently.

Change-Id: I2920ea00c4f841bb666425be6f8da418e913c727
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3072
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-25 18:13:20 +00:00
Leorize
1f569db086 FileRequest: Make Stop() cancel the request as soon as possible
This commit implements a check for the flag raised by Stop() to cancel
a given request as soon as possible. Cancelled requests will return
B_INTERRUPTED regardless of whether the request has completed,
on par with how BHttpRequest is behaving at the moment.

Change-Id: Ia8a95b910cff158c710c5b2ed58b4675e705642e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3071
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-25 18:13:20 +00:00
Adrien Destugues
5b98fa06d5 input server and preferences: fix debug build 2020-07-25 15:18:04 +02:00
Autocomitter
873f56ec13 Update translations from Pootle 2020-07-25 08:17:15 +00:00
Kyle Ambroff-Kao
e0e5d12ea3 test/haikudepot: Fix build of haikudepottest.so
hrev54429 added some changes to logging in HaikuDepot which broke the
build of the tests.

The build for haikudepottest.so adds some cpp files from the
HaikuDepot source. Now that Logger::NameForLevel and
Logger::IsLevelEnabled are referenced in some of the code being tested
we need to include Logger.cpp as well.

This just adds Logger.cpp to the haikudepottest.so build.

Change-Id: I80a8bb2053c3c78d821ce3cf9902c3a42b0def37
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3056
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-23 07:23:37 +00:00
Michael Lotz
bfb040f065 hda: Use B_32_BIT_CONTIGUOUS when controller is not 64 bit.
This ensures that the allocated physical memory uses 32 bit addresses.

Also avoid writing to the 64 bit address registers when the controller
is not 64 bit.

Change-Id: I58008d68bcd9579903534f824db2660f73e39160
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3065
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-22 22:36:31 +00:00
Michael Lotz
71e84ce71a hda: Style cleanup only, no functional change.
Change-Id: Id36bf67a51369099093ae24412fa681f88c4c8d0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3064
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-22 22:36:31 +00:00
Michael Lotz
07edf62c0d hda: Reset streams before (re-)setting DMA memory addresses.
The spec says that changing the DMA memory addresses of a stream should
really only be done after a reset and before the first run. Stopping the
stream is not enough, as the controller is allowed to cache the
addresses even when the stream is paused.

Note that this is applied to both, the initial configuration of buffers
and to the case of dynamically changing stream parameters. In the initial
case this should always be a no-op as the controller was previously
globally reset.

In the dynamic reconfiguration case this fixes random memory corruption
due to the controller still accessing and modifying physical memory that
is released by the driver. With some controllers, such corruption was
easily triggered by changing the input and output sampling rates for the
HDA device in the media preferences.

The return value of the reset call is intentionally not checked to allow
for it to partially or fully fail. At least for HDA under QEMU, the
stream reset fails to start, while the initial stream stop still works
and prevents the memory corruption.

Change-Id: I7c6e6547ee08889a2990de26d5eed5e73b2ca13c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3063
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-22 22:36:31 +00:00
Michael Lotz
f010a08f9a hda: Make interrupt setup more conservative.
Don't unconditionally enable PCI interrupt generation as this only
applies when MSIs are not in use. Delay the evaluation and setting of
the interrupt disable bit until after it is clear whether or not MSIs
are to be used.

Initially force interrupt generation off as early as possible. Depending
on the initial state of the controller, some spurious interrupts might
come up and we really don't want them to occur before everything is set
up in the right way.

Change-Id: Ifb12f5eef1cbf8ecfa3f352564139125d8ad2169
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3062
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-22 22:36:31 +00:00
Michael Lotz
8d917e956a hda: Remove doubled and early put of gPCIx86Module.
This is already properly done in uninit_driver.

Putting the module in device instead of driver uninit meant that on a
device reopen the gPCIx86Module would always be gone and therefore MSIs
could not be used anymore even if they previously were.

Change-Id: Ib3bddefbe6bcb02fa1c97f3c843cecaf31c80e3e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3061
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-22 22:36:31 +00:00
Michael Lotz
4ba91f3460 hda: Unconfigure the MSI as well.
Just disabling it will leak the vector reservation and makes it
impossible to configure an MSI on the device again.

Also removes the check for the gPCIx86Module as having an MSI configured
really implies its presence.

Change-Id: I9f0e3e63c988af515d23ad93d86918cde9add97a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3060
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-22 22:36:31 +00:00
Michael Lotz
a95a2065d4 hda: Disable MSIs when installing the interrupt handler fails.
This was previously only done if reset failed.

Change-Id: I30ebe1d302087816bccfe67e3d236c9446425aea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3059
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-22 22:36:31 +00:00
Michael Lotz
3b12162731 hda: Wait for streams to actually start/stop.
In the start case this adds debug output in case a start fails.

For stops this makes sure the stream DMA engine has actually stopped
operating, which is a precondition for some other operations.

Change-Id: I0e2731513febd0e0cd4e1f0ef89cf3d7312a47e1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3058
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-22 22:36:31 +00:00
Michael Lotz
de2e028f80 hda: Factor out waiting for bits to be set/cleared.
It is a recurring pattern to set some bits, then wait for them to be
read as set or the reverse. For resets this is done once in both
directions, so factoring this out removes quite a bit of similar code.

No functional change intended.

Change-Id: I2ae4b6cce490c33e1a027328f01fbffea67c5180
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3057
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-22 22:36:31 +00:00
Adrien Destugues
12ef216972 build_haiku_image: no fs indices on CDs
The iso9660 filesystem does not support them
2020-07-22 17:48:32 +02:00
John Scipione
d6a8b3e805 FileTypes: ApplicationTypeWindow text view updates
Remove workaround for BTextView bug from 2006 that no long applies
in FileTypes ApplicationTypeWindow by allowing the text views to
align themselves on FrameResized().

Don't override height on version text views, default height is good.

Change-Id: I41e5a9244c5c79eee3bba133064d016673e008e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3053
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-22 13:58:58 +00:00
John Scipione
40f2d4634a DeskCalc: right-align ExpressionTextView
Change-Id: I8bfd34f2a0cf426a2286e9cdd5b96f1b8e122f2b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3052
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-22 13:58:58 +00:00
John Scipione
2eb1389dc1 Backgrounds: right-align X and Y position boxes
Change-Id: Ice9e51ca30235a6ec28a8a07cf3fea3da43f1414
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3051
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-22 13:58:58 +00:00
Suhel Mehta
788899a8c2 ufs2: All directories are read sucessfully.
Change-Id: I87d3d77d48396ecd0e8fa649169f6e899d161f66
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3028
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-22 07:42:04 +00:00
brjhaiku
f79386adb7 btrfs: partially implemented btrfs_write_stat
Change-Id: Ib17ef1467a320af6edc3739555ebfb3f46bcc98b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1640
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-22 09:32:36 +02:00
waddlesplash
4316066974 Revert "btrfs: partially implemented btrfs_write_stat"
This reverts commit f16979003a.

Reason for revert: Broke the build.

Change-Id: I60ed4a4c4532810c32c6c5029a21ba8d31f92aa9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3055
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-22 02:26:14 +00:00
Leorize
385d1b54e1 docs/user/net/UrlProtocolListener: document debug message types
Change-Id: If4143acaf2679a74e1a7e358452f9ae306449411
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2985
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-22 01:39:40 +00:00
brjhaiku
f16979003a btrfs: partially implemented btrfs_write_stat
Change-Id: Ib17ef1467a320af6edc3739555ebfb3f46bcc98b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1640
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-22 01:37:08 +00:00
CodeforEvolution
4c2a60b03d Icons: Add icon for wpa_supplicant
This was the last system daemon/server to not have an icon, so I thought I'd give a go at this!
This icon will still need to be added to Haiku's wpa_supplicant repository however.

Change-Id: Icd4e60ec759daaece30669aa8125fce953bbbf95
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2698
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-22 01:36:13 +00:00
Kacper Kasper
2775737e9d TextSearch: add option to set target to parent directory
Two usage scenarios:

* Wrong directory selected when invoking as Tracker add-on.
  I often find myself having TextSearch invoked on selected child,
  when I wanted it to open in parent context.
* Result was not found in target directory, so maybe the search
  should be broader.

Change-Id: I2621f3cec7459572ddae438de4ba42ce74432e28
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3044
Reviewed-by: humdinger <humdingerb@gmail.com>
2020-07-22 01:34:52 +00:00
Adrien Destugues
5b80a2fa0d build_haiku_image: don't recreate indices when updating
mkinex fails when the indices already exist.
2020-07-21 18:38:06 +02:00
Alexander von Gluck IV
a704a197f5 efi/devices: Skip qemu flash device for now due to crash
* An upstream bug exists which results in the tianocore
  bios crashing when attempting to read from qemu's
  (unconfigured, but present) flash device.

Change-Id: Ie9f02a290abc29cce3a5e279382750c0b14164dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3049
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-21 12:49:44 +00:00
Alexander von Gluck IV
9f30e61f95 efi/mmu: Add tracing, fix line widths. No functional change
Change-Id: I9fcd6790f7c7e8b9e12a3bc1a2c43cae091a11be
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3048
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-21 12:49:44 +00:00
Kacper Kasper
7d5ea15ee0 TextSearch: change Select all shortcut
Anecdotal: whenever I hit Cmd+A with text field focused I want to
quickly select search phrase, not the results. In fact I never found
myself in a situation where the latter is the desired outcome.
Change-Id: Ib5edcee8e7366485181cb2030ecfa989619cd600
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3043
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-20 14:03:38 +00:00
Augustin Cavalier
913f009e94 XHCI: Add a few comments and remove the documentation file.
The documentation file (which PulkoMandy only merged today) was created
over a year ago from a short conversation I had with him, and by now
a lot of its information is already outdated or has been merged into
comments in the driver already (specifically, the notes at the end about
error messages no longer apply as there are different ones, and the
bugs causing those errors have since been fixed.)

A few of the statements in it were not noted in the driver, though,
so I have added those as comments.
2020-07-19 15:44:58 -04:00
PulkoMandy
4aa9da6843 openboot: fix console to work on both serial and screen
- Use the correct escape sequence for reverse video
- The vertical form feed does not cleanr the screen on normal serial
  terminals, so additionally use the clear screen sequence
2020-07-19 19:30:39 +02:00
Adrien Destugues
5033d6898f SerialConnect: make reverse video work
It's useful to see our openboot boot menu.

I'm not sure what B_NEGATIVE_FACE is meant to do. The be book says
"Characters are drawn in the low color, while the background is drawn in
the high color.", but DrawString does not draw the background, so some
color swapping will still be needed in this case anyway.
2020-07-19 15:02:43 +02:00
Adrien Destugues
d74c554ce2 Time: remove unused sourcefiles. 2020-07-19 13:06:27 +02:00