This reverts commit 6211ae2575.
It breaks multiple applications that worked fine on BeOS,
so clearly this tweak was correct after all, or at least mostly correct.
Change-Id: I3b228ba2119dd33067b8defedd6db4ae9ead9124
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8537
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit 8500b11c43)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8597
_kern_fcntl operates on kernel FDs, while here we have user FDs.
Should fix #19195.
Change-Id: Id216d294b112d3a7e479939d8b2f15f35bc40318
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8505
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
according to POSIX:
- O_NONBLOCK set:
* read-only open() shall return asap
* write-only open() shall return an error if no reader.
- O_NONBLOCK clear:
* read-only open() shall block until a writer opens.
* write-only open() shall block until a reader opens.
for FIFOs used for pipes, open with O_NONBLOCK then reset O_NONBLOCK.
can be tested with:
bash -norc -c '/bin/printf "test" > >(/bin/tee -a trace.log) 2>&1'
Change-Id: I3cb70810fec50f643b5e6e84dbdeb0a16961936a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8469
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8506
Fix off-by-one issue and the init of the
default language in the case there's no
network connectivity.
Resolved #19090, re-raised as #19141 on R1B5
Change-Id: I1b16bd77ea71f2617100911df4222b5528537721
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8432
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Instead of traversing the list of input devices when we are not given a
mouse name, update a list of currently running ones on device start and
stop. This makes the input_server message loop independent of other
threads holding the device list lock.
Fixes: #19100
Change-Id: I2d0d55da04fa506bef88bf731e1a719a64958a17
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8359
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit cbc8ea5218)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8397
We automatically enable _DEFAULT_SOURCE if _GNU_SOURCE is defined.
Rather than having even more optional methods undefined unless
_GNU_SOURCE manually is, just change all remaining guarts to
use _DEFAULT_SOURCE instead.
Fixes #19095.
Change-Id: I5c7baf40b7fb37913e24279589fc1ae706448a45
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8330
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit ca0afc640e)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8286
We set flags above the timeout check, so we need to use |= and
not lose the SHARED flag we already set.
Fixes some testcases in the POSIX testsuite, and the shared
semaphore code in Gecko/Firefox.
(cherry picked from commit d29c0e6ee5)
Change-Id: Id6080a4f3b768d9b937efc5fde7761148d071735
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8285
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* also set the active checkbox on edit
* part of #7930
Change-Id: Ia91e5f7295e7868647cf940aa1f281bd8dab1918
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8323
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
(cherry picked from commit b52bc7800a)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8284
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This amends 352548d0a3.
If the thread was migrated to another CPU after it was blocked with a
timeout and then was unblocked without needing the timeout, this handler
could possibly race with the thread waking up on the other CPU, resulting
in the other thread thinking it doesn't need to cancel the timer when
the timer is still in the process of running.
May fix #18983.
(cherry picked from commit fcae3b6674)
Change-Id: I21325f7a23e9ff1e5e48a08c2e1bd1be73d279fe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8282
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
If we just unblock all threads without actually releasing the lock,
then in the case where all threads have performed the atomic_add
but none have actually started waiting, we'll deadlock forever.
Fixes Mesa deadlocking when using our pthread barriers (at present
it's been using its own.)
(cherry picked from commit cfdc362817)
Change-Id: I450d41e367242a6e5c9b3843d1483b56598f3754
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8280
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Otherwise the low_resource thread's run may complete before we
even start waiting, which makes things much slower as we then
have to wait all the way to the timeout.
(cherry picked from commit c07586a343)
Change-Id: I7bc272448157136287ee5045cb724395032c4c9c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8279
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
... before the text is loaded by checking that the text document is set.
Remove fMouseDown member and MouseUp() override.
Get mouse button down from the current window message.
Call inherited BView methods.
Fixes #19077
Change-Id: I79edb1860e3bd7864d2362d7f59fb3a583d19053
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8260
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 886c580309)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8277
If it's more than a second in the past, continue delaying.
May help with #19074 and/or #18981.
(cherry picked from commit 0d71a44091)
Change-Id: Ifc88ef6787fb3374d2cbc281c75379191a37fa93
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8276
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The maximum supported descriptor count is used at least in virtio_block
as the maximum vector count for IO operations. When the indirect entry
count is set lower than the supported one and indirect descriptors are
used, virtio_block can overrun that count as it was given a higher max.
Queuing would then fail and lead to transfers that never complete and
timeout after 10 seconds because the return value was not checked.
This was easily reproducible with lots of disk IO under QEMU where such
indirect descriptors are used with a maximum of 256 while the previous
hardcoded indirect count was just 128.
Change-Id: Id6f87b318e93506b04e65807d627a1cf2e8e39b5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8178
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
(cherry picked from commit b9addf62e9)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8209
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Otherwise, if the thread is currently running, its runtime won't
be included in the returned statistics.
(cherry picked from commit ace43da6f9)
Change-Id: Idb6874862587979add49d9879d2d689ab9e7ff7a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8208
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Anyone I've moved, I didn't see any signs of code contributions
or reviews, tickets, or forum posts in the last year and a half
at least. They may still be around and reachable, but I don't think
that suffices to be a "Haiku maintainer".
I've also moved Alexander up in the list of maintainers; the "Past"
list doesn't seem to count "von" for the alphabetical sort.
There was also one mis-sort in the past list which I've fixed.
Change-Id: If6763372be6a23b24bc0f781243e198d1734a849
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8239
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit 02ead6bb39)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8207
BControl adopts parent colors on AttachedToWindow(). Use the
adopted view and high colors for BControl derivatives before
using B_CONTROL or B_PANEL colors.
Affects the following controls:
Spinners
Checkboxes
Radio buttons
Sliders
Text controls
Buttons (get control text color already, don't pass it in.)
Affects control colors in HaikuControlLook and BeControlLook,
FlatControlLook control colors derived from HaikuControlLook.
Do not remove control flag before drawing label, we get the
correct label color now. The fallback colors are only for if
you override AttachedToWindow() on your BControl subclass to
prevent adopting parent colors.
Change-Id: I9357c0287898bff48c695a7869f3b8be108c02ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8235
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 42df4f9689)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8206
We do not always use radio buttons and check boxes on panel color,
use the parent colors instead if you have them. The label is left-
center aligned.
Change-Id: Id5cbd98e8ae88d3a65fb0735d45b2ad19c4afdf9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8233
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit 5333610f85)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8204
... instead of list view background and panel text foreground.
Document color is appropriate here, this is not a list and we
don't want panel colors. Document color yields same result
as list color using default colors: black on white.
This changes the colors of the inside of the dialog that says:
"The following additional package changes have been made:" and
"The following problems have been encountered. Please select a
solution for each:"
fixes #19068
Change-Id: I5b721ad8703c73aa2da323eb189fa22033d44e5a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8232
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
(cherry picked from commit 325c28a8ae)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8203
The colors in the user usage conditions are
corrected.
Change-Id: I509441f5185ec521053045d2406d901a0644b0c7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8234
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
(cherry picked from commit 6bcd36f8c3)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8201
If a multibyte Unicode character is specified to MultibyteToWchar
one byte at a time, then resetting the state will lose the data
for the second character. We thus shouldn't re-read but instead
keep the existing character and just read the second one.
Fixes #19035.
(cherry picked from commit 0559911493)
Change-Id: Id96595440d3cc88f6358355c9c46502f46c4b71a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8199
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
We can be called with a timezone that isn't the same as the one
set in the current locale, in particular from gmtime(). We thus need
to handle this case properly by checking that the gmtoff is really
the timezone in the locale, or if it's GMT, to just use a static
string for the tm_zone instead.
Fixes #19047.
(cherry picked from commit 5b4d5ef897)
Change-Id: I946894c17ff0ad4947c6491d54873f6452a06aa7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8198
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The local transferEndOffset should be relative to the parent (us),
not to the underlying filesystem. We thus need to subtract our
own offset from the operation's offset.
This fixes a regression from be8080575a.
Errors transferring data should now be properly reported in more cases.
i.e. not on Deskbar team menu, menu field menus or the clock
options menu but all regular menus at the top of the window
and other context-click menus.
Change-Id: If551aecd040500973a92fda2138b6ffe03cda279
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8154
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
(cherry picked from commit 3d7db41032)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8196
Some things that call these macros put expressions in them; to avoid
operator precedence problems we should put them in parens.
Change-Id: I57335ffb190c484778c4bc8075d5ca3597f1e7e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8184
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 1250fb8422)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8135
After settings Backgrounds to None for all worskapces, I was getting a 100%
reproducible segment violation on "fShowingBitmap->fBitmap->Bounds()" with every
resolution change.
Change-Id: I2a3640a3c33e571d772c1b38b21087346215dca8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8176
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit b67f8f8f14)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8134
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The previous change to this logic (9921f44462)
apparently caused intermittent crashes with various applications. It
seems that EDX is not expected to be clobbered by functions that do not have 64-bit return values, and if it is, crashes result, like #19024.
This commit reworks the logic to not change %edx in the iframe at all
if we don't have a 64-bit return value, and then adjusts the debug logic
to clear %edx before invoking the post-syscall debugger hook. This means
we have to run the post-syscall debugger hook before clearing the
flags, but that should be fine (and perhaps even useful.)
Fixes #19024, and possibly other crashes that have cropped up on
32-bit x86 in the last few weeks, at least.
Change-Id: I3280033bc2dd05aca254555d6ee3b173a270ebf9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8158
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Michael Lotz <mmlr@mlotz.ch>
(cherry picked from commit 63b183cd7c)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8128
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
... whatever motivated this to only work on disabled text views
has been resolved.
Change-Id: I3ae9d056870f1163d3fa074ab9a1dad96c0192f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8168
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit d6f2eb5368)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8133
We don't need to set the top here, it is already set by CalcRect()
a couple lines up. Our calculation was slightly off causing bug.
Fixes #12558
Change-Id: I022cc661cf55a9d016fd722c701f05fc1f9fea4f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8165
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit a2ef50a448)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8130
This is the only case the POSIX specification indicates is portable.
We may be able to implement some of the others that Linux or the BSDs
support if it turns out there are applications that want them, though.
Fixes #19032.
(cherry picked from commit 1c22c2608f)
Change-Id: I10f936e0f58f3beb518e46a3e93e748dddeb0754
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8129
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The fRenewalTime and fRebindingTime members were never initialized but
assumed to be initially set to 0 when not provided by the DHCP server.
This could lead to negative time values depending on the uninitialized
memory content and would always happen under libroot_debug where memory
is initially cleared to 0xcc. The negative times then lead to endless
loops of sending requests.
Change-Id: I74a5fbd0c75f7de925f591f09db663978ea3f0ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8157
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit ad0d2e43c3)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8127
Minimum menu field width is set by "multiple selections" string width
on volumes menu field or a smaller size that matches R1B4 on rest.
Maximum menu field width chosen to match current based on font size.
Set the max content width to truncate long mime-type names that don't
fit. Add room for the pop-up indicator.
Create member variables to hold menu fields. Resize the menu fields in
AttachedToWindow() after they have been marked because the width
depends on the marked item.
Set member pointers to NULL in constructor where not already set.
ASSERT variables we use are not NULL, they aren't but check anyway.
Use DefaultLabelSpacing() for the spacing between icon and text to make
them font sensitive. DefaultLabelSpacing() is 5px at 12pt font matching
current.
Fixes #18999
Change-Id: I0e52b5aa557c8b5d76f09e0b60fcb965e3ff65e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8143
Reviewed-by: waddlesplash <waddlesplash@gmail.com>