Commit Graph

65513 Commits

Author SHA1 Message Date
Zardshard
6936878097 Icon-O-Matic: Fix bugs that occur when pasting text
Fixes a small, hard-to-see bug that occurs when pasting text into
Icon-O-Matic. Before when pasting, for example, an "O" into IOM, the
"O" would not be completely symmetrical. There would be an extra point
on one of its sides. Now that point is gone.

Also fixes paths not being closed when they should be. Back to the "O"
example, one of the two paths that make up the "O" would be open. Now
both paths are closed.

Also determines whether a point should be connected or disconnected
based on whether the control points and the vertices lie on a straight
line. (If a point is marked as connected, the control points and the
vertex are constrained to lie on the same line.)

Change-Id: I0cb9f878ac7887640288073ca253de35b3937f3b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6841
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-19 15:15:25 +00:00
PulkoMandy
52050c56f6 BTextView: improve GetHeightForWidth in non editable mode
In non editable mode, BTextView computes a preferred size that just fits
the current text. This did not take into account the insets from
SetInsets, so, when these are used, the resulting view size was too
small.

Additionally, avoid calling _Refresh that has two problems: it needs the
view to already be attached to a window, and it does a lot of things we
don't really need here: recomputing scrollbars, clearing the empty space
below the text to avoid flickering, and so on. We just need to recompute
fTextRect according to the suggested width, to do that, it is enough to
call _RecalculateLineBreaks instead.

Finally, also restore the text rect at the end of the method, since it
is not actually resizing the view, it is very unexpected that it changes
the text rect. This is not perfect, as the line breaks from
_RecalculateLineBreaks are not undone. But, since the next step is
probably to resize the view according to the computed width/height, this
will be sorted out at that time. If this proves to be a problem, we can
add a second call to _RecalculateLineBreaks after restoing the original
text rect, or refactor _RelcalculateLineBreaks so that it can return the
new height without actually changing the lines.

Change-Id: Ie2fa60c1b2314c8a3346d03ab3ff6843aebaf3dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6845
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-08-19 15:15:00 +00:00
PulkoMandy
7b2f246e69 Cortex: remove use of deprecated C++ features
Change-Id: I174bf8a5224b53370c3dd5f7dc152885ff0ec985
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6800
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-19 15:11:44 +00:00
David Karoly
6308236831 arm, arm64, riscv64: use gcc-13.2.0 for bootstrap build
Change-Id: I3cda82b46a224bddc51f9850c1fee9006a51b73e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6844
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-08-19 12:24:18 +00:00
Autocomitter
e5a4bee967 Update translations from Pootle 2023-08-19 08:17:33 +00:00
Augustin Cavalier
7602588721 Screen: Make some manual edits to Vendors.h.
This data comes from the PNP registry, where deprecated entries
have "DO NOT USE". But those deprecated entries were often once used
in actual products, and we don't want to display "DO NOT USE" for them.
So remove such text, and replace it with the actual vendor name in a few places.
2023-08-18 22:09:40 -04:00
Fredrik Holmqvist
2bffaa64dd null check fTeam in CoreDumper::Dump()
gcc warns "writing 4 bytes into a region of size 0"
on ARM64 (-march=armv8.1-a -mno-outline-atomics)
if it thinks fTeam can be null in atomic_or.

Change-Id: I44c88dadf0cee6e3e54d2baaf0453ae70aa1f3c1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6838
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-18 14:54:47 +00:00
Joachim Mairböck
82272adad5 kernel debugger: add missing newline to exception messages without position
This is the case, for example, for the "out of memory for command execution"
message.

Change-Id: I0951a91c7a9fcdd1730a0441d7fac0eb6e608615
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6843
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-18 12:28:46 +00:00
Zardshard
405c9dc3f2 Icon-O-Matic: Improve saving-related error messages
Improves the errors that are given to the user when exporting to an
HVIF file failed. Examples of errors improved include errors related to
having too many shapes, too many paths, or too many points in a path.

Also changes the icon shown in the alert box from an info icon to an
error icon.

Fixes #13978

Change-Id: I12a08e9857a95bd4d41da029320fa6f8182c3aa5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6837
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-17 19:02:51 +00:00
Zardshard
6da29a769f Icon-O-Matic: Fix window resizing bug
Previously, the window could not go any smaller than the current size
after some changes were made to the icon such as adding a style.

Fixes #4711

Also cleans up some code style.

Change-Id: I4e7af98ac8afbea28a46d81b9de7aba6fc6c894a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6836
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: humdinger humdinger <humdinger@mailbox.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-17 19:02:51 +00:00
Humdinger
52b930ce1c Added CodyCam I-O-M file
Adding the missing Icon-O-Matic file for the CodyCam icon.
Slightly improved shadow. Updated icon data in CodyCam.rdef.

Change-Id: I1582ccbc28e9600122a342b53a0adf5bbfd7b82d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6840
Reviewed-by: Zardshard <0azrune6@zard.anonaddy.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-16 15:57:36 +00:00
Axel Dörfler
9f21874394 kernelland_emu: Added missing user_memset()
Change-Id: I703525d73572c812b1adf8b4c4805a624c3b7df7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6839
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-08-15 18:58:29 +00:00
Zardshard
c70aca1135 Icon-O-Matic: Make left sidebar lists resizable
Makes the Path, Shape, Transformer, and Properties menu vertically
resizable.

Implements #2745

Change-Id: I322b6ecffbe807694c7f188c5ffa5025cbc5e711
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6815
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-15 00:54:32 +00:00
Trung Nguyen
303ff56a5f unix: Implement SO_RCVBUF
Implemented `UnixBufferQueue::SetCapacity` so that `setsockopt`
with `SO_RCVBUF` will not always return an error.

Change-Id: I2d9be84633f84474fac64b379e9f89ef2751a094
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6816
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-13 21:14:51 +00:00
David Karoly
2b514ce830 riscv64: update bootstrap package versions
Change-Id: I45b96ae1249985a2d92bcae7c826e40186d3b4a8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6813
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2023-08-13 19:33:47 +00:00
David Karoly
26bd8b3958 arm: update bootstrap package versions
Change-Id: Iaea37926246a95764253dcb24c47ab6b931c538c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6812
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2023-08-13 19:25:06 +00:00
David Karoly
45e19f162a arm64: update bootstrap package versions
Change-Id: Ifc42e09d1fed8ca51c214bee53dda8d0a203b5b8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6811
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2023-08-13 19:24:49 +00:00
Autocomitter
0d07b1d98a Update translations from Pootle 2023-08-12 08:19:36 +00:00
Niels Sascha Reedijk
d2edfdd11d docs: document the steps to update GCC buildtools
Change-Id: Iaa41194e0f76594efd504b65f3565b22743dce34
2023-08-12 07:59:29 +01:00
Jérôme Duval
ef611e96c4 kernel/x86: also write the cpu number when the rdpid instruction is available
Change-Id: I5b37fe8aff9b4cf12fbd4dd60a91eb09f11f4e2b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6807
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-08-10 16:35:03 +00:00
Jérôme Duval
67ee1d1a3e kernel/x86: don't load microcode on intel when already up to date
on Pentium Silver, loading the microcode on the boot cpu also updates the other ones.

Change-Id: Ifbd767e7d73fdbc8ae2bf0740fcce523e500de1b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6806
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-08-10 16:35:03 +00:00
Jérôme Duval
b761f9250a unix: respect MSG_DONTWAIT on recvmsg
fix #18548

Change-Id: I33f502c2a376be6dbdf913f9613aab9d4c5a3644
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6802
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-08-09 17:10:28 +00:00
PulkoMandy
9c8f4ac5d6 Remove usage of some deprecated C++ features
Change-Id: I8faff44ca5fbce9b56ce135ebd070be6bd4c1c78
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6799
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-08 19:52:09 +00:00
Augustin Cavalier
cc6365c7aa bootloader: Don't issue warnings upon encountering PT_EH_FRAME.
The kernel already does the same thing.
2023-08-07 12:46:44 -04:00
Augustin Cavalier
bfebd2b3c9 libroot: Acquire the process heap lock.
Upon further investigation, the global heap lock should actually
not need to be reset, but the process heap lock will.

Change-Id: Id1fd91cc0e7acecd5b4fd76cb82d4ed2ae3900ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6777
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-08-07 16:12:01 +00:00
Humdinger
2eddc82d0f Add e-mail draft to mimedb
Nice to have its own icon (albeit a bit simplistic) instead of the
generic supertype text icon, and a description text.
Draft mails are created by the Mail app when saving. They don't yet
have any MAIL:* attributes.

Change-Id: I775950ea934eafc19c8d57e0e45451c8ab542234
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6797
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-08-07 15:54:51 +00:00
Humdinger
cfd0960652 Translation comment for filesize symbol "B", use string_for_size()
Use string_for_size() to get all filesize symbols and add a translation
comment when we have to shorten "bytes" to "B" as it's not obvious if
you just see "%lld B" at Pootle.

Remove no longer needed kSizeFormats[].

Change-Id: I85defd941a2d777d6032732fcfdd5e1fa91e08ac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6776
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-07 15:54:05 +00:00
Adrien Destugues
2468c9e5bf Remove -Wno-error=deprecated
This disables -Werror for the use of old GCC extensions listed here:
https://gcc.gnu.org/onlinedocs/gcc/Deprecated-Features.html

We do not apparently use any of those anymore (if we ever did). I think
this was accidentally enabled at the same time as
deprecated-declarations (which we still need, for example because we
still have some uses of auto_ptr).

Change-Id: I147276b42d9d066df56e8b135bc8fd885dc937a7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6798
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-07 14:38:36 +00:00
Jérôme Duval
3487453788 unix: respect MSG_DONTWAIT on sendmsg()
fix bug #18539

Change-Id: Id21362028287d1cbdac469226e6b52f4547a276f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6796
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-08-07 13:24:45 +00:00
Niels Sascha Reedijk
13e2db9609 build-packages: update to the latest packages
The main motivator is the update to GCC 13. As part of this, some of the other
dependencies have been updated as well.

Newly introduced:
 - gawk on x68_64 (new dependency of texinfo)
 - libjx (new dependency of haikuwebkit)
 - openexr30 (new indirect dependency of haikuwebkit)
 - brotli (new indirect dependency of haikuwebkit)

On x86_gcc2, some packages have switched to the modern GCC version:
 - diffutils
 - findutils
 - libpsl
 - tcpdump

Change-Id: Ic617b5b4af9eb34c0d28259a3c0ddbcc33f98a5d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6772
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-08-05 11:52:00 +00:00
Autocomitter
7bbe09c66d Update translations from Pootle 2023-08-05 08:22:06 +00:00
Augustin Cavalier
77dd55aae5 libroot: Reinitialize global heap lock after fork.
The per-heap locks are reinitialized already by the routine which
invokes this one, but this global lock was previously missed.

May fix a deadlock reported by trungnt2910 to happen in the .NET port.
2023-08-04 15:19:41 -04:00
Augustin Cavalier
6d3065508f kernel/condition_variable: Adjust notified count and wait-status returning.
* If we received a wait status, always return with it.

 * Only count those entries for which we set the wait-status as
   having been notified.

In conjunction with the prior commit, this fixes some rare deadlocks
that could occur with timeouts or signals.
2023-08-04 15:19:41 -04:00
Augustin Cavalier
798b773393 kernel/user_mutex: Fix unset of locked flag if no entries were notified.
It turns out this code actually is possible to trigger, e.g. using
Git checkouts, where EINTR due to signals happens quite often.
However, even with this commit, it still does not work quite right,
due to an oversight in condition-variable notify accounting. That
will be addressed in the next commit.
2023-08-04 15:19:41 -04:00
Augustin Cavalier
2d43eebcab kernel: Store "next" pointer before notifying B_EVENT_INVALID.
Once B_EVENT_INVALID has been set, the select routine is free to
delete the select_info at any time. We therefore cannot access
the "next" pointer after notify_select_events returns.

May fix a KDL seen by trungnt2910.
2023-08-04 15:19:41 -04:00
Augustin Cavalier
d8365e0f0f kernel/event_queue: Only set B_EVENT_INVALID with the lock held.
The dequeue routine expects that if B_EVENT_INVALID is set,
it is free to delete the object. So we must only set it with
the lock held, so that by the time the dequeue routine sees it,
we will be done with the event.
2023-08-04 15:19:41 -04:00
Zardshard
45e0c33d4f Debugger: Make CliContext use BLooper for message passing
This commit replaces the custom implementation of message passing with
BLooper.

This commit does not fully transition the code to the BLooper paradigm.
WaitForEvent still exists, when, ideally, message passing should be
used to notify the waiting class that the results are ready.

Change-Id: Id223b9fc0ac1aa9a5a5aeb4af63da04f2cc7574b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6400
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Rene Gollent <rene@gollent.com>
2023-08-04 17:29:49 +00:00
Augustin Cavalier
9b28ebf997 DoublyLinkedQueue: Rework Remove() function.
Equivalent to the changes done to DoublyLinkedList
(in 904e9f5512305dbc0eed9146e8a0b2d597269b71.)
2023-08-04 13:25:56 -04:00
Augustin Cavalier
74662b662d DoublyLinkedQueue: Adjust API to match that of DoublyLinkedList.
It appears nothing actually uses this method anyway.
2023-08-04 13:17:18 -04:00
Augustin Cavalier
5d8502cb2b bluetooth: DoublyLinkedQueue is not actually used. 2023-08-04 13:16:57 -04:00
Augustin Cavalier
65c74c6474 DoublyLinkedQueue: Adjust whitespace.
No functional change.
2023-08-04 13:11:52 -04:00
Augustin Cavalier
5590a8194b network/protocols/unix: Recheck fShutdown{Read|Write} before socket notify.
They may have changed, and we must not use the socket object if they
are set.

Related to #18535.
2023-08-04 12:59:15 -04:00
Augustin Cavalier
967ab75d8e network/protocols/unix: Fix UnixDatagramEndpoint::Close().
1. Set fShutdownRead & fShutdownWrite. This is necessary
because in Send(), there is a lock-unlock dance between the
source and target sockets which could potentially race with
some other thread closing the socket. The "shutdown" state
is checked before actually writing, and so we need to set it
here. Otherwise, the other thread could allocate a new receive
FIFO for us, which we do not want.

2. Don't return early when unbinding, but only if there's an
error (there shouldn't be.)

3. Merely ASSERT() in Free() that closing was already done
and nothing remains to be deallocated.

Should fix #18535.
unix_dgram_test still passes.
2023-08-03 17:10:56 -04:00
Augustin Cavalier
363e0cdf69 kernel/fd: deselect_select_infos must be called with io_mutex held.
When the select/deselect API consumers invoke deselect(), they
expect that when this function returns, no further references to
the select_infos will remain and they can be safely deleted.

In order for that to be true, we cannot remove the select_infos from
the list in one step and deselect them in another; we must do both
without releasing the lock in the middle.

Should hopefully fix a rare KDL seen while testing .NET and
the new event_queue.
2023-08-03 17:04:55 -04:00
Augustin Cavalier
904e9f5512 DoublyLinkedList: Rework Remove() function.
* Check fFirst/fLast instead of previous/next. Avoids
   list corruption when trying to remove already-removed
   elements, instead will cause null-dereference KDL.

 * Always set next/previous to NULL even when DEBUG is not
   enabled.
2023-08-03 13:18:26 -04:00
Augustin Cavalier
5ae1a17908 Revert "DoublyLinkedList: Add a RemoveAllBefore convenience function."
This reverts commit c6cd9b51a2.

This wound up being unnecessary for the event_queue implementation,
and furthermore is of dubious value in general.
2023-08-03 12:45:36 -04:00
Adrien Destugues
75d92dbdda df: move mountpoint column last
- Follow POSIX recommendations (even if other parts of the output don't match)
- If the mountpoint path is long, don't shift the other columns

Change-Id: I0ebfa2d6dca34792da8c3a26d996271298e0e65a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6380
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-08-03 15:30:15 +00:00
Trung Nguyen
abf8d2e209 unix: Report connected status to socket module
Report connected status to the socket module. Otherwise, operations
like `getpeername` would not work correctly.

Fixes #18534.

Change-Id: I99d047f0d7b4d442cc2b3ea9222b0d89d216c1ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6719
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-03 06:47:44 +00:00
PulkoMandy
3a6bc1cf65 SerialConnect: implement clipboard paste
Change-Id: Iaddb6588afa774bcffad9713f280a0078784605a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6770
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-08-02 21:16:56 +00:00
Augustin Cavalier
4ae33413f2 kernel: Add errata patching for AMD "Zenbleed".
Part of #18525.

Change-Id: I6b5d73f6634d122dba13ad9544f340358ddef113
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6767
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-02 15:27:07 +00:00