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.)
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.
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.
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.
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.)
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.
There's no B_*_SOUNDS_DIRECTORY unless a package creates
it. Check all locations (B_FIND_PATH_SOUNDS_DIRECTORY)
and set the first found as default folder for the file
dialog.
If none are found filepanels default to B_USER_DIRECTORY.
Change-Id: I26d063ba46f8c3bd83df68677b86751e1dd7c6cb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8957
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
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]>
* 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.
* 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.
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.
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.
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.)
In `get_nearest_symbol_at_address`, the `runtime_loader` function
behind `dladdr`, add an additional check if `address` is in the
`commpage` range.
If it is, try to enumerate the `commpage` symbols using
`_kern_read_kernel_image_symbols`.
Change-Id: Ic19f3e980765c83262e108f282f59af6bcefb620
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9164
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
"empty" cursor when unfocused, "filled" when focused, similar to what other terminals do in other platforms
Change-Id: I7ccafaacab8cfb63d8e556ca3ee76335ebb0cf0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9165
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
This way, they are available by default when not using a strict
language standard version.
The change is applied to all architectures (except m68k, which doesn't
define them at all).
Fixes#19534
Change-Id: I71238919e50518abaa65fa20365c912a577e3455
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9196
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Make the padding between key and value shorter for ports with multi-digit index
so that the values are properly aligned.
Add missing space before the dots of the padding where it was missing.
Change-Id: I427726525202b07a155dcb5879820003d2b20946
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9166
Reviewed-by: waddlesplash <[email protected]>
Add support for using `RTLD_NOLOAD` with `dlopen` on Haiku.
While not specified in POSIX, this option is widely available (both
GNU/Linux and BSD) and is the only way to atomically check if a shared
object has been loaded.
Change-Id: I061332307d76c84f6a2abb6f92c4ed964bd90a1e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9161
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Add `.cfi_startproc` and `.cfi_endproc` to syscall wrappers.
This allows `_kern_*` functions to appear in the `.eh_frame` section,
helping tools like `libunwind` to step through system calls.
Change-Id: Ib64411bfd2094e81040c94ca9f99d811fe5b865d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9162
Reviewed-by: waddlesplash <[email protected]>
* 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.
removed a preprocessor check that disables the use of multiple
pci domains on x86 systems when there is no need to do so.
Change-Id: I6b6bfc990af129ac4fb2ee56ecdec5b81399627e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9077
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
* Loads previous session if lauched by link and setting to use previous
session is enabled
* Fixes#18722
* Adds window workspaces to archive message
* Adds opening session windows to same workspace it was previously
(could be made optional)
Change-Id: I8c56516fa8770011346989a59e8ecd22440eef36
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8859
Reviewed-by: nephele nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Add a B_EXECUTE_PROPERTY to execute a given command.
Also set fAttached to false in _DetachShell() for symmetry.
Done by Andrea Anzani plus some style / refactoring by myself
Change-Id: Ifa26b60b1c1d3598a863adc4fb701155f9edf588
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9154
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
I'm not sure if all the parameters for UnmapPage are correct, however it
should run like before and it likely has to be checked at a later point in
time anyways.
Also, gcc made a warning about a type mismatch for a placeholder, so I
changed that aswell
Change-Id: Ib6568c5edc3a1729f0508ed356c39faa9941f152
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9159
Reviewed-by: waddlesplash <[email protected]>
Add a section about various known problems and be more clear that this
is still unfortunately quite not well tested and experimental.
Change-Id: If8f83682e03f23097edd00a855423febaaff43ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9157
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>