Commit Graph

52158 Commits

Author SHA1 Message Date
Adrien Destugues
0d1f89e1a3 TranslatorRoster: avoid a deadlock when launching BeLive
If be_app is not running yet, trying to lock it may easily end up in a
deadlock.

Fixes #2105

However, as a result of this, when this situation happens, the
translator roster will not be node monitoring added/removed translators.
This was already the case if BTranslatorRoster::Default was called
before BApplication constructor, now it's also the case if called inside
the BApplication constructor or from another thread before it finished
running.

Maybe BTranslatorRoster should try to register itself later on if it
detects this. But it's acceptable to have the app not monitor
translators, because adding and removing translators isn't a very common
occurence and restarting the app to get it to notice them is probably
ok.
2020-08-05 15:39:19 +02:00
Adrien Destugues
9027ca04e2 Tracker: fix infowindow resizing
Fixes #16053
2020-08-05 14:40:06 +02:00
Adrien Destugues
2c09e0dc7f Installer: separate writing bootsector from other install finishing code
Remove the InstallerInitScript (it does nothing) and the
InstallerFinishScript (it does too many things). Instead implement the
finishing directly in Installer. Separate writing the bootsector, so
that the "write bootsector" menu writes only the bootsector.

Fixes #16303
2020-08-05 12:52:04 +02:00
Adrien Destugues
d077ef8a1a better error message when xsave context is too small 2020-08-05 12:31:10 +02:00
Adrien Destugues
b4b9e2089f libicon: reorder gradient stops when loading from BMessage
Some files have gradients stops stored in an incorrect order.

Fixes #14210
2020-08-02 17:42:44 +02:00
Adrien Destugues
e4c945bd5a Icon-O-Matic: fix filename length limitation
The code was using B_OS_NAME_LENGTH instead of B_FILE_NAME_LENGTH.
Use of BString allows to put the different sizes in a loop.
2020-08-02 17:27:49 +02:00
Adrien Destugues
1bad1ff34a Prepare for ICU update
- libicule and libiculx do not exist anymore in newer ICU versions
  (harfbuzz replaces them), but we didn't actually use them, so remove
  them from the build feature and from the package dependencies
- Add namespace usage marcos since the newer ICU packages put ICU things
  in a namespace, making it easier to have multiple versions of ICU used
  side by side.

No functional change intended, but this makes it possible to build the
code with either ICU 57 (for gcc2) or 66 (for other architectures).
2020-08-02 11:58:14 +02:00
Michael Lotz
b3aed2adb5 VMUserAddressSpace: Don't print unset reserved area name in KDL.
Reserved areas don't have the name field initialized, so explicitly
print "reserved" instead.

Change-Id: I26bcfcb8facb8b5df11a58074506e96a41943e31
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2847
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-08-01 19:23:27 +00:00
Michael Lotz
7d432fc911 VMKernelAddressSpace: Let Dump() print all ranges.
This makes the output of the aspace KDL command more useful as it shows
reserved and free ranges in addition to areas.

Change-Id: Id6353820b7c040fce6bfc3297c1b34adb1c9bb99
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2846
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-08-01 19:23:27 +00:00
Michael Lotz
2555f33549 Cleanup: Various comment and whitespace fixes.
Change-Id: I37c3e3346813efc595df651421b7e8ff4fbf3339
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2845
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-08-01 19:23:27 +00:00
Michael Lotz
b3bd66961a libroot/kernel: Implement MADV_FREE madvise() extension.
It allows an application to signal that it no longer needs the data in
the given address range and the underlying pages can be discarded and
reused elsewhere. This is finer grained than working with full areas
or mappings at a time and enables unmapping sections of partially used
mappings without giving up its address space.

Compared with punching holes into a mapping by "mapping over" with
PROT_NONE and MAP_NORESERVE, this has the obvious advantage of not
producing a lot of unused extra areas and saves the corresponding
resources. It is also a lot "lighter" of an operation than cutting
existing areas.

This introduces madvise() alongside the existing posix_madvise() to
allow for OS specific extensions. The constants for both functions are
aliased, the POSIX_MADV_* being a subset of the MADV_* ones without the
non-POSIX extensions. Internally posix_madvise() simply calls madvise().

MADV_FREE is commonly supported in other OSes with various subtle
semantic differences as to when pages are actually freed/cleared and how
or whether the pages are counted against the memory use of a process.
In the variant implemented here, pages are always immediately discarded
and memory counting is not altered. This behaviour should be considered
an implementation detail and may be altered later. The actual unmap and
discard could for example be delayed until pages are needed elsewhere to
reduce overhead in case of repeated discarding and remapping.

Note that MADV_FREE doesn't really align with the rest of the madvise()
API as it works like a command (i.e. discard these pages) and does not
add an attribute to the pages in the given range (i.e. mark these pages
for quick access from now on). As such, an MADV_FREE does not need to be
undone by setting a different advice later on, unlike how the other
flags work. This discrepancy may be the reason why it is not part of
POSIX.

Change-Id: Icc093379125a43e465dc4409d8f5ae0f64e107e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2844
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-08-01 19:23:27 +00:00
Michael Lotz
8e74e30784 kernel/vm: Add discard_address_range that discards pages.
Pages in the given range are unmapped and freed without getting written
back anywhere. It can be used whenever a caller does not care about the
data in the given range anymore and wants to reduce page pressure.

Change-Id: I8bcce68fab278efef710d3714677e1d463504a56
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2843
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-08-01 19:23:27 +00:00
Alexander von Gluck IV
c17fa27430 efi: Switch to direct EFI loader creation
* efi-app-x86_64 is a undocumented legacy compatibility
  target from the early days of EFI.
* This opens the door to native arm,arm64 loaders without
  the gnu-efi 'fake pe' stubs in the future.
* This change also clairifies what's happening within the
  undocumented efi-app-x86_64
* Future as in binutils fixing these:
  https://sourceware.org/bugzilla/show_bug.cgi?id=26206
  https://sourceware.org/bugzilla/show_bug.cgi?id=26218

Change-Id: I60b4a4f5ceb36059033debbe6bf5b01928d6b223
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3016
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2020-08-01 16:16:23 +00:00
Michael Lotz
de6a5cb90c Cortex: Fix buffer overflows in label truncation.
The label to be truncated was copied into a fixed width buffer without
taking the null byte into account which would make
BFont::GetTruncatedStrings() read out of bounds when the name got long
enough. The output strings were also not allocated with the required
extra space for the ellipsis which would possibly have caused the
output to overflow.

Since the goal is to truncate a single string, remove the entire
temporary extra allocations and simplify to use BFont::TruncateString()
directly, which avoids both problems by being BString based.

Change-Id: Ib57430faf6f706c705497191000ee9686441857e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3116
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-08-01 02:04:43 +00:00
Michael Lotz
6199db56e1 STXTTranslator: Fix use-after-free of encoding name.
The name retrieved from GetName() on BTextEncoding is owned by that
instance which goes out of scope when identify_text() returns. A const
char pointer to it can therefore not be used as an output variable. Use
a BString instead which ensures an appropriate reference is acquired.

Change-Id: Ib87fc9879d29e927bb41d1a9165ca7599b74a3bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3115
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-08-01 02:04:43 +00:00
Michael Lotz
75b8b6863a kernel: Return after panic when freeing invalid interrupt range.
The panic is continuable, but moving on with the free will overrun the
array and corrupt memory.

Change-Id: I9a5849a40158042150a25740ca57d711aee872bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3114
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-31 23:36:55 +00:00
Michael Lotz
4b6a48f4ae kernel: Check interrupt vector isn't assigned to a CPU on free.
If the vector is assigned to a CPU it means that the assignment
structure is still referenced from the CPU side and must not be reset.

This can happen when an interrupt vector is freed that still has a
handler installed, i.e. when the order of removing the handler and
freeing the vector is reversed.

Change-Id: Ib2dc5fa8f95a28b36e8f150dc8f16236ca4b2275
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3113
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-31 23:36:55 +00:00
Michael Lotz
d9ff5e5637 hda: Remove interrupt hanlder before freeing interrupt vector.
Freeing an interrupt vector that still has handlers is not allowed.

Change-Id: If2f256e5288c7a61b7e23bdb202f259f5b67b7ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3112
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-31 23:36:55 +00:00
Michael Lotz
c7c0cf726e multi_audio: Replace old buffer infos with old cycle numbers.
The old buffer info was not initialized so would possibly contain bogus
initial content.

Since the introduction of the TimeComputer, the old buffer info was not
used to update the timesource data and the only remaining use was for
keeping track of the previous cycle number.

Replace the old buffer info by just the old cycle number and initialize
that.

Change-Id: I8be5a17f086a9f81f9b8fd0629e10460518f3d8c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3111
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-31 23:36:55 +00:00
Emir SARI
24cc0d5a4a [Mail] Add ALT+, settings keyboard shortcut
Change-Id: I9af6ddf32dbaad5cf451ced5380ac63cf0eca3e6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3095
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-31 09:01:12 +00:00
Alexander von Gluck IV
312ace5631 bootloader/efi: Support 32-bit kernels
Change-Id: I82465c3002cbf58fad79b9621074cafd8fbd16e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3106
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2020-07-30 12:37:19 +00:00
Andrew Lindesay
fa5c8097c9 HaikuDepot: Languages List
Abstacts the list of supported languages into
the LanguageModel class preventing use of
List.  Also; fix a few cases where newer
logging techniques may have caused incorrect
logic flow.

Relates To #15534

Change-Id: I144fe4788abdaf0d93e53eeabc97b3f7aa2ec710
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3085
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-30 07:09:55 +00:00
Alexander von Gluck IV
861cf377b4 arm/efi: Add missing init_array to linker script.
* Nice catch mmu_man!
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770

Change-Id: I8512b32687a292427295bbaa3ebf60396eac300f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3105
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-30 02:01:30 +00:00
Adrien Destugues
b78a83eb29 app_server: Style fix 2020-07-29 20:13:58 +02:00
Adrien Destugues
fd3f9c4126 Allow setting a "full and half fixed" font as the system fixed font.
Fixes #14424.
2020-07-29 20:13:58 +02:00
Augustin Cavalier
d548fb2b3e Tracker: Rework BFilePanel compatibility code.
Instead of adding "dummy views", leave the original views intact
and just add a resizing hack to take care of any movements that
apps have inflicted.

Fixes #16411, a crash in WonderBrush, and compatibility issues
in some other applications.
2020-07-28 21:53:19 -04:00
Augustin Cavalier
494bd14713 HaikuDepot: Let BScrollView handle resizing the scrollbar bounds.
This way, it will also resize the views properly when the scrollbars
are larger.

Fixes part of #16408.
2020-07-28 21:06:03 -04:00
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
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
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
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
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
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
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
Adrien Destugues
98e5fab3f4 Locale: move "translate application names" checkbox to formatting tab
Part of #15511
2020-07-19 13:06:26 +02:00
Oishika Pradhan
bd514095bb Keymap: better default window size.
Use a larger default window size so the keymap is readable.
However, size it down on low resolution displays.

Fixes #14892

Change-Id: Id35c46fa14bef570f78d8f065d95f6e6d8f0c6d7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1312
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-18 19:37:17 +00:00
Adrien Destugues
24f8ae4156 DataTranslations: sort by supertype before name
Fixes #9618 (which suggested using a tree view, but I think that's not
useful, just proper sorting of the items seems fine to me)

Change-Id: Ie1298eec048f9cb42528b8420a91e807e8f00eab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3030
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-18 19:35:19 +00:00
Alexander von Gluck IV
ca7a630e20 kits/package: Break LibsolvSolver add-on out
* BSolver is implemented by solver add-ons
* We may want to (unlikely) leverage another
  package solver in the future.
* We may want to (likely) implement a dummy
  solver when libsolv is unavailable on new
  architectures without bootstrap.
* This also makes solving missing libsolv a little
  more graceful vs the "include "libsolv.h" not
  found.

Change-Id: Iedd9d0f022fb743c4c7606bd33a4b6dbef0576f7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/819
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-18 18:17:48 +00:00
Adrien Destugues
c5aa9dfb4c Create filesystem indices when creating Haiku image
Fixes #4424.

Change-Id: I737ee4f9bb70ce48c0c94f3a862a3073da8c0c4d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2796
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-07-18 14:00:10 +00:00
X512
77912444b8 Tracker: fix ScrollIntoView
Same problem as in BListView::ScrollToSelection.

Change-Id: I1cd26190566b1808f47475c1499298b66549f024
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2312
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-18 13:58:28 +00:00
Adrien Destugues
06b2ce5412 FirstBootPrompt: update welcome text.
Change-Id: Ibc8b051cd183a1184d62af264e0a42815e952f99
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2545
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-18 13:47:29 +00:00
X512
c3a6a6b6ee mime_db: add BPicture type
Change-Id: I69948b04e6c1b19165a51cd0eb999591da4efccb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2828
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-18 13:41:31 +00:00
X512
f27269a67d MediaPlayer: fix reporting wrong format
Now it allows to connect MediaPlayer video producer to differnt node in Cortex.

Change-Id: I7ee598ea64d10e8fa876259e7a4480a650a0e189
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3034
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-18 13:25:09 +00:00
Andrew Lindesay
f96d1f4d92 HaikuDepot: Better Logging
Changes the logging in HD to use a macro for the
various log levels to declutter the code and to
make it easier to more systematically log.

Change-Id: I025970707a0a11e7e3aaa4b52fc91288af0183f5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3018
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-15 08:34:22 +00:00
Adrien Destugues
c916010e87 Add a NULL check in strtol.
The spec says this is undefined behavior, but it will fix one more
problem with #8297

Change-Id: Ibc15f306c92b05019de1050a9eb239ba57b1a91e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3029
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2020-07-13 19:34:09 +00:00
Adrien Destugues
15ba64aaa3 Unify Settings menu shortcut
Use , as the shortcut key for settings in all built-in apps. Some used
S, but that's already the shortcut for saving. , is the recommended
shortcut in the HIG already, but built-in apps were not updated to
match.

Fixes #11733.
2020-07-13 20:53:45 +02:00
Adrien Destugues
d594bd97d3 MIME db: make video/ogg sniffing more specific
Check the codec in the first Ogg page for known video codecs. If none is
found, the file will be identified as audio/ogg instead.

Fixes #8702.
2020-07-13 18:09:12 +02:00
X512
36ef16bf08 BGradient: add Flatten, Unflatten methods
Change-Id: I861bab8ae19628d34297c294fd6ce3e5b6c82b34
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2827
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-13 15:35:38 +00:00
X512
4399ec510d BPicture: add fill rule support
Change-Id: I068e1c2e8659f7b90c6d7c7331a8bb25ae343fe9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2922
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-12 19:44:43 +00:00
X512
90ab1a44ad BPicture: add gradient support
Fixes #9680.

Change-Id: I0013326559cc40ff26cf7b44794c0b32aea832ba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2829
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2020-07-12 19:44:43 +00:00
Adrien Destugues
10b294d85b Media Kit: use the B_WRITABLE flag in plugins
The ffmpeg plugin reports some formats as read-only. But the media kit
included them in the list of writable formats anyway.
2020-07-12 21:17:03 +02:00
Adrien Destugues
eff77d18c7 ProcessController: use a single menu item for scheduler modes
Following the HIG, a single toggle item is enough as there are only two
states.

Fixes #10709
2020-07-12 19:44:55 +02:00
Adrien Destugues
4ad808b67d app_server: Fix clipping computation in DrawArc
The clipped rect was extended with the stroke width, and then the result
was overwritten.

Fixes #3130.
2020-07-12 13:11:11 +02:00
Adrien Destugues
c97647019c Fix localization in Web+ download window.
Fixes #16391
2020-07-12 12:06:22 +02:00
Michael Lotz
b0a3a5c9bc freebsd_network: Handle 64 bit memory BARs.
This adds the upper 32 bits for address and size.

Change-Id: I2f776c7b8b72ecefca9f3b93d9c42912666a41e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3026
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-11 23:31:06 +00:00
Michael Lotz
8827bb6d89 freebsd_network: Apply empty size and type check to IO ports.
Factor out the conversion to BAR index and hand the pci_info to both
memory and IO port allocation functions. Then apply the same checks
in the IO port case as are done for memory.

This aligns with what is done on FreeBSD.

Change-Id: Ib4bd28fd861959a467ba676de22efb1f97e5a27c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3025
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-11 23:31:06 +00:00
Michael Lotz
733e150b74 drivers: Fix 64 bit BAR checks and remove redundant masking.
Fix address type mask to use the right bits via PCI_address_type. The
previous 0xc value applies to the upper of the two address type and
the prefetchable bit instead of the two adddress type bits. This would
cause prefetchable 64 bit BARs to be misidentified as not being 64 bit.

Remove address masking as this is already done on the field in pci_info.

Use uint64 instead of phys_addr_t explicitly as on pure 32 bit platforms
this would otherwise result in a shift greater than type size.

Note that the sizes should theoretically be adjusted as well, but in all
of these cases a size needing the upper 32 bits doesn't make much sense.

Change-Id: Idd0d6e9a6cc18656b43cafcac720b132fc1f2ad3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3024
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-11 23:25:44 +00:00
Michael Lotz
74c9e88b75 pci: Cleanup, no functional change intended.
Make mandatory argument of _GetRomBarInfo a reference too and use NULL
instead of 0 for pointer argument default value.

Some line length cleanup.

Change-Id: I1bdb59eeae4496b75fd4a1b8c5b305283da266f9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3023
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-11 23:25:44 +00:00
Michael Lotz
0615a177b7 pci: Rework 64 bit base address register handling.
This moves the entire 64 bit handling into _GetBarInfo() and applies it
to the PCI address and size too. Previously only the RAM address was
handled for the 64 bit case.

Also fixes the 64 bit check to be done after the type determination.
Previously it would theoretically be possible for an IO BAR with the
lowest address bit set for that type (bit 3) to be mistaken to be 64 bit
and then skipping/mishandling the next BAR. Due to alignment this would
have needed to be a 4 byte IO BAR though.

This also corrects the limit for 64 bit BARs of type 1 devices. As there
are only two slots, only slot 0 can be 64 bit.

Also removes a copy&paste error that would lead to the high address of
64 bit BARs of type 1 devices to get taken from the h0 instead of h1
struct, corrupting its value.

Make the mandatory arguments to _GetBarInfo() references to make the
distinction more obvious and replace 0 with NULL in the default values.

Change-Id: Iae59f2875c93f15411a4d9791e71e69ba7a42287
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3022
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-11 23:25:44 +00:00
Augustin Cavalier
7d1a9d7874 atheroswifi: Enable 802.11n and "AR5416 interrupt mitigation."
FreeBSD apparently enables these options by default.

This should enable support for 802.11n (i.e. HT mode) on Atheros
chips that support it, of which there are quite a few.
2020-07-08 21:30:20 -04:00
CruxBox
9593c05ac5 xfs: An attempt to read block directories
Map entries can be read, most structures are in place. Next is to
actually work with the directory block.

Change-Id: I700ee2e003bdef97838b1f06a95e53a5e4293658
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2981
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-08 06:23:24 +00:00
CruxBox
a060fa968e xfs: Read Short Form Directories
We can now read short form directories.
Change-Id: I23eb6ef52e8bb07643213e603ed0185f536c649f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2952
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-08 06:23:24 +00:00
Augustin Cavalier
21e213d3b0 CodyCam: Use "%s" instead of printf'ing a buffer directly.
Fixes #16375.
2020-07-07 20:44:08 -04:00
Augustin Cavalier
e6c710f4bb Tracker: Set a minimum size on the count view...
...when it is paired with a horizontal scrollbar. This has the
added benefit of restoring the previous horizontal scrollbar size,
it having been lost in the prior refactor due to the "container views"
removing 2 pixels for the borders (previously, there was a different
sizing system for the count view that provided it.)

Fixes #16368 item 1.
2020-07-06 23:40:55 -04:00
Augustin Cavalier
c0a15174a6 Tracker: Restore prior text-rect bounds in the count view.
The one-pixel offset greatly improved the text alignment under HiDPI,
but degraded it on non-HiDPI. I guess one pixel really does make
that much of a difference; so this will have to be revisted.
2020-07-06 22:34:13 -04:00
Augustin Cavalier
94cc40b15e Tracker: Add a minimum font size for the count view.
Based on the logic from the title view.
2020-07-06 22:23:36 -04:00
Augustin Cavalier
df2e6c7a52 Tracker: Force the horizontal scrollbar to always be the preferred size.
See inline comment. Should fix second part of #16368.
2020-07-06 22:18:28 -04:00
Augustin Cavalier
f82f94ef79 Tracker: Remove partial support for custom fonts in PoseView.
BFont is by default bitmap-spaced, so we do not need to make
a new font just to add bitmap spacing. The rest of the code
assumes in places that we have the same general characteristics
as be_plain_font anyway, so having these bits of code does
not make a lot of sense.

Also correct the list element height computation to now just use
be_plain_font directly, which will work even when this is the first
PoseView created (i.e. before the font height has been read.)
2020-07-06 22:09:02 -04:00
Augustin Cavalier
76fcfb697e Tracker: Remove extra space between pose controls and buttons.
Now that the scrollbar is part of the pose area, we no longer
have to include its height in the spacing of the pose view
from the buttons and the bottom of the window.

Mentioned by X512 in #16368.
2020-07-06 21:52:47 -04:00
Augustin Cavalier
8539dfdac2 BScrollBar: Use the minimum as the preferred size in the alternate axis.
This was the behavior before the commit yesterday that unified the
two methods of computing the preferred size. It seems some applications
expect this to be callable without a window lock, so this works when
the other method does not.

Fixes #16372.
2020-07-06 21:40:51 -04:00
Niels Sascha Reedijk
840f23676c SoftwareUpdater: Use translated application name for notification group
Fixes #16129

Change-Id: I9e12d647bc0c8b6e54297e75642a5800613f26ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2994
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-06 14:09:27 +00:00
Alexander von Gluck IV
b0f530bada efi/devices: Improve tracing, no functional change
Change-Id: Iefb4da99d148f9328a3bbfdf1bbeaec8cf97648a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2993
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-06 13:55:16 +00:00
Alexander von Gluck IV
3853f36288 radeon_hd: Cram in a bunch of new PCIID's
Change-Id: Ifbd82ef7bfc2c39b2aeb5c25be177421cd22d246
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2920
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-06 06:39:11 +00:00
Augustin Cavalier
c70ec71d0c freebsd_network: Move ticks/seconds conversions to sys/time.h and
rename.

They now match the names they have in FreeBSD.
No functional change intended.
2020-07-05 21:16:32 -04:00
Augustin Cavalier
17af7f6298 idualwifi7260: Re-enable multiframe RX.
It no longer causes KDLs; probably the fix for the use-after-frees
on 9xxx devices also fixed whatever caused this problem.
2020-07-05 21:10:32 -04:00
Augustin Cavalier
549e16ed2e Tracker: Remove scroll bar width from the right margin in file panels.
No longer needed, the layout will take care of this now.
2020-07-05 21:07:30 -04:00
Augustin Cavalier
749fbae043 Tracker: Fix PoseView list item height computation.
This gets list item margins on HiDPI much closer to their standard-
DPI counterparts.

Fixes #16178.
2020-07-05 21:02:24 -04:00
Augustin Cavalier
ec25a0451d Tracker: Eliminate the fixed count-view size altogether.
This moves the scroll bars and the count view into the layout
inside FilePanels, so more shim views for compatibility are now made.

Fixes #13179.
2020-07-05 19:44:19 -04:00
Augustin Cavalier
58f263a2c5 Tracker: Remove usage of hard-coded count view size in ContainerWindow.
This makes the count view width, height, and font size properly
proportional in the container window. BFilePanel is not yet
fixed however.
2020-07-05 19:14:52 -04:00
Augustin Cavalier
bdfb3cd7cd BScrollBar: Report a more correct maximum size.
This way, BScrollBar will now be scaled appropriately when used
within layouts, as it is in e.g. Tracker.
2020-07-05 19:07:44 -04:00
Augustin Cavalier
b29bb4bec5 BScrollBar: Apply font scaling to preferred sizes.
As BScrollView has already been adjusted to use this, most applications
will now have properly scaled scrollbars on HiDPI systems.

All unadjusted controls and applications will still be able to use
the hard-coded constants as before, but these should eventually
be deprecated altogether and then removed.
2020-07-05 18:37:48 -04:00
Augustin Cavalier
b022a5e224 BScrollView: Ask the BScrollBars what their preferred sizes are.
This replaces the use of the hard-coded scroll bar size constants
and instead asks the scrollbars for their preferred sizes directly.

Right now, this is a giant no-op since BScrollBar just returns
the same hard-coded size when asked. The next commit will, however,
change that.
2020-07-05 18:37:48 -04:00
Augustin Cavalier
9481a1ec39 BScrollBar: Unify PreferredSize computations.
Reduces code duplication. This should not significantly affect
actually computed sizes.
2020-07-05 18:37:48 -04:00
Augustin Cavalier
9fe3529f3e BScrollBar: Remove DISABLE_ON_WINDOW_DEACTIVATION constant.
It was always enabled, and disabling it would break ABI.
If we want to make it disable-able, it needs to be a setting,
but I don't really see a reason for that.
2020-07-05 18:37:48 -04:00
Augustin Cavalier
e9815ed8b6 BScrollBar: Move SCROLL_BAR_{...}_KNOB_SIZE constants into the source.
They were not used anywhere else in the tree anyway. Resolves a TODO.
2020-07-05 18:37:48 -04:00
Leorize
a3f0ca5023 tests/system/kernel/vm/Jamfile: remove non-existent
This non-existent file causes unittests builds to fail.

Change-Id: I0ea2164487279fefcbc9e5c930440db3f2e6ccb9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2969
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-05 21:16:20 +00:00
Andrew Lindesay
9295c1f645 HaikuDepot: Url -> Identifier
This change will rename the confusing "url" within
HaikuDepot to be "identifier" in line with
corresponding changes in pkg kit and HDS.  Also at
the same time support is introduced for HDS
repos' meta-data to artificially match against
multiple repos; as requested for the future R1B3
release process.  Some tidy-ups and extensions have
been made to the JSON schema-to-model and the
schema-to-parser scripts.

Change-Id: I402e7d610986039f58d72028bda7de977e9115e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2986
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-05 09:41:54 +00:00
Andrew Lindesay
66a4cd11c2 HaikuDepot: Custom List Removal
Remove use of custom list class where it is not
really required.

Relates To #15534

Change-Id: I4bdc258a64055b6e36c7be93672c52d0499e512b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2991
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-05 09:13:38 +00:00
Augustin Cavalier
981f67b9c8 BAlert: Add cast to appease GCC2. 2020-07-04 19:35:20 -04:00
Augustin Cavalier
9a0cae9d28 BButton: Use BControlLook for label spacing instead of a constant.
This gets button proportions under HiDPI much closer to the ones
under a default font size. Still not quite there yet, though.
2020-07-04 18:43:30 -04:00
Augustin Cavalier
2d68cd06c7 HaikuControlLook: Scale frame insets.
This is a pretty simple change, but has a noticeable effect
on insets throughout the system under HiDPI.
2020-07-04 18:42:45 -04:00
Augustin Cavalier
cf7c2ea69d BMenu: Make margins/padding more HiDPI-aware.
This greatly improves the appearance of menus under font-scaled systems.
The computations are written such that the margins should be unchanged
under a 12pt font size.
2020-07-04 18:19:26 -04:00
Augustin Cavalier
99e4ca5fc7 BAlert: Use factional scaling for icons.
The behavior of not making the icons smaller than their default
pixel size is (for now) kept, but when making them larger,
fractional scaling is now used.

This makes alerts look much better on my system, which has a font
size of 18 (i.e. 150% normal, so 32px -> 48px.)
2020-07-04 17:57:06 -04:00
Alexander von Gluck IV
89fd39f42a efi: Refactor CPU code to be arch-specific
* Migrate some platform agnostic architecture code into
  boot/arch from efi/arch. This helps to avoid conflicts
  between kernel and boot sources as well.
* Conflicts between arch_cpu in efi and kernel code means
  bootcode really should *never* directly use kernel arch
  headers. (other platforms don't, which is why they don't
  have this same issue)
* We carefully thread any needed kernel headers (namely
  assembly helper macros) into the bootloader headers without
  mixing in the whole conflicting kernel/arch headers.
* ARM now properly get its cpu init code called, and we
  progress further into the EFI bootloader.

Change-Id: If67ec9758b5ce68563ebd9eb45d5196401911c67
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2975
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-04 21:04:20 +00:00
JadedTuna
1f2666fd48 preferences/screen: Call _UpdateActiveMode after brightness is reset
* Make sure brightness is reset to properly disable the Revert button.

Fixes #16354

Change-Id: I4551e809db316db05f3fd9db361b8703d149a88b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2989
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-04 16:50:51 +00:00
X512
d9d96260e0 BMenu: speed up deleting items
Fixes #16336.

Change-Id: Ie941f45f363f6fe94062fc3acb8bd3bb876c1f1e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2976
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-04 16:49:55 +00:00
Suhel Mehta
239a1c3561 ufs2: implementing open_dir and read_dir function
Root directory is read sucessfully.

Change-Id: I8bdc8c1a52edb679a6cb4b5f70e7f42eb2b2c8f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2907
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-03 19:21:06 +00:00
Augustin Cavalier
657f041aee fnmatch: Replace BSD implementation with musl one.
The BSD implementation was under the Advertising Clause,
so we might as well take the opportunity to replace the
implementation entirely with musl's.

Header also rewritten to be a Haiku one; the constants
are left unchanged of course.
2020-07-03 15:09:33 -04:00
Augustin Cavalier
ebffd73fc5 arpa/nameser.h: Cleanup.
* Remove functions not even FreeBSD defines.
 * Remove dependency on unnecessary headers.
 * Update copyright headers to match FreeBSD's; includes
   removal of the advertising clause.
 * Move some private structs to netresolv port_before.

Unfortunately, it seems musl implements very little of this file,
so we may wind up sticking with netresolv for its implementation.
2020-07-03 14:27:17 -04:00
Kacper Kasper
2899294cf1 app_server: Fix assert in DrawStringDry
Change-Id: I58b86860367df86b77bbdffadeff9843c9c8ab11
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2958
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-03 08:15:17 +00:00
CruxBox
7e1b5cf809 xfs: An attempt at reading shortform dir
This patch gets read_dir, lookup and few others to work. Entries cannot
be listed yet except the root.

Change-Id: Ic4b7b61a794a1b75849e45777a383b3315b15aa8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2915
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-03 08:13:27 +00:00
waddlesplash
66f0993a1b Revert "BMenu: fix memory leak in scripting"
This reverts commit fb44a1cd72.

Reason for revert: may cause UAFs

Change-Id: I315ce4fc5cd1706ca07e7062fc0461b7fff7c831
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2980
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-03 03:02:12 +00:00
Augustin Cavalier
1eabd14811 Network: Update DNSSettingsView after previous API deprecation.
Create a res_state on the stack and initialize it instead of using
the private API.
2020-07-02 19:35:07 -04:00
Augustin Cavalier
1a3518cf75 Add missing includes after previous commit. 2020-07-02 19:34:54 -04:00
Augustin Cavalier
d91d9fe552 netresolv: Use a copy of resolv.h internally.
The next commits will remove libbind-isms from the public resolv.h,
which netresolv still uses, so it will need its own copy to continue
building.
2020-07-02 18:52:38 -04:00
Augustin Cavalier
22a5213517 padblocker: Remove unneeded SetSubDirSupportedPlatforms... 2020-07-02 18:52:01 -04:00
X512
fb44a1cd72 BMenu: fix memory leak in scripting
Change-Id: Ia283594a622f758189cc8280683a4e068ae1f3af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2978
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-02 19:26:49 +00:00
Alexander von Gluck IV
b4e10d71e6 arm64: Attempt to build efi bootloader
Change-Id: I90a9440898994459f8d6de922a3f363fbeddaaf4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2974
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-01 13:47:07 +00:00
Humdinger
a4462d205d ShowImage: Reset slide show delay if a user interferes
This change resets the delay when the user moves to next/previous image or
page within an image (e.g. TIFF) or deletes an image while a slide show is
running.

Fixes #16321
Change-Id: If0b8f4caef9c6aa4c0ad5bbb01d65bf43c1f831f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2967
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-01 12:35:51 +00:00
François Revol
4bfd65a2b7 system/boot: Fix relocations in ARM EFI loader
The .rel.* sections were forgotten in the PE binary, so we just put them in a single .rel

Change-Id: I7bc564e18ec8dd64410b43106272ee74696c2883
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2973
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-06-30 16:25:07 +00:00
Kacper Kasper
009df98c86 app_server: Fix gcc2 build 2020-06-29 19:44:57 +02:00
Humdinger
72fcffef9d Installer: GUI change initialize -> format
DriveSetup terminology was changed a while ago. Disks get 'initialized'
with a partition map. Partitions are 'formatted'.

Change-Id: I600145cdd1ed622378d364aa66a6146aae4a9a87
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2968
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-29 17:20:21 +00:00
Alexander von Gluck IV
595b4d406e efi: Ensure MultiBootSubDirSetup runs in arch directories
* Otherwise, important HAIKU_BOOT_* flags don't make it into
  the build commands.
* Ensure any external sources used by EFI get recompiled
  vs reused due to potential differences in wchar length
  (EFI dictates short-wchar, but no wchar's in our code)

Change-Id: I7a4a0347d39239c73fa510378e048f51be1cd360
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2965
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-29 16:20:37 +00:00