Commit Graph
57772 Commits
Author SHA1 Message Date
Humdinger 3e6f397911 Web+ DL-window: fix scrollbar alignment
Similar to the vertical scrollbar, the horizontal scrollbar
needs to be tweaked to fit nicely into the window.

Fixes #19890

Change-Id: I2ad6cc4b948546d509fd697afb9d7df4fd9fc68f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10227
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: Joachim Mairböck <[email protected]>
2026-01-17 09:19:17 +00:00
Jérôme Duval ac508fcb4a tcp: _Receive: reset connection when received another ack packet
while finish acknowledged and zero receive window.

* SendQueued: try to get window update when send window is zero.
* Golang test TestServerGracefulClose now passes.

tcp_receive_data generates a RST packet with a random sequence, etc.
with _SendReset, the actual connection will be used to generate the segment information, like Linux, ie:

18:07:17.657812 IP localhost.localdomain.40009 > localhost.localdomain.40034: Flags [R.], seq 184, ack 69632, win 0, options [nop,nop,TS val 34750 ecr 33649], length 0

instead of:

18:10:50.816193 IP localhost.localdomain.40051 > localhost.localdomain.40062: Flags [R], seq 1736711, win 0, length 0

Change-Id: Ib621605f74cb6d1cbc2add050bcddbf471402254
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10223
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-01-16 17:42:33 +00:00
Augustin Cavalier c30e5cf106 libroot/locale: Allow global locales to be applied to the current thread.
I added this assertion thinking it would incorrectly override
thread locales, and that invocationns this way would be a bug.
Instead it appears that this is the expected behavior in select
circumstances.

Fixes #19896 and other recent regressions.
2026-01-16 12:33:14 -05:00
Augustin Cavalier c329ad53b1 libroot/musl: Check gmtoff before returning timezone names.
And add a fallback for GMT.

Improves the situation in #18471.
2026-01-15 19:18:05 -05:00
Augustin Cavalier 7b94842122 ICUCtypeData: Fix MB_CUR_MAX under most encodings.
See inline comment.

Fixes #19881.
2026-01-15 18:48:10 -05:00
Augustin Cavalier f1ca09f6a2 ICUCtypeData: Use U16_APPEND rather than implementing our own version. 2026-01-15 18:48:10 -05:00
Augustin Cavalier 9be2b373d3 locale: Refactor ctype storage and consolidate some files.
* Drop the global definitions from ctype.h, and move them to
   the internal LocaleData.h: the functions should be used always
   when building new applications (as they're thread-safe.)

 * Make __ctype_get_mb_cur_max thread-safe and move it to live
   alongside the other __ctype...() methods.

 * Put the __ctype...() methods in two files, clearly indicating
   versions: ctype_loc_global for the global (non-thread-safe) versions,
   used for the kernel, and ctype_loc_thread for the libroot versions.

 * Consolidate more internal functions into LocaleInternal.cpp.
2026-01-15 18:48:10 -05:00
Augustin Cavalier 2d20dfef26 libroot/locale: Consolidate some headers.
No behavioral change intended.
2026-01-15 18:48:09 -05:00
Kacper Kasper fa4502cdb5 Fix unit tests to work with test_app_server
* Test suite runs to completion (with failures).
* Observed sporadic hang in "BMessageQueue::Concurrency Test #1
  (with list)".
* Disabled Deskbar tests because they can mess up system's Deskbar.
  Something like test_app_server needs to be provided.
* Disabled B_CMAP8 conversion tests due to #19885.
* Fixed typo in variable names in haikudepot Jamfile.
* "TARGET_PLATFORM=libbe_test jam -q install-unittest-libs" should
  prepare complete testing environment.

Change-Id: Ie73fc3aaec5e6f73e310421404acda08f0b7faf4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10224
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2026-01-12 22:45:52 +00:00
Jérôme Duval e4b96f0721 libnetwork: use inet_net_ntop and inet_net_pton from OpenBSD
* also used by FreeBSD, they are maintained.
* adjust port_before.h after the musl switch
* tested OK manually with the FreeBSD tests

Change-Id: Id6555aecd4df742d4762d54dd1393f05656793a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9711
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2026-01-12 13:08:22 +00:00
Humdinger 4531c92b2e Mail: Keep status going to prev/next message with SHIFT
With this change, when you hold SHIFT when going to the next email
message - either by clicking the tool bar icon or pressing
ALT+CursorUp/Down - the current email is closed while keeping
its status.

Saves doing ALT+SHIFT+W to keep the status and having to go to the
next email message and open it manually.

Change-Id: I21cbb042403ba84d8992e9e0878f428e38c5604c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10210
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2026-01-12 13:00:19 +00:00
Jérôme Duval 69e473411e tcp: fix RFC reference
Change-Id: Icfcec5122745035cd6b5cb3d53e69fcc48bbbe73
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10222
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-01-11 09:59:53 +00:00
Emil Ahlbaeck ce90f34d28 WebPositive downloads: Handle large filenames by horizontal scrolling
Fixes #6622

Change-Id: I3cc993a2ba612a9440a49f6c2d65ea02074ad17a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2946
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-01-10 17:29:54 +00:00
Humdinger 2ee8a1ac06 DriveSetup: minor GUI string changes
* Use B_TRANSLATE_SYSTEM_NAME in BAlert title.
* Put filenames in quotes when spaces in filename could be
  confusing.
* Avoid a space at the endof a string where it could be overlooked
  ("Error:").

Change-Id: I7a705f4c36cbfcf27e69994b8f2126b7f6807363
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10221
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2026-01-10 17:17:07 +00:00
X512 5be8e81fc8 app_server/AS_GET_BOUNDINGBOXES_STRINGS: store each array independently
Do not use array interleaving.

It is more consistent and removes special case for protocol definition
driven inspection tools.

Change-Id: I5034e344c2c8611d21f8809dd67acc4864dd1d3e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10214
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-01-09 21:30:25 +00:00
Niklas Poslovski a9eae2a658 df: Rework formatting, implement POSIX required flags
POSIX flags:
- -P for a fixed format usable in scripts with only some fields
- -k for kilobytes (the default for -P is 512 byte blocks). Rename -b to -k accordingly
  and implement a new -b to force 512 byte blocks

Default format rework:
- Add usage percentage
- To keep things under 80 columns, use two lines per device: the first
  shows the mountpoint and the second shows the details.
- Mount point is shown in bold and other fields are indented

Change-Id: I33843caf67ff01509ce38bf0b5fdd18517ea1aa9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9276
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2026-01-09 20:40:50 +00:00
Humdinger b34fdb5655 DriveSetup: More correct translation behavior
The application name should never appear in a translatable string.
Otherwise it will always show translated in the app, even if the
user configured the Locale prefs to not "Translate app and folder
names".
Always concatenate the B_TRANSLATE_SYSTEM_NAME'ed string.

Change-Id: I511c870bef6efc11dbde52203ecd411c2009495b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10218
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-01-09 20:34:06 +00:00
SED4906 d8170f6469 DriveSetup: show status of disk image operations
Change-Id: Ic31bca9f54599e0df0fef461e9da3c3c51ab53ff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10217
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2026-01-09 20:33:42 +00:00
Kacper Kasper 7c9ee88078 app_server: Remove special case for fully opaque layers
* Fixes #19871.

Change-Id: I4b74dc9fae512530ed1d0bec74d73c24c6a99ea3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10212
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2026-01-09 19:08:35 +00:00
Augustin Cavalier 256ab7351b libroot/posix: fchdir() should not accept AT_FDCWD.
It doesn't make sense to change directories to the current one.

Should fix #19059.
2026-01-08 18:21:06 -05:00
Augustin Cavalier 988d9d80b1 kernel/fs: Check O_DIRECTORY in the VFS, not filesystems.
Just like O_NOFOLLOW. Also drop the now-redundant checks from
all filesystems.

At least some filesystem hooks (FIFOs in particular, see #19879) did not
check this, so this fixes them.
2026-01-08 16:34:51 -05:00
Augustin Cavalier f1f209415b kernel/fs: Relocate and consolidate open mode checks.
* get_new_fd is actually too late for the O_TRUNC one: we will
   have already called the vnode open() hook by then. So, we
   need to do that in open_vnode.

 * Move checks to a new static helper method, and invoke it
   in all relevant places.

 * Delete now-redundant O_NOFOLLOW checks.
2026-01-08 16:31:21 -05:00
Augustin Cavalier 7d234f26de strtok_r: Include features.h and reinstate "restrict". 2026-01-08 15:48:50 -05:00
Christof Meerwald 5fed29dcb0 IPv6: implement multicast support
* Copied and adapted deliver_multicast from IPv4

* However, we still need special handling for the Neighbor Discovery
  Protocol as there is no associated socket. So for now we just pass
  any multicast ICMPv6 packets to the ICMPv6 module's receive_data
  that in turn passes it to the NDP module.

Change-Id: Idc9db0ec2132dffcf65c3b767dd1e428c44b27ba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10169
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-01-08 20:17:42 +00:00
Augustin Cavalier 04ebf3d669 libroot: Appease GCC2 for strtok_r. 2026-01-07 18:23:43 -05:00
Augustin Cavalier da0529e546 kernel/team: Add set_foreground_process_group failure case with EPERM.
As specified in POSIX.

Fixes Sortix os-test/tcsetpgrp-wrong-session, part of #19877.
2026-01-07 18:18:36 -05:00
Augustin Cavalier 713e7b2c54 locale: Implement getlocalename_l.
Specified in POSIX-2024.

GNUlib currently has a nasty Haiku-specific hack to implement
equivalent functionality; after this it should be able to use
this function instead.
2026-01-07 16:27:46 -05:00
Augustin Cavalier 571ec77bf1 kernel: Add new strtok_r.c to the Jamfile. 2026-01-07 16:05:27 -05:00
Augustin Cavalier 95b41d5986 libroot/posix: Replace strtok_r with musl's.
And rewrite/cleanup strtok.c also.
2026-01-07 16:04:18 -05:00
Augustin Cavalier ac46a180d8 kernel/fs: Check if the existing node is a directory in create_vnode.
Otherwise, calling open(O_CREAT) on a path that exists but is
a directory will succeed.

Fixes Sortix os-test open-tmpdir-rdonly-creat. (Interestingly
many other OSes also fail this test; only Linux, FreeBSD, Solaris,
and Sortix, and now also Haiku, properly return EISDIR.)

While at it, fix the doc comment, which appears to have been
copied from open_vnode.
2026-01-07 14:02:46 -05:00
Humdinger a75b98ed11 DriveSetup: Use clearer file dialog titles + button labels
It's a good idea to be more descriptive in those file dialogs'
window title and button labels. That way you can be sure the
file dialog does what you intended.
Esp. using "Write" for the button that starts writing an image
onto a volume.

Change-Id: I0ddb71aae1962d107b8d848d772541366c6bba36
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10215
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-01-07 17:49:52 +00:00
Augustin Cavalier a76a638355 uname: C89 fix to appease GCC2. 2026-01-06 19:57:18 -05:00
Augustin Cavalier d763a3829a semaphore.h: Add SEM_VALUE_MAX.
It's specified in POSIX, and FreeBSD puts it in this file.

Distinguish it from _POSIX_SEM_VALUE_MAX (which is really a
"minimum value this can have" as specified in POSIX.)
2026-01-06 19:40:23 -05:00
Augustin Cavalier ca5c5d531e unistd: Add _POSIX_DEVICE_CONTROL.
We have posix_devctl, so we should declare this now.
2026-01-06 19:38:49 -05:00
Augustin Cavalier f869860377 kernel: Return B_HAIKU_VERSION for kernel_version & handle it in uname().
We have returned "1" here since this code was originally written
in 2004 (hrev7290). BeOS R5 apparently returns "1000009" for this
value, while the Be Book gives no details about what this value means.

So, return an actually useful value of the Haiku version, and then
in uname() process this to return a string indicating the Haiku
version. This makes "uname" print the actual system version,
not just the hrev.

It appears Linux and other systems give non-integer values in
info->release, so this should be fine.

Fixes #17030.
2026-01-06 19:30:44 -05:00
Augustin Cavalier 6a1ad86129 Debugger: Fix jobs trying to re-add dependencies.
Linked lists are used to manage these, so if we re-add
jobs we'll corrupt the linked lists and cause crashes.

Fixes #19864 and possibly others.
2026-01-06 18:01:24 -05:00
Dancsó Róbert 327215ce38 DriveSetup: add "disk image menu"
Allows to register and unregister disk images, as well as backup a
partition to an image or restore an image to a partition.

Change-Id: I4e377b1d521ceb7a91e1a5c0d1bb3d37b24fcd68
Reviewed-on: https://review.haiku-os.org/c/haiku/+/330
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2026-01-06 21:28:27 +00:00
Christof Meerwald 68c1d4b3a8 IPv6: Path MTU Discovery
* Copied and adapted IPv4 error handling code for IPv6 (to handle
  ICMP6_PACKET_TOO_BIG)

Change-Id: Id14cf6221626b5c723fbe77f19aa0d6b9d25f36a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10170
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-01-06 21:25:16 +00:00
Oscar Lesta ed66661307 Use B_DEV_NAME_LENGTH instead of 128, where appropiate.
Kind of a follow up, after 9d432d1b00.

Change-Id: Id8e0c18216ef505a7698044ecd04a69219008a4e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10213
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-01-06 21:24:42 +00:00
Augustin Cavalier 708d8e42c3 ps2: Disable v2.
It isn't working properly; see #19874.

Leave the others enable for testing for now. We can disable them
in the beta6 branch if necessary (if nobody reports that they are
indeed working.)
2026-01-06 16:24:03 -05:00
Kacper Kasper d620b23279 Implement missing methods in PictureBoundingBoxPlayer
* Remove const from gradient in StrokeLineGradient.
  BoundingBoxPlayer needs to apply transform to it.
* Extend LayersTest.
* Use BStackOrHeapArray for polygons.
* Fixes #12937.

Change-Id: If0a4abec0168dbe9afe7ea92bb29017ea8c89c79
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10211
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-01-06 21:22:30 +00:00
PulkoMandy a65ba286ee PoseView: improve drag bitmap computations
Tracker creates a drag bitmap containing the selection being dragged.
There is a size limit if the selection is too large to avoid moving a
huge bitmap around.

There were two problems with the way this was done:

- The smaller rectangle was always centered on the cursor, even if that
  was near the edge of the selection being dragged. In that situation,
  most of the drag bitmap would end up being empty. Instead, move the
  rectangle to align it with the edges of the selection if it goes
  outside them. This makes sure we always use as much of the drag
  rectangle as possible for useful data.
- Moreover, there was a regression on the rendering of the
  "fade" at the edge of the rectangle. This is a transparency gradient
  that should be at the edge only, to indicate that the drag bitmap has
  been truncated, and that more (invisible) things are also being
  dragged. In hrev58665, this transparency gradient was changed to cover
  the entire width and height of the dragged bitmap, instead of just the
  edge. This lead to most of the text being almost invisible in a lot of
  cases. Change the code to use a gradient only near edges again.

Fixes #19429.

Change-Id: I395fda191dc61732e4bdc5287a09882cdc2b5f55
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10177
Reviewed-by: John Scipione <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-01-06 13:29:09 +00:00
X512 2a4448e033 PicturePlayer: Use C++ virtual interface instead of C function table
Also use C function table instead of `void*` table function casts.

Improve type safety and readability.

Change-Id: Ie5f544b5c2bb9f2333fe3353462325dbfb4453ec
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9656
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-01-04 22:56:43 +00:00
X512 ceaf2dd2d6 app_server: add gradient stroke support
TODO: HTML5 remote desktop client.

Change-Id: Ie2a32c4a498462578476d29a7000ea0b6f86810b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9625
Reviewed-by: waddlesplash <[email protected]>
2026-01-04 22:56:43 +00:00
beaglejoe 3f38072551 Fix platform.h for C compilation
Allow platform.h to be used by POC files

Change-Id: I809749422e12f4c4b2c616ca0994b158f3cd054c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4251
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2026-01-04 07:24:21 +00:00
SED4906 64f088f495 BAlert: play user-selected sound
* Alert sounds are separate from notifications

Change-Id: I9e5545084faea354ddd339154c10b54d6479b404
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8477
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2026-01-03 13:41:24 +00:00
Nathan Patrizi 6f8c212378 Kernel: Fix write overlay handling of existing directories
* Write overlay will check if a directory being created already
  exists. This fixes an issue where creating a directory that already
  exists and is empty would remove and recreate it
  instead of returning a directory exists error.
* Check if file exists when creating with O_EXCL and VFS did not catch it.
* Add check to Open() to check and fail correctly if we are opening a
  non-directory with O_DIRECTORY. Fixes error when trying to copy/move a
  file over another (with cp/mv).
* Correctly return file exists when creating a symlink that already
  exists.

Fixes #19640

Change-Id: I82f65d06db0f2ba3cd8facbf7114af60d6987a95
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10172
Reviewed-by: waddlesplash <[email protected]>
2026-01-02 22:47:12 +00:00
Lt-Henry 8323a6694e i2c_hid: some fixes and improvements
* input reports are no longer requested, devices send them when available and we only have to wait for interrupt to come. This is written on Microsoft i2c hid reference document. In fact, as some devices may have more than one input report (ie: trackpad and fallback mouse), we were requesting (and receiving) an input report for each of them. Worse than that, our driver was missassigning reports to handlers.
* fix: i2c report type did not match specification
* implemented send feature report
* The driver sets the device to fallback mode (mouse emulation). This is a short/mid term solution, because right now we can't handle multi-touch trackpads properly. On some laptops this feature is there but ignores request.
* The driver fetches a windows 8 blob (if available). It looks like some devices refuses to work if this blob (I think is a certificate) is not fetched.
* Should we reset the device at Open()?

* Some style fixes
* Added some comments and links where things become ugly
* Some refactor is still missing

Change-Id: Ibb73e0d9dfa7184d35ed8f2adf377c277c53ce18
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8942
Reviewed-by: Adrien Destugues <[email protected]>
2026-01-02 22:42:26 +00:00
nipos 5c1e12f601 Installer: Scale EULA window for HiDPI
Fixes #16182

Change-Id: I05f7394a1276772eb2c1882cfb340389cde8fcb1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9385
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
2026-01-02 20:27:33 +00:00
Jim906 be9bccd08f Tracker: expand use of mime sniffer
* Add Model::SniffMimeIfNeeded as a faster alternative to
  Model::Mimeset, useful for ensuring that Model::fMimeType is
  initialized regardless of whether the filesystem supports MIME.
* Use SniffMimeIfNeeded when the user interacts with a file.
* Change the return value of Model::Mimeset to match the comment in
  Model.h, although currently no client functions pay attention to the
  return value.
* Fixes #19284.

The SniffMimeIfNeeded calls provide the following behavior:
* AddOneRefSignatures - Populate Open With
* SearchForSignatureEntryList::Relation - Populate Open With
* SearchForSignatureEntryList::RelationDescription - Populate Open
  With descriptions (e.g. "Preferred for Text file").
* TTracker::OpenInfoWindows - Set up Get Info window

Change-Id: Icd0aa98781e191d3f804235b0ab8acfdbe47582d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9683
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2026-01-02 16:32:15 +00:00