* Actually set status before testing it
* sscanf (reads from passed buffer) not scanf (reads from stdin)
* &httpStatus not httpStatus.
Found by Coverity.
* the CDCE configuration happens to not be the first: iterate the configurations.
* we set the alternate control interface
* queue interrupt requests once opened.
It was deprecated in favor of -m, but -m then changed meaning to comply
with POSIX. So restore documentation for -c, and add proper
documentation for -m.
The domains could be deleted by other threads while we were using them
to handle incoming packets, leading to an use after free (deadbeef).
Keep a reference to the doamin as long as we need it so other threads
will not delete them.
Fixes#9721, #12567
Thanks PulkoMandy for teaching me how to use Debugger and part of the interface kit..
Fixes#12608
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Thanks for investigating and finding the problem!
Initialize the buffer.
Remove trailing newlines. Before, the dropped expression would
'scroll' out of view if it happened to have a newline at the
end.
Thanks to DeadYak for helpful input which pretty much changed
my original code about 98%...
Under normal conditions this will behave identically. But when using LD_PRELOAD
or the like, some shared objects (and dependencies) are loaded before the
app image is, and on the secondary arch on hybrid builds, will fail to load
any of their dependencies due to sSearchPathSubDir not being set.
Fixes#12214, which had plagued users of libroot_debug for a long time now.
ResizeToPreferred will only relayout the window once. Further calls will
not change anything, even if the text in the BTextView changed. So make
sure to compute the preferred size with a very high text view, and only
then, set the (rather short) english text.
This makes the text view large enough to fit the text in all languages,
and the window never changes size.
An application is allowed to set an empty drag bitmap. In that
case, the offset from the cursor doesn't matter, because there
is nothing to draw anyway.
app_server would end up confused by the empty bitmap (which has
no bits) and invalid offset (it would try to allocate a 2^16
x 2^16 pixels bitmap to fit both the cursor and the empty
bitmap), and eventually it would crash.
Fixes#13577.
At present, does not work (it fails to properly set up interrupts,
resulting in thousands of unhandled ones which all but grinds the system
to a halt) but this at least is some progress.
The ScreenOwner interface gets an additional ScreenChanged() hook. It
is implemented in the Desktop class to automatically set the preferred
screen mode on the changed screen.
The HWInterfaceListener, previously only used by the downstream
DrawingEngine, gets an additional ScreenChanged() hook as well to inform
an upstream client of a changed screen.
The ScreenManager ties these two mechanisms together.
Instead of the server connecting back to a listening client, make it
into a more traditional setup with the server listening on a port and
the client connecting to it.
The client can now either connect directly, unencrypted and without the
ability to trigger listening and specifying a command, or through SSH,
as before with the possibilty to run a target application and causing
the creation of the listener.
With the direction change, there's only the need for one, local, port
forward with SSH, which simplifies things.
It is not a good idea to have a thread get an address from the request
cache, while another thread is deleting said address as the cache has
grown too large. Add a lock around the cache access to make it safe.
Since it handles physical address it should really be this.
It's not like many drivers actually used it anyway. It shouldn't harm
compatibility, drivers calling it with only 32bit would leave garbage in
the higher bits but since on x86 it's a noop anyway, it would end up in
the MSB register tha's ignored because it expects a 32bit result.
* Window frame might change based on set size limits.
Creating view with rectangle used to create the window causes it
to anchor outside the window.
To address that pass current frame rectangle to the view.
* Fixes#13167.
- Do not update more than twice a second
- Do not use tabs, so we can reliably compute the string width
- Cleanup and tweak other parts of the code
There is still a glitch when resizing Terminal, but it isn't as bad as
before. Ideally, using the SIGWINCH signal would solve that, but it is
sent to the app only when you release the mouse after a release
operation, so in our case, it is already too late.
Creating BDateTimeFormat and BDateFormat objects is a costly operation
(it loads locale data from ICU, etc). So, we should do it only once when
the format changes, instead of doing it each time we format a date
or time.
In some languages, the buttons would end up outside of window bounds, as
changing the BTextView content does not automatically update the window
size (even with B_AUTO_UPDATE_SIZE_LIMITS). So, we need to manually call
ResizeToPreferred after changing the text.
However, this exposed another problem: the view size is computed using
GetHeightForWidth, with a width as small as allowed by layout
constraints. In our cases, there weren't much layout constraints so we
would end up asking the text view to compute its height for a width of
52px, leading to a very high window. Add some explicit sizing
constraints to the text view and language list to make sure we get a
sane size.
Also tweak the layout a little to allow the keymap menu field to be
wider than the language list view, and make the window not resizable as
that makes it much easier to keep things under control and there isn't
really a need to resize it.
Accelerant interface:
Introduce new hooks B_SET_BRIGHTNESS and B_GET_BRIGHTNESS. Brightness is
a float in the 0..1 range.
App_server:
Forward brightness things between BScreen and the accelerant.
intel_extreme:
Implement the hooks. Note that this only works for laptop panels, but
the driver will pretend to support it in other cases as well.
Screen preferences:
If the accelerant supports the B_GET_BRIGHTNESS hook, allow to set
brightness with a slider. Otherwise, the slidere is hidden and these
changes aren't visible.
The libvterm implementation was sending characters to app_server one by
one. This made it very slow to update the view and SerialConnect would
have noticeable flickering.
We now look through each line and try to find ranges of characters with
the same attributes. We can then draw each of these with a single
FillRect+DrawString. In the normal case (no special attributes or colors
anywhere), this means just one call per line, plus two for the cursor.
We just want to disable known broken ones, rather than opt-in for
working ones. This keeps the list of authentications shorter and is more
future proof.
Make TitleView a few pixels shorter at the default font size so that
it lines up with the scroll bar arrow to its immediate right.
Note the font size used in the title view before and still is 9px
(12px * 3/4)
Make this the minimum TitleView height even for smaller font sizes
so that the title view never is shorter than the height of a
scrollbar button. Make the minimum font size for TitleView 8px
because 6px (8px * 3/4) was just too small to read.
As font size is made larger it will increase the height of the
titlebar to accomodate the increased font size and consequently no
longer line up with the scrollbar arrow.
The code to scale the bar height via the font height was taken from
BColumnListView. The code to position the title in the middle of the
title bar was also taken from BColumnListView.
Some included style fixes:
* Rename height to fontHeight
* Rename loc to titleLocation
* 80 column limit
* https://github.com/raspberrypi/firmware/issues/643
* Mimics what the RaspberryPi guys adjusted it to in
the firmware.
* Solves corrupted UART serial on the RaspberryPi 2
* I think linux live-probes this frequency via dt-bindings.
Revision of last commit, everything I said about how we needed to
use 8px instead of 12px for the drag width and replicant tray
padding was correct, BUT, because we are subtracting from the
window width setting we need to account for the width of BOTH
draggers, so it becomes 2 * 8px or 16px that needs to be
subtracted -- sorry about that.
The minimum Deskbar width was calculated to fit 6 replicant icons,
however, this calculation doesn't take into account the extra width
taken up by the recently added second dragger. Consequently only 5
16x16 replicants currently fit.
However you can expand Deskbar to fit 6 (or more) icons now so it
is not a big deal.
Would it be desirable to adjust the minimum Deskbar width to fix 6
replicant icons again?
In this commit:
a44504a168
Deskbar: Refactor TRelicantTray::LocationForReplicant()
I made the following assumption that:
* if index == 0 return right away, no calculation required.
But this assumes that the first replicant will always fit on the
same line as the clock which doesn't work if you have a wide clock.
Update to always calculate the position even of the first replicant
in vertical (multi-row) mode.
In horizontal mode we still skip some calculations for the index 0
case.
Also I was using kClockMargin (12px) for the right margin, the
right margin should be only 8px: 5px for the dragger plus 3px more
for kTrayPadding. Finally we add in the width of the clock and
extra clock margin iif we're on first row and clock is not hidden.
Fixes (hopefully the last of) #8641
Damage in latter portions of the downloaded package data can cause the
meta-data for the caching to load OK, but the actual data is unable to
be parsed. In this case, the application can fail to refresh the
broken data. This change will mean that the data is "moved aside" into
another file so that on the next run, the application will load fresh
data in place.