Commit Graph
100 Commits
Author SHA1 Message Date
waddlesplash 888ea83454 Revert "BTextView: Update word-wise/line-wise shortcuts"
This reverts commit 74ef92bc55.

Change-Id: I441d9cce87670e17141051fded594ae8aa6fc1fd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9299
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-05-21 17:46:34 +00:00
Augustin Cavalier fee2283dc7 libroot/glibc: Fix vtable incompatibilities on GCC 2.
Fixes #19570.
2025-05-07 18:23:05 -04:00
Augustin Cavalier 1a88889e0a tests: Adjust remaining usages of "Server" rule. 2025-05-07 18:22:41 -04:00
Augustin Cavalier 09c3b0df77 Revert "Tracker: Don't create the TitleView and CountView for the desktop."
This reverts commit 79aac200ed.

They're actually used for typeahead-style selection of items,
so this caused #19569.
2025-05-07 16:56:38 -04:00
Augustin Cavalier 5fccac6671 kernel/vm: Print the cache on assertion failure in VMAnonymousCache::Commit().
Should help with diagnosing #19541.
2025-05-01 12:40:22 -04:00
Augustin Cavalier e702bf57be BQuery: Make SetFlags() behave like other Set..() methods & add documentation. 2025-05-01 12:36:43 -04:00
Augustin Cavalier 77bb094872 bootloader/bios_ia32: Automatically zero bios_regs on initialization.
Many places didn't zero them, so we'd put bogus data in those registers
during BIOS calls.
2025-05-01 12:27:16 -04:00
Augustin Cavalier 3479a4d9ae kernel/debug: Acquire the sOutputLock in debug_puts.
Should fix some more "Failed to acquire spinlock for a long time"
when onscreen paging is enabled.
2025-05-01 12:23:45 -04:00
Augustin Cavalier d0e504d5bd Tracker: Don't bail out if there are no directory filters for a query.
Fixes non-directory-filtered queries after the earlier refactor
to how they work (hrev58845).

Also don't bother writing an empty message if there are no
directory filters, and remove any attribute that does exist.
2025-04-30 17:28:48 -04:00
Augustin Cavalier 218e7ce1be Tracker: Use B_QUERY_WATCH_ALL to avoid watching every single node.
Similar to the use of B_WATCH_CHILDREN for directories.
Following the preceding commits, this seems to be working well.
2025-04-30 17:20:20 -04:00
Augustin Cavalier d26ab46206 BQuery: Add SetFlags() method.
It can be used to set flags on the query, same as fs_open_query()'s
flags parameter.

fLive had 3 bytes of padding after it, so this doesn't break ABI.
2025-04-30 17:18:16 -04:00
Augustin Cavalier 7e740f61ac kernel & file_systems: Overhaul query attribute change notifications.
* Introduce notify_query_entry_moved to the fs_interface API.

   axeld added a hook to the query parser (then in BFS) in hrev34317
   to directly handle moves/renames, but just sent notifications for
   it as B_ENTRY_REMOVED + B_ENTRY_CREATED (which is in fact the same
   exact thing BeOS R5 did, I tested). We need to preserve that ABI/API,
   unless flags that didn't exist on BeOS R5 are set.

 * Rework notify_query_attr_changed to notify_query_attribute_changed.
   This method is Haiku-specific (it was added in hrev39131), but it
   wasn't very useful: it only sent the name of the file, not the name
   of the attribute that changed.

   It now sends the name of the attribute along with an "int32 cause",
   same as notify_attribute_changed does.

 * Rename the private flag B_ATTR_CHANGE_NOTIFICATION to B_QUERY_WATCH_ALL.
   This better describes what it does (it's analogous to the B_WATCH_ALL
   node_monitor flag). Probably we should make it public at some point...
   (although probably at a lower value.)

 * Overhaul QueryParser notifications logic to implement WATCH_ALL
   properly, make use of the new and improved notification methods,
   and to deduplify some logic.

This makes it possible to use queries with B_QUERY_WATCH_ALL
in a similar fashion to watching a directory node with B_WATCH_CHILDREN,
avoiding the need to watch every single node individually.
2025-04-30 17:12:49 -04:00
Augustin Cavalier 7998bc4204 BFS: Don't send duplicate attribute change notifications to queries on renames.
LiveUpdateRenameMove() sends create/remove notifications, so we
don't want to send duplicate ones in the LiveUpdate() hook.
2025-04-30 16:50:08 -04:00
Augustin Cavalier 915d8fbe17 tests/live_query: Fix the build.
Useful for testing query notifications behavior on Haiku
and BeOS R5.
2025-04-30 16:47:59 -04:00
Augustin Cavalier fec93ebfdd leak_analyser: Ignore anything allocated in __initialize_locale_kit.
That memory is intentionally never freed.
2025-04-30 13:48:18 -04:00
Augustin Cavalier 371a1e3ade Tracker: Delete mimetype list on quit.
Reduces leak checking noise.
2025-04-30 13:47:28 -04:00
Augustin Cavalier 79aac200ed Tracker: Don't create the TitleView and CountView for the desktop.
They aren't used, so this just leaked memory.
2025-04-30 13:46:27 -04:00
Augustin Cavalier 1df290c521 Tracker: Overhaul path filtering in QueryPoseView.
* Perform path filtering in GetNext*, not just BRefFilter.
   See inline comment: This way, most filtered nodes won't
   result in BPoses being created, saving lots of time and
   memory.

 * Move logic to load directory filters to the place other
   settings are loaded.

 * Memory management cleanups: shuffle some objects around,
   avoid needing clones and refcounts for others, etc.

Significantly improves efficiency of path-filtering queries.
2025-04-30 12:31:03 -04:00
Augustin Cavalier aa79366ce3 libroot/glibc: Remove fopen64 definitions again.
We don't declare them in our headers, so this just confuses
configure scripts that look for them, and creates problems later on.

Fixes binutils, which tried to use these, but the implicit
function declarations and resulting pointer-integer conversion
just caused crashes.
2025-04-30 10:03:10 -04:00
Augustin Cavalier d5a9b614d5 Tracker: Use B_WATCH_CHILDREN to avoid watching every single visible node.
This should be much more efficient in the kernel.

Live update of windows when files change elsewhere still seems to work.
Queries and "Open with" still use per-node monitoring at present, but
all others now use only the single monitor for directories.
2025-04-29 16:35:59 -04:00
Augustin Cavalier 3c477153cf Tracker: Get rid of ShouldShowPose().
It doesn't work as a virtual override filter anymore due to
the restructuring of filters. RefFilter should just be
used instead.
2025-04-29 16:10:15 -04:00
Augustin Cavalier cc6af54f9c Tracker: Fix out-of-bounds write in FolderFilterFunction.
Should fix #19549.
2025-04-29 14:36:34 -04:00
Augustin Cavalier 2a6de729ec libroot/glibc: sscanf wants NULL instead of empty string for thousands.
Otherwise comparisons later on won't work properly.

Fixes #19554.
2025-04-29 10:09:21 -04:00
Augustin Cavalier 08f21fb5bd libroot/glibc: Synchronize printf & scanf implementations with glibc 2.20.
Many adaptations for integration with Haiku and GCC2 compatibility.
2025-04-28 13:19:51 -04:00
Augustin Cavalier 8ab4fc271c acpi_battery: Add NULL check before dereferencing buffer.pointer.
Based on disassembly, should fix #19551.
2025-04-28 10:56:04 -04:00
Augustin Cavalier 28780cdca1 Tracker: Remember whether addons have certain hooks or not.
If they don't, then we don't want to keep trying to load them
every time we'd want to call the hook (e.g. in rebuilding the
addons menus, which happens every time an item selection changes
to match the mimetype list.)
2025-04-25 16:51:04 -04:00
Augustin Cavalier c057fc38b1 Tracker: Cache add-on-supported mimetypes rather than reloading them each time.
We have to rebuild the addons menu every time a file selection changes,
so avoid repeated reads/deserialization unnecessarily.

Rename the "AddOnShortcut" structure to "AddOnInfo" as it contains
more than just shortcut information now.
2025-04-25 16:35:22 -04:00
Augustin Cavalier ea903017d9 Tracker: Only rescan templates if we don't know of any.
Otherwise we rebuild this menu very often.

This change means that alterations to Tracker templates will not
get picked up by already-open windows. If that is an issue (templates
are rarely modified), then we'll have to add node monitoring
to only rebuild this list when actually necessary.
2025-04-25 15:52:28 -04:00
Augustin Cavalier 01b71d945e BWindow: Clean up dispatch of NO_COMMAND_KEY shortcuts.
Only search once for a shortcut exactly matching the current
modifiers, i.e. whether with or without COMMAND_KEY.

Also clarify some of the comments and logic.
2025-04-25 14:51:29 -04:00
Augustin Cavalier 023f509399 Tracker: Don't rebuild root add-on menus in MenusBeginning().
Instead, only do it when we get a message from the BDeskWindow
after it modifies the fAddOnsList. (The add-ons context menu
may still get rebuilt in MenusBeginning(), though, depending
on mime type; likely that should use the AddDynamicItems()
hook to avoid being rebuilt so often.)
2025-04-25 14:29:37 -04:00
Augustin Cavalier 0edaf61502 Tracker: Fix leak of addon menu items.
Every time the main menu was rebuilt, we leaked the "secondary"
add-on items, which included some FDs. Now, we just skip
creating addon items altogether if we're not going to insert them.

(BuildAddOnMenus() had logic to insert items, but this seems to
have been dead code, because "primary" would always be false,
so the primaryList would never have any items in it.)

Should fix #19506 and related problems.
2025-04-25 13:52:21 -04:00
Augustin Cavalier 938a264d4d libroot/glibc: Add missing include and definitions for popen().
Fixes its behavior after the upgrade.
2025-04-25 12:18:26 -04:00
Augustin Cavalier 84800fee35 libroot/glibc: Drop two more unneeded files. 2025-04-25 12:18:05 -04:00
Augustin Cavalier e1936f52eb libroot/glibc: Synchronize libio with upstream glibc 2.20.
Includes changes/adjustments for integration with Haiku's libroot
as well as C89 fixes for GCC2 compatibility. Also imports one
patch from glibc trunk to fix ungetc+fflush behavior.

Fixes #19039, follows up #19479.

Change-Id: I73ebde80d314460174d344ba1e2960807ad4717b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9160
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-04-24 16:23:25 +00:00
Augustin Cavalier e98aafa2cf input: Handle EINTR properly in the HID layer and input_server.
* Make EINTR (B_INTERRUPTED) always mean "interrupted system call",
   not "interrupted transfer". Use B_BUSY for that instead.

 * Drop B_CANCELED, return EBADF (B_FILE_ERROR) for those cases instead.

 * Handle B_INTERRUPTED properly in userland ioctl calls.

Should fix #19542.
2025-04-24 12:07:03 -04:00
Augustin Cavalier 50a7196463 bootloader: Fix setting initial colors. 2025-04-22 17:29:41 -04:00
Augustin Cavalier e9bfa37d95 bootloader: Return error in open() if we have no root node.
Fixes trying to use the VFS before it's initialized causing crashes.
Also fix indentation.
2025-04-22 17:05:39 -04:00
Augustin Cavalier 49402dc6af bootloader: Avoid use of the heap for the video_text_console.
We can only ever have one active at a time anyway.
2025-04-22 17:04:57 -04:00
Augustin Cavalier 1eb7df957e bootloader: Fix build of the video_text_console.
There's a different "big" font for the frame_buffer_console now.
2025-04-22 17:03:38 -04:00
Augustin Cavalier 10eea8dfae kernel/debug: Fix handling of sInvokeCommandLevel.
* Check for overflows in invoke_debugger_command.

 * Reset it inside invoke_debugger_command always.
   It wasn't reset in the case of INVOKE_COMMAND_FAULT, meaning
   we would "leak" command levels, thus leading to crashes
   and other problems inside the kernel debugger.

Fixes recursive KDLs or even triple faults caused by faulting
commands and pipes inside the kernel debugger.
2025-04-22 15:41:14 -04:00
Augustin Cavalier 6259a27b72 kernel/x86: Invoke debug_double_fault on x86_64.
Previously we just went through x86_fatal_exception to get to KDL,
now we will invoke the double-fault-specific method (which doesn't
print a backtrace by default), and also use the double-fault-specific
method to determine the current CPU.
2025-04-22 15:14:04 -04:00
Augustin Cavalier f1c5aa3287 nvme_disk: Reduce stack usage in nvme_disk_init_device.
Between the ctrlr_stat and ctrlr_data, it was using over 8KB of stack.
Now it's using only a few hundred bytes.

Fixes a stack overflow on 32-bit x86, which caused #19523.
2025-04-22 14:44:44 -04:00
Augustin Cavalier 5cd02cf1e8 kernel/x86: Add more safety checks around x86_double_fault_get_cpu.
We should try to avoid triple-faulting inside double-fault handlers
at all costs, so add extra safety checks in here.
2025-04-22 14:43:03 -04:00
Augustin Cavalier dcc19cb937 kernel/x86: Fix double-fault GS on 32-bit.
This is the same value used lower down outside the double fault stacks.

Fixes KDL in double faults (previously it would cause another fault
trying to read the current thread from TLS.)
2025-04-22 14:41:56 -04:00
Augustin Cavalier e249d5a241 HaikuBootstrap: Add missing PCI modules. 2025-04-22 14:40:49 -04:00
Augustin Cavalier 09af690ea4 HID: Handle report waiting interruptions properly.
B_INTERRUPTED is already used by the report processing code,
instead return B_CANCELED and handle this specially.

Fixes #19530.
2025-04-22 12:34:47 -04:00
waddlesplash 14d9cf7417 Revert "bus_managers/pci: allow x86 systems to use VirtualBusMap"
This reverts commit 150e1c88e2.

Breaks interrupts on VMware and elsewhere, it seems (see #19517.)

Change-Id: I487de651d226e769f0ad5b07974a1c5079ad1714
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9176
Reviewed-by: waddlesplash <[email protected]>
2025-04-14 16:32:38 +00:00
Augustin Cavalier e6cd789248 libroot/malloc: Better handling of fragmented frees in PagesAllocator.
* Immediately free chunks that are from areas below a size threshold
   and which cover the whole area, or are in that area's head or tail.

 * Avoid unmapping just-freed chunks and any in the last area,
   if we can, while releasing memory. This should force smaller
   or not-needed chunks out of the caches more rapidly.

 * Drop the "single page cache clear" logic, as it isn't needed now;
   the "immediately free small areas" logic takes care of the same case
   in a more general way than for single pages.

Running a query for all files in Tracker, letting memory usage go
up to 200+MB, and then closing the query results window seemed to
test this logic pretty well. area_for+get_area_info were invoked
without a subsequent unmap ~12,000 times, vs. around ~3,600 that
the unmap path was taken. Other cases (web browsers) have lower
counts than that, at least in any given short window, from the
(admittedly brief) testing I did.

Hopefully will help with the huge amounts of areas seen in #19514.
2025-04-10 18:38:16 -04:00
Augustin Cavalier 5f8c94242b SplayTree: Add PreviousDontSplay to IteratableSplayTree. 2025-04-10 17:59:13 -04:00
Augustin Cavalier d45f85d19f libroot/musl: Use the correct toread and uflow for shgetc.
Should fix crashes with Python after the merge of the new wcstol.
2025-04-10 09:58:04 -04:00
Augustin Cavalier 0bd957f0e9 libroot: Update stubs. 2025-04-07 16:29:47 -04:00
Augustin Cavalier e2b1a054cd libroot: Update stubs for gcc2. 2025-04-07 16:23:49 -04:00
Augustin Cavalier 30cfbaf691 kernel: Move the BSD strto* implementations to kernel/lib from libroot.
The kernel is the only thing that uses them now.
2025-04-07 16:21:39 -04:00
Augustin Cavalier e192187bb2 libroot/glibc: Delete now-unused files. 2025-04-07 16:21:18 -04:00
Augustin Cavalier 7174197a8d libroot/posix: Switch to using musl's string-integer/float conversion routines.
Unlike glibc's, these don't take the current locale into account.
The POSIX specification says: "In other than the C and POSIX locales,
other implementation-defined subject sequences may be accepted."
Not accepting any other than the default seems to be more consistent
regardless.

This also makes things consistent between wchar_t and char, as we
were using the BSD implementations of strto*l for regular chars
but glibc's for wcsto*l before.
2025-04-07 16:20:36 -04:00
Augustin Cavalier e00903da0d libroot/musl: Define restrict in <features.h>.
Needed on GCC2.
2025-04-07 16:17:10 -04:00
Augustin Cavalier 9dcf5c5c88 stdio_ext.h: Add missing declaration for __fseterr.
Follow-up to #19479.
2025-04-07 14:48:23 -04:00
Augustin Cavalier 6b246eafbd BString: Add missing NULL checks in _MakeWritable().
Fixes crashes that can happen in out-of-memory conditions.
2025-04-02 14:24:20 -04:00
Augustin Cavalier 2fb23000eb libroot: Call thread exit hooks after __cxa_finalize.
This gives C++ destructors a chance to run before we tear down
the thread locale information (among other things.)

Should fix #19508.
2025-04-02 13:52:50 -04:00
Augustin Cavalier c6f736315a BSlider: Copy the UpdateText inside UpdateTextChanged.
We can't rely on it not changing between calls, especially as
MaxUpdateTextWidth() changes the value and re-gets it, and
that's called at the end of this method always. So we need to
keep our own copy rather than using the one that's owned by
the subclass.

Fixes a use-after-free uncovered by the guarded heap in VolumeSlider,
reported in #19493.
2025-03-21 11:54:37 -04:00
Augustin Cavalier aa2b9830e1 libroot/glibc: Zero-initialize the mbstate.
May fix #19493.
2025-03-21 11:52:00 -04:00
Augustin Cavalier a3fe8122be libroot/glibc: Delete even more unused stuff. 2025-03-20 17:22:10 -04:00
Augustin Cavalier 88b063d5e6 libroot/glibc: Delete now-uneeded locale files. 2025-03-20 16:45:53 -04:00
Augustin Cavalier 843c97b01f libroot: Make glibc use the native Haiku locale structs.
It accesses values through macros, so just write functions that
fetch the appropriate value from Haiku's structures.

Note that the values for multibyte digit characters are hardcoded.
As far as I can tell, we never set or updated these in glibc's
locale structures, so it always just used the default, so this
should not be a behavioral change from before.
2025-03-20 16:31:53 -04:00
Augustin Cavalier 910fdeee84 libroot/glibc: Delete more unused stuff.
Fixes more warnings.
2025-03-20 16:06:43 -04:00
Augustin Cavalier cf8410ca16 libroot/musl: Clean up x86_64 math Jamfile rules.
No functional change intended.
2025-03-20 16:06:43 -04:00
Augustin Cavalier cd7aab83d1 headers/posix: Drop commented-out strsep from string.h.
It's in the BSD header instead.
2025-03-20 14:00:48 -04:00
Augustin Cavalier 42adc340f4 libroot: Add missing files to arm64 Jamfiles to fix the build. 2025-03-20 14:00:31 -04:00
Augustin Cavalier 2ab23a1ade libroot/glibc: Fold needed declarations in stdlib/stdlib.h into include/stdlib.h.
Most aren't needed. This fixes quite a lot of compiler warnings.
2025-03-20 13:50:47 -04:00
Augustin Cavalier 55835d115b libroot/glibc: Add back cacos files to ARM sources. 2025-03-19 13:29:56 -04:00
Augustin Cavalier ac70aeab5b libroot/glibc: Remove some more unneeded stuff. 2025-03-19 13:29:41 -04:00
Augustin Cavalier a9f0038de7 libroot/musl: Add fpclassify to riscv64 & arm math sources.
Should fix the build there after recent changes.
2025-03-19 13:14:16 -04:00
Augustin Cavalier 91b06c1ca3 libroot: Replace most complex functions with musl's.
All compiled with the new GCC. Some where musl had TODOs/FIXMEs,
or where we would need the newer libgcc, the glibc versions are
left as-is.
2025-03-19 13:13:47 -04:00
Augustin Cavalier 42dcb9029f libroot/glibc: Delete more unused math files. 2025-03-19 11:46:56 -04:00
Augustin Cavalier 3ddb199a6e libroot: Replace s_ math routines from glibc with fully generic versions.
We define these as __builtins in math.h, but the compiler might
use out-of-line versions, and we need to export the symbols anyway.
musl implements the __fpclassify routines, so just use them.
2025-03-19 11:45:58 -04:00
Augustin Cavalier a5854d713e libroot/glibc: Add missing stdio_ext methods needed by gnulib.
Otherwise it needs to use libio internals to implement these,
which we don't want. musl also exports all these methods for
the same reason.

Implementations taken from glibc 2.15, current gnulib (5077f67), and
in a few cases tweaked for better Haiku support.

Should fix #19479.
2025-03-18 22:03:10 -04:00
Augustin Cavalier 0796aaabfc libroot: Clean up fpurge implementation.
* Take it from upstream glibc 2.15, much closer to the version we use.

 * Drop fpurge from stdio.h, it's nonstandard. Keep it around for
   ABI compatibility for now (BeOS didn't have it.) __fpurge is left
   in stdio_ext.h.
2025-03-18 22:03:10 -04:00
Augustin Cavalier 802a83e7ed libroot/glibc: Drop some unused stdio files. 2025-03-18 22:03:10 -04:00
Augustin Cavalier bb61eb2df3 libroot: Update stubs. 2025-03-18 19:51:24 -04:00
Augustin Cavalier e22463dc84 libroot: Update stubs for GCC2. 2025-03-18 19:45:46 -04:00
Augustin Cavalier d17f55ce84 libroot: Add R5 compatibility definition to OpenBSD malloc glue.
Only for GCC2.
2025-03-18 19:45:27 -04:00
Augustin Cavalier 13a3941b17 libroot/malloc: Don't export malloc_options.
It isn't needed.
2025-03-18 19:39:50 -04:00
Augustin Cavalier ee31ca9f7e libroot: Restore inadvertently removed mkstemps. 2025-03-18 19:30:58 -04:00
Augustin Cavalier a8b3a6b022 libroot: Replace tempfile functions with BSD or homegrown versions.
Same upstream commit as the mktemp file came from. Some modifications
to integrate better with Haiku.

FreeBSD has no tmpnam_r, so a new version implemented here
(inspired by FreeBSD's tmpnam implementation) that is fully
thread-safe.
2025-03-18 18:56:03 -04:00
Augustin Cavalier 8fadf59d1a headers: Move asprintf & vasprintf to stdio.h.
They're implemented in libroot, not libbsd, and they're now
in POSIX-2024 anyway.
2025-03-18 18:44:48 -04:00
Augustin Cavalier be5f87e9b9 libroot: Import most changes to mktemp from upstream FreeBSD.
From upstream dc36d6f9bb1.

Methods not declared for Haiku removed, and the old randomization
code is retained for now (but with getentropy() at least.)
2025-03-18 18:11:42 -04:00
Augustin Cavalier 0b27126820 libroot: Replace [efg]cvt implementations with musl's.
From latest musl release (1.2.5). This drops the _r versions,
which are nonstandard and are not present in our headers
(nor BeOS' headers.)
2025-03-18 18:01:03 -04:00
Augustin Cavalier 3d0e9319f6 libroot/glibc: Put wctype_t declaration inside second guard.
Should fix the build on GCC2.
2025-03-15 09:20:15 -04:00
Augustin Cavalier d95c04c2ee libroot/glibc: Remove some more unused files. 2025-03-15 08:11:49 -04:00
Augustin Cavalier 77dc532e76 libroot: Drop unused/uneeded empty tls.cpp. 2025-03-15 07:52:09 -04:00
Augustin Cavalier 20a6449385 kernel: Add thread setting to prevent page waits and use it in the file cache.
See inline comment: otherwise we could deadlock waiting for busy pages.

At the same time, make page_faults_allowed just an int16 and drop
atomics and extra checks, they aren't needed.

Fixes #19441.

Change-Id: I1b7cc06f66b44c3520fa36497c076ee5a6320706
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9120
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-14 18:34:06 +00:00
Augustin Cavalier c97ebaf1c7 MediaPlayer: Improvements to time tooltip.
* Make PositionToolTip update even when not attached to a window.

 * Always use the "hover" message to update the tooltip,
   never SetPosition.

 * Use BControl::Invoke so that hover messages are sent instantly.

 * Position the tooltip above the slider always.

Combined with the fixes to the Interface Kit, this provides a much
nicer experience for slider time tooltips.


Change-Id: Ib7f884ca91c253ed7e6639946fd2378166137d80
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9122
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-14 17:50:43 +00:00
Augustin Cavalier acb9747e38 Interface Kit: Don't hide tooltip if we don't have any.
Ideally we would only hide our own tooltip and nobody else's, so
a TODO is added for that case.

This method is called for all mouse events if we get B_OUTSIDE_VIEW
or B_EXITED_VIEW as their "transit", but since tooltips themselves
get all mouse events and thus B_OUTSIDE_VIEW, this had the effect
of hiding all tooltips immediately instead of after the delay.
2025-03-14 13:47:54 -04:00
Augustin Cavalier d3009c305c Interface Kit: Always use the specified "where" in ShowTip.
It was previously ignored if the tooltip was already open.

Note that, combined with the previous commit, this means that
the "where" passed in will basically always be used (except for
"sticky" tooltips.) Applications or classes that use this private
API but pass in wrong or bogus positions will now need to be fixed.
2025-03-14 13:46:58 -04:00
Augustin Cavalier 6ac738b4de Interface Kit: Reset tooltip frames to their previous "where" on resize.
Instead of re-fetching the mouse position. This avoids tooltips "jumping"
when they may have resized by only a few pixels and don't need to be
repositioned.
2025-03-14 13:46:46 -04:00
Augustin Cavalier 30e5362d88 kernel/lib: Drop mergesort.
Nothing seems to use it.
2025-03-13 23:03:36 -04:00
Augustin Cavalier 546041c0ee libroot: Adjust stubs generator to work on Python 3. 2025-03-13 21:18:15 -04:00
Augustin Cavalier c23f4fec07 libroot/glibc: Update getopt to glibc 2.41.
Minor adaptations to integrate properly with Haiku libc.
2025-03-13 21:17:54 -04:00
Augustin Cavalier bbd93d522e libroot/glibc: Remove some unneeded files.
We can just use the system versions of these, or in the lc-
cases they didn't actually define any symbols.
2025-03-13 20:44:46 -04:00
Augustin Cavalier b989960b81 libroot/stdlib: Reinstate mistakenly removed UsePrivateHeaders. 2025-03-13 19:39:29 -04:00