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 1250fb8422452dc141778ed0e978ff8e0bc5ea08)
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 b67f8f8f1468eb58a18a6aa67b99c51fa6975cc8)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8134
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The previous change to this logic (9921f444625e360674f92db84ffae695492233a5)
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 63b183cd7c8743793d2903baf993efbcd200874d)
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 d6f2eb5368c4bf31247169586d095b5631eb37de)
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 a2ef50a4486160e442230e29dfdf409acbea3181)
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 1c22c2608fc46aa8b2bf42a3160bf12cbd95a50f)
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 ad0d2e43c3713948d850b93472dc54d49bb77334)
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>
Otherwise the controls look like they are "disabled" and can't be
edited.
Ideally this class would be refactored to use BAbstractSpinner rather
than drawing its own arrows, but that's a problem for another day.
See inline comment: otherwise it might be deleted when we
release it in Disconnect() but before we unlock it.
Also fix _LockConnectedEndpoints() to unset the locker object if
returning an error, rather than returning a locked endpoint that
we don't hold a reference to.
Fixes #18927.
(cherry picked from commit 33e9a82042d48c3e18dabc360c3854cf2ebe05dd)
Change-Id: Ib349cd312a4f41d3f699f875a98ca89c9540bc5d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8126
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
... instead of making a copy like normal. This changes the default
behavior, you may override it by context-click dragging and selecting
Copy or holding the option key to force copy.
Implements #18729
Change-Id: Ib13bec347f300d25de77064ced79693ecbc3a85c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8144
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 2f621127f10412a58a700d261cc8eccb835baf67)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8124
Fixed dynamicDate used without initialization at line 730,
since GetPredicateString() might not set value to dynamicDate.
Pointed out by Clang Static Analyzer.
Change-Id: I4698fdada4b91183c7bdba5aa980ddc6b55e6312
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7946
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 d12f9b56059df7b1ab2adb811f9a6184ef02f629)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8120
So we need to check that it didn't when creating areas.
Change-Id: I4342463113046b543722faa7a51ca269ed67e8bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8137
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit cae7920b1eecd4cac167fa5dace57f3c3f675c4e)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8118
This restores cut items state to full opacity on paste.
Reverts the part of hrev53329 for cut items. We only copy duplicates
on copy operations, not cut, but we have to make all cut operations
copy after paste is over to restore the state. The clipboard mode is
altered but not the contents.
Fixes #15267
Change-Id: I8a036a548719fe49c512bd38ff1a072890ab2325
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8100
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 8c124cce0c40b738c559b6e60c60b80480ebdfc1)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8117
* Initialize pm_firstcluster in dosfs_identify_partition for use by
read_label, for FAT32 volumes. This is necessary for reading the
volume name from the root directory.
* Create label_to_fat() and call it at both points where volume
labels can be assigned, for uniform behavior in setting
labels. Force all-caps when setting labels, for widest
compatability of the volume with other systems.
* Remove the redundant LABEL_ILLEGAL string listing illegal label
characters, and consistently rely on sAcceptable (a list of legal
characters) when setting labels.
* For clarity, rename sanitize_label() to label_from_fat and remove code
that causes labels to be displayed to the user in all lowercase.
* See #11119.
Change-Id: I7b5e6b998f13d9eb7ba56ed50c0d53b8c051fad0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8115
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit d648149f6682cdc1bcb2de0ab65afbb1110a4024)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8075
* Add a menu item at the bottom of Tracker's "New" menu and all
submenus to "Add new submenu...".
* The menu creates a folder "New submenu" under
"~/config/settings/Tracker/Tracker New Templates" and adds the
attribute _trk/_template_submenu = true to it. That results
in showing it as a submenu in Tracker's "New" menu.
* Finally "~/config/settings/Tracker/Tracker New Templates" is
opened and selected, so the user can edit the folder name that'll
appear as submenu label in the "New" menu.
Change-Id: I1783f8a88c8e56fbe33012c7312cc97e9401f7f5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7931
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: humdinger humdinger <humdinger@mailbox.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
(cherry picked from commit f73431b3ad57f05c976e2171ac582320815a303d)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8074
Make TextColor() and BackColor() virtual in BPoseView so that we can
override them in subclasses. These are used to invert colors on select.
Move InvertColor() and InvertedBackColor() to Utilities.
Move Desktop...() methods to DesktopPoseView overrides, this does the
same thing but in DesktopPoseView as an override.
Add override methods to Open with... pose view. Open with... window
text color were not updating with color settings making text unreadable
in dark mode. Open with... background and text colors update based on
tooltip colors which was chosen previously.
Change-Id: Id605f1887d6018766b09a6de372b6071de8b83ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8105
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 9d4d102df2147ca981aaa81080601690412aaee0)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8072
* Skip the complete comparison of FAT mirrors if the FAT size is over
4096 blocks.
* This complete check was not done in either the previous Haiku
driver, or in the original FreeBSD driver that the current driver is
largely based on.
* Remove the media descriptor byte check of the active FAT, which is
redundant with fillinusemap().
* Follows up on #18969.
Change-Id: I34dd1d71852e1f3e9dc42d125759989c091f5108
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8095
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
(cherry picked from commit 2bca8281a31b0ce8e99f5648b98c0eba7c04e6b9)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8071
Instead just proceed as if no package was found.
(cherry picked from commit 8ce920280db3214e876b050454b25708c7c28c96)
Change-Id: If6721b988928481db00fdbef4c4c279554301873
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8068
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
We always skip loading debug information in this case, so
querying the package kit is just a waste of time. And it could
result in hangs or crashes if the package kit is in an invalid
state (e.g. if we are debugging package_daemon.)
(cherry picked from commit 69f1c57f0cc40fd0d32e61dc01507b234e498df8)
Change-Id: I9ce322bce111a458e830ace2286274bae126a861
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8067
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
e.g. if package_daemon doesn't respond, it may throw an error
on initialization, which we don't want to bring us down.
(cherry picked from commit d1d5a4b958c6380f6833fb4df18ed649bcbf32f4)
Change-Id: Ibe4ff9752b9d6f71cb1ee5d1fda83b02927f6794
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8066
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Rework redirection to not use synchronous XHRs.
* Fix QuickTour LoaderPage (and update bookmark to point to it.)
* Change default view of LoaderPages to List mode.
* Other misc cleanups.
Fixes #19005.
(cherry picked from commit 0e07f2994d28a37f95094ec28a1eb0bf549f4998)
Change-Id: I9da8d80f5e04af6ef5bf519cf44120caf4b29a96
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8065
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Just for the beta branch. Can be reactivated when fixed.
Ticket #18023.
Change-Id: I9dafc6a7fe72c1144fde8b07bafd59952d1310a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8080
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Ensure that when initializing a FAT partition, the media byte value
assigned in the bootsector matches that in the first FAT entry.
* See #18969.
Change-Id: Iffc3dd7549b918954e9145a2a02221616c38a016
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8081
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 493cff03288e08000a74225530dfb2239769b027)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8063
This time in the datagram logic. Also clean up some of the logic
around unsetting the data from the request after adding it.
(cherry picked from commit 3fb6cfce6b4b586a5a76fc4c269c9944f06307e6)
Change-Id: I8dbb824503b8c3cbcdc2e11dde6ac03d244d1a35
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8062
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Otherwise we would support sending up to 32 FDs on 32-bit and
only 16 FDs on 64-bit. This way we will support 32 FDs on both.
(cherry picked from commit ad20cd0c530a28ed2cd838a655e93c3bd7c96c64)
Change-Id: I36613ab1e6ac135f7fb307282a6a6d20abc437ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8061
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
We freed its contents but missed deleting the container itself.
Fixes a 2-pointer-size memory leak on every use of ancillary data.
(cherry picked from commit da1e76be7945e6cbb558a8264b8d4f8d836b6cd9)
Change-Id: Ia2862d60e9a71a9db5ba02f0eacdbbeea23cd356
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8060
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The sanity check of the physical_page_number can't work in many cases
since physical page ranges may be discontiguous. Instead what we should
check here is that the page structure address is at an expected offset
within the pages array, and print messages if it's not (and also don't
try to read the mappings linked list if it's not.)
This would have more easily caught the problem fixed in hrev57945:
the KDLs that commit fixed were "invalid concurrent access to page",
but with a very large "expected" number, indicating an overflow.
Change-Id: I784c183c2c146077ffe3c1dede2e54817bde52c7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8051
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit e1c13f3ff7b700c20dde1e82febd5ada14b14330)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8058
Add the area of the tab that just got removed from the stack
to the update (redraw) region so that it will be redrawn.
Fixes #16006, #18517
Change-Id: I5a26c353e2dd2e63f72440ddd0b522b52b02b2a2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8046
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: X512 X512 <danger_mail@list.ru>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit d35bcb118c183533f29733bfce1a29cf6fe8150f)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8035
This avoids starting the clock at 00:00, just to jump to current time.
Change-Id: I911b60716ab60722e4ac38a3d597ab495fb5945d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8049
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 03766d494bea7e39b5a9114a445e8bf904976ff1)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8033
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This is what AcquireStoreRef/ReleaseStoreRef are for. We don't use
VMVnodeCache here because that is a non-"temporary" cache that
writes its pages back to disk, while we need a store for the pages
that won't discard unmodified ones when memory is low.
Add a close() to the mmap_cut_tests, which triggers the case where
this is important (a file is unlinked, mmap'ed, and then the lone
FD referring to it is closed, triggering the file's deletion unless
the mmap also acquired a reference to the vnode.)
Fixes KDLs with Firefox test builds.
(cherry picked from commit c0a12a6b7d697382511ff36e7815aad6a379b3a7)
Change-Id: I589325966f7b8eb837750aea1f5adbdd94e06aeb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8028
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
ramfs needs to create caches that are both temporary and unmergeable,
so add another flag to make this state possible.
Otherwise, mmap'ed files from ramfs might wind up in VMCache
trying to merge the caches when the last one is closed, which
we don't want.
(cherry picked from commit a8877df135c0395285945b11a75d57e10b7aecdf)
Change-Id: Iec9549f5f36207968e1502ce1a0d5fb9354f02d1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8027
Reviewed-by: waddlesplash <waddlesplash@gmail.com>