Previously the DataView relied on the default colors, which layout now
overrides more uniformly. The document colors are more appropriate.
After the addition of the layout changes, the DataView would adopt
system panel colors.
Fixes#12572.
Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
As per API documentation, a BView caches the configured view
colours when not yet attached to the app_server via its
window. So check if we're attached to a window, and if we are,
then and only then do we attempt to lock/unlock our looper.
This fixes uses of AdoptViewColors and AdoptParentColors when
the view isn't yet attached to a window.
Previously the layout would crush the default colors of BStringView preventing
BStringView from calling AdoptParentColors() on its own, so we must call it
manually.
In addition, the default tooltip view should fully adopt tooltip colors so
that any colors will default to the desired foreground color (which is the
same as the tooltip text color).
Fixes#12573.
Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
* The actual problem is that the launch_daemon does not notice the
manual launch of system services (because of the missing registrar
that provides that service).
* So not checking if the print server is running actually solves the
issue; otherwise the launch_daemon starts its own server, that will
then get shut down, as there already is a print server (the one
launched by the Printers preferences).
* Closes ticket #12531.
The MIME type that's created by WonderBrush contains an out-of-date
sniffer rule. Archived BMessages used to start with '1BOF', now it's
'HMF1'. That's why newer WonderBrush images aren't identified as such.
The new sniffer rule should detect both old and new files.
What appeared to be multiple issues was just one issue: BButton was drawing the
control background color for its border, whereas the previous system drew the
control low color, which was the parent's view color.
Neither is correct, no border should be drawn at all.
This made it appear that the default button was larger than it was and also
made it appear that some apps had a "white" border around the buttons.
In addition, BButton can now use the default BControl color behavior and
BButton exclusively adopt either parental or system colors without worrying
about the case in which another view has set the button's view color manually.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Previous colors matched the menu background color, but should have been
darkened.
The tint value was not being updated for the SetViewUIColor call construction,
therefore the tint parameter was still B_NO_TINT.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Repair regression where low color for text drawing was not set properly.
Do not use tinted color for default color state.
Prior to this, the hinting font would not respond to being pressed and the
column title background was the wrong color initially, but correct after
resizing (but then wrong again after a redraw on exposure).
In addition, the initial tint values used for the view color were unused,
so I removed them.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
* The direct methods in BMailProtocol now forward the request to the
looper; it's no longer the mail_daemon's responsibility to know
anything about that protocol.
* It's in desperate need of refactoring, but it doesn't hurt to add
it to the repository as is.
LinkReceiver would spin endlessly when given a timeout value which prevented
DelayedMessageSender from being operational.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patch 0002 from looncraz, unmodified.
This was a bigger change than many others as BButton now defaults to using
control background colors, and we can not do that here without the buttons
not appearing as we desire (blending in with the toolbar).
Using the control background color for the toolbar would be unacceptable.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patch 0041 from looncraz, unmodified.
InfoWindow now uses the font size to determine the window size and
placement of elements. Also uses system colors, including link
colors. Permissions view not font sensitive yet.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patch 0039 from looncraz, unmodified.
The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.
BView gains:
HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()
BWindow gains a simple helper method:
IsOffscreenWindow()
BMessage gains:
AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()
Previous private ColorTools methods are made public and moved into GraphicsDefs:
mix_color, blend_color, disable_color
These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.
In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR
These changes are documented in their proper user documentation files.
In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.
On the app_server side, the following has changed:
Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.
Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.
In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.
Decorator changes are live now, which required some reworking.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
* When cloning a cached mask, we have to attach the
AGG rendering buffer of the new instance to the AGG clipped
mask object. Before, it was using the buffer description from
the clone source.. which can later disappear at any time.
* Fixes bug #12478
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
This is a squash of the 42 commits by @mshlyn, as I couldn't find a
way to break them into logical chunks. I did not include these in the build,
as it appears that they only partially work anyway, and much more cleanup is
still needed. However, this is a huge improvement on what was in the tree
before, which looked horrendous and didn't even compile (as it was designed
for the old stack).
Mostly fixes#812.
* Fix Endpoint Context Initialisation (Refer xHCI v1.1 - 6.2.3)
* Fix Interval Calculation (Refer xHCI v1.1 - 6.2.3.6 , USB 2.0 - 9.6.6 page 271)
* Fix MaxBurst, MaxPacketSize Calculation (Refer xHCI v1.1 - 6.2.3.5, USB 2.0 - 9.6.6 page 271)
* Fix MaxESITPayload Calculation (Refer xHCI v1.1 - 4.14.2)
* Remove Link TRBs as they were never being used
* Increase Number of TRBs per endpoint (to utilise the whole area allocated for Device TRBs)
* Fix usage of XHCI_MAX_ENDPOINTS (most of the checks were failing at corner cases)
* Some coding style fixes.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Before this patch, writes to USB disks on XHCI in VirtualBox (which emulates
an Intel C210) stalled or failed. After this patch, they apparently work,
although I got mixed results - a BFS disk seemed to work perfectly, a FAT32
one also seemed to work OK but after a reboot there was data corruption. USB
mouse is still as busted as ever.
These are now done in AcpiInitializeSubsystem(), as part of the
early init so they can be present when the tables are loaded.
Should fix ACPI not working since the merge.
Requested by RudolfC. Apparently there was a regression which prevented
ACPI battery/power from working on his system, which was fixed by
https://github.com/acpica/acpica/commit/a3267967c.
The only testing I did with this was confirm it compiles and boots
in a VM, so apologies if this breaks something else.
The heap implementation of the runtime_loader was switched to the one
of the bootloader in 6f0994d but was since updated independently.
To keep the diff between the two implementations as small as possible,
the bootloader implementation was first copied to the runtime_loader
and then some features not relevant in the runtime_loader (like the
special large allocation handling) have been removed and the
runtime_loader specific features (grow_heap, add_area) have been
reintegrated. But basically this applies 96689a5..HEAD of
src/system/boot/loader/heap.cpp to the runtime_loader heap.
This brings in the switch from a linked list to a splay tree based
free chunk management. Since the allocation counts in the runtime_loader
are rather small, this does not perceptibly affect performance in either
direction though.
The needed storage space for tracking the allocation size was not
accounted for when growing the heap. Since the growth size is always
rounded up to a multiple of 32KiB, this did almost never matter as the
new allocation wouldn't need the full size. If the allocation did
happen to need the full size however, the newly added area would always
be too small. As the allocation attempt was simply restarted after each
successful growth, this lead to an endless loop creating small new
areas, which would then quickly starve the system for memory.
Haiku does not yet support certain features related to POSIX threads.
Constants used to test for the presence of these features should
therefore be left undefined, according to the POSIX spec, but are
currently set to -1. This can cause software built on Haiku to
incorrectly detect the presence of these features.
* unistd.h: Undefine _POSIX_THREAD_ATTR_STACKADDR,
_POSIX_THREAD_PRIORITY_SCHEDULING feature constants.
* conf.cpp: __sysconf: Return -1 for unsupported features.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
This code is closer to what we used before for gcc2, and should not
crash there anymore. I could not get exactly the same code to work, but
reduced the difference to a single statement (which makes gcc2 work and
breaks gcc4). This is protected under a guard with appropriate ffmpeg
version test.
This code works for both gcc2 and gcc4 (tested with mp3 and aac files as
well as youtube videos). It still gets the timestamps wrong with ffmpeg
2.4, but I'll try to solve that another time.
Commit 856cc59e58 didn't really "fix"
anything; it just broke audio pretty much everywhere but YouTube,
and there videos play at 2x speed so it wasn't really worth it.
Stopgap solution for #12509.
* Move !missing_symbols.cpp in the legacy directory.
* Move useless methods in a Deprecated.cpp file.
* SetRealtimeFlags / GetRealtimeFlags are useless, they
don't make sense nowadays.
* The symbols are anyway preserved.
* People interested, please review!
* This is based on the patch from Fredrik Moden which was based on
the Oleg Krysenkov one.
* The original patch has been reworked by myself.
* Adapted the code to work with the new PluginManager API which
differently than before doesn't need to contact the media_server.
* BMediaRoster is now capable to know which nodes are
instantiated in this team. This is also a first step to make
them survive after media_server crashes.
* A control at BMediaRoster::Quit can notify if all nodes
were correctly released. Ideally at this point the local nodes
list should be empty.
* BApplication can now take the job to quit a BLooper at
the application quit. It's rejecting requests from windows too.
* BMediaRoster is using now this service in conjunction with the
MediaRosterUndertaker.
* The BeBook specify that we should have a valid BApplication
before to instantiate the BMediaRoster. While in theory we should
add a debugger call when this situation happens, in pratice this
might lead to more problems. For example libraries might use the
media_kit and create a BApplication object, but they aren't
applications, this is a design problem. So I decided to replace it
with a TRACE call for the moment.
* If a requirement cannot be launched, a job is now added to the
requirement as pending job.
* If the requirement enters the launch queue at a later time, the
pending job will be put there, too.
Check for partial matches on the product_name string.
Tested with a USB card reader and an SD card.
Feel free to add icons for Compact Flash and Secure Media and more matches.
DebugReportGenerator/UiUtils:
- When traversing the value node graph, detection of the case of
an address type with a compound child wasn't taking type modifiers
into account, leading to it sometimes not traversing down to members
when it should, and consequently not reporting those members in a debug
report.
* It still doesn't work correctly yet again, though; the servers cannot
be configured there.
* I'm leaning towards removing the server configuration there, as they
can easily changed in the add-on preferences from the same preferences
application; the way it was done was pretty much a hack. Any hard
feelings about this?
This commit replaces the placeholder implementation of sbrk(), which
operated on a process' heap, with real implementations of brk() and
sbrk() that adjust a process' program break.
* unistd.h: Add standard definitions of brk() and sbrk(); include
stdint.h for intptr_t.
* thread.cpp: Recognize RLIMIT_AS and RLIMIT_DATA resource limits
(both currently unlimited); order limit identifiers alphabetically.
* arch-specific.cpp: Remove sbrk_hook().
* malloc_debug_api.cpp: Remove sbrk_hook().
* unistd/Jamfile: Build brk.c instead of sbrk.c.
* unistd/brk.c: Add.
* unistd/sbrk.c: Delete (placeholder implementation).
* libroot_stubs.c: Remove sbrk_hook().
* libroot_stubs_legacy.c: Remove sbrk_hook().
* src/tests/.../posix/Jamfile: Build brk_test.c.
* brk_test.c: Add (simple unit test that demonstrates behaviour of
sbrk()).
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
* The message to send the mails never made it to the add-on looper.
* Mail protocol threads now have names.
* Added a "public" BOutboundMailProtocol::SendMessages() call that sends
itself a message (even the correct one this time).
* This caused the window to grow each time.
* This was especially noticeable at applications that store their
size on quit, and restore it on start.
* This fixes bug #12456.
In 2346363b, had corrected the offset writing to the disk, but missed
correcting the offset for reading from the entries struct.
Instead of writing a block, just write the single entry, simplifying
the offset logic considerably.
Some codecs will always output audio in planar mode no matter what we
request. This is the case for example with AAC used for youtube. We now
use swresample to convert from planar to packed format.
Note that since swresample does its own buffering, we could probably do
away with some of the code that handled buffering before, making the
audio pipeline simpler and faster.
Fixes audio in youtube, but now the video plays at 2x speed. It seems
something is wrong with the timestamps. Possible things to investigate:
* why do we use the packet dts instead of the pts from the frames anyway?
* the pts and pkt_dts are in "stream time_base units". We seem to assume
microseconds for audio but this is probably not the case. Or did I
miss where the conversion is done?