Some non-layout applications start out with negative
view dimensions. Making them positive too early on can
break the view's appearance, it seems.
Fixes#18690.
* Break segment setup out into its own method.
* Break the actual sending logic out into its own method.
- While at it, remove some old/obsolete comments and
rearrange some of the logic to match.
* Separate the send-pure-ACK and send-data methods.
- This way, the "force" parameters will act differently,
specifying "force" to SendAcknowledge() may generate
a duplicate ACK, while to SendQueued() it will either
send data smaller than a segment size, or do nothing.
Functional changes should be minor, and the code
meanwhile should be much easier to read.
Change-Id: I1e14b9a1e3b7c8b2d3bf8ae30f1369d8c9f662a4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7361
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Each packet needs to be its own TD.
* All transfers are scheduled in frames, not microframes.
Combined with a few fixes to the USB audio driver, this seems
to get things working much better than before.
If the route supports a greater MTU, we need to
clamp it.
The loopback reports an MTU greater by one byte
(65536), and if we don't clamp it here, TCP will
try to send packets actually that large (and fail.)
Left behind when we moved from changing only /usr/bin/env to anything
under /usr/bin.
Change-Id: I9ceba844e18deda5f3d395fc6b5df84a1a8ce363
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7360
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
ItemUnderAt was returning items that were not under the superitem (this
was fixed for EachItemUnder in hrev52210).
Make a NULL superitem mean the parent of the topmost items. Despite not
being explicitly documented in the BeBook, that's how BeOS works, the
MenuWorld test app uses it and, well, it's handy.
Change-Id: I2551e8ce874a6238c5e5fb1eb742e68e62d3928a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7359
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Fix some copy-pasta and strange grammar.
Remove a note that seems unnecessary in context and easy to misinterpret
out of context.
Change-Id: If1ce26b293c8098c260a9697fb0ef0611a4958c4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7358
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Adds headers that have not been directly or indirectly included by
the "InterfaceKit.h" master include.
Change-Id: Id163e0e8db54bc553593819801e0e854cde78fa3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7376
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This fixes two problems:
- Use of a stable sorting algorithm makes sure that the relative
position between items that compare equal are not modified
- More importantly, the compare function in BList passes a
pointer-to-pointer (in this case a BMenuItem**) and this was masked by
the casts due to BList lack of type safety. So, BMenu::SortItems was
not working at all when trying to use it as its prototype would imply.
NetworkStatus and Network preferences worked around this by doing the
extra dereferencing in their compare functions. I did not find any
other places in Haiku where this function is used (it was introduced
specifically for this in hrev55562). All 3rd party code that had a
similar workaround will have to be fixed to remove it (if there is
anything using that function).
Change-Id: Ia78fd1363f2c012f6eff6f9a47e8b3aac2752ebd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7356
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Move DraggableContainerIcon out of ContainerWindow.cpp into new.
Move CompareLabels to Utilities.cpp
Rename fContainerWindowFlags to fOpenFlags. These are the flags set
by OpenContainerWindow to save and restore state and should not be
confused with the windowFlags that are passed to BWindow. There are
two sets of flags, which I'm calling openFlags and windowFlags.
Rename fUseLayouts to fUsesLayout and useLayouts to useLayout. Put
all the constructor created flags at the top.
"window" variable name is ok, we don't need to say "containerWindow".
Rename Addons to AddOns everywhere with a capital O.
Rename BuildAddOnMenu() to BuildAddOnsMenu() with an s.
Rename AttributeMenu...() methods to AttributesMenu...() with an s.
Rename SetUp...() methods to Setup...() with a lowercase u.
Replace a few instances of fPoseView with PoseView() inline in
BContainerWindow and BDeskWindow.
A few more minor fixes in BDeskWindow.
Replace BPoint(0, 0) with B_ORIGIN in Pose.h
Change-Id: If30803753b63b19e35f14c0f0c4e08111d0d0980
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7240
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
PoseView.cpp changes
* Create DoDelete() and DoMoveToTrash() convenience methods in BPoseView.
- Call DoMoveToTrash() in B_DELETE handler checking Shift.
Tracker: Update Delete warning dialog
This dialog pops up when you Move to Trash with Shift held down.
The Skip Trash version has been deleted since we've decided to
no longer using this settings.
Push Cancel button over to right on the "Delete files" version.
Handle default case in switches so that a weird value is returned it
will Cancel. If BAlert receives B_QUIT_REQUESTED it returns -1 for
example according to the Haiku Book so make sure to handle this case.
Add B_CLOSE_ON_ESCAPE flag and handle that case.
Change-Id: I16c532bfef585081207f1df3edc93f69dec6e529
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7199
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
The previous logic would link from the end of the ring to the start,
and the TRB there would always itself be a link TRB. Now, we avoid this
by linking back to the start from within the TD segments, and putting
the "Event Data" TRB there.
May help with some problems.
Change-Id: I92c4e135ee28c8c89646594a99fb40ee0d6c4484
Following the last commit, we can just let if_input
process the whole chain at once.
The logic here may not have been correct, and possibly
caused memory leaks under high-traffic conditions.
May help with #18585 and others.
There was a comment indicating where this happened, but then
there was a use of one of them after this point. Fix that,
and add { } around their use to prevent this from happening again.
The list of supporting applications is generated case-insensitive
by making all items lowercase, see
src/kits/storage/mime/SupportingApps.cpp:302
Force the MIME type to lowercase before calling GetSupportingApps()
or a MIME containing uppercase isn't found.
Fixes#18752
Change-Id: I38252cd1be8f059d7df4bf8775855b6343a489c0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7340
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
by default, AdapterIO is initialized with a BMallocIO object, which will
be extended indefinitely. Flushing regularly is necessary to avoid
excessive memory usage. Tested in StreamRadio.
Change-Id: I9f3142c0a2300ad44dc54ccf6932d41c9526320b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7302
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Rework the way in which the application deals
with screenshots so that there is a repository
of screenshots that is referenced from
identifiers on the package model and not that
the screenshot bitmaps are stored with the
model and not cleaned up.
Change-Id: I632def96852a518b3f6b1c8b81909de117bbbc54
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7296
Reviewed-by: Andrew Lindesay <apl@lindesay.co.nz>
sample for qemu: -device virtio-vga,edid=on,xres=1024,yres=768 -display sdl
display mode can be set in the Screen preferences.
Change-Id: If1d6aeecb208ce7c62c42eea1a95c71237c4375a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7038
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Instead, rely on commitment being done later, when the
protections are changed. set_area_protection() already
did just that, but set_memory_protection did not, so
it is implemented here.
Fixes#18733.
Change-Id: Ia58aee93faf1296fce69d723b12d0fa0a8440706
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7339
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* /dev/graphics/virtio_gpu/0 is a valid entry
* app_server doesn't set the initial mode if it's identical; use
0x0 as initial resolution.
Change-Id: Ica0323e6c5d78b39f05499edc93fa9c949b97dc8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7037
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>