Commit Graph

61216 Commits

Author SHA1 Message Date
John Scipione
1c765f5b62 Deskbar: Set window limits to hidden dimension in auto-hide mode.
This fixes a bug where the window size limits were not set correctly
causing the window not to be hidden properly in some cases while
Deskbar is in auto-hide mode. This bug was introduced in hrev53585:
Update window resize size limits.

A couple of other auto-hide related bugs were also fixed:

Hide TBarView in constructor if auto-hide is on. This is needed to
size and position the window correctly on Deskbar startup in auto-
hide mode.

Always Check fTime->IsHidden() from the perspective of fTime instead
of the parent view because we were getting false positives that the
clock was hidden in auto-hide mode which caused the replicants not to
realign themselves around the clock on Deskbar startup. The clock
thought it was hidden because the parent view was hidden but that's
not what is needed here.

Bail out of BarView::MouseMoved if resizing. This fixes a bug where
if you resized the window in auto-hide mode once the window had become
as wide as possible dragging beyond the window hidden area slop limit
would confusingly cause the window to hide itself in the middle of your
resize operation.

Fixes #15067 better. Fixes problems related to #8641 and #9469.

Change-Id: I58de02e0cdd4e4cdccc15594992f11bf8c7f3a26
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2252
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-19 16:20:01 +00:00
Augustin Cavalier
cce89fa82f XHCI: Correct computation of TD Size field.
This was broken during the refactor in hrev53672. May help with #15657.
2020-02-18 12:27:05 -05:00
Augustin Cavalier
1e02632b94 USB: Detach pipes from the stack before tearing down their state.
This way, it is now actually impossible to submit a request to a
pipe that is in the process of being destroyed, solving several
race conditions.

Should fix the remaining KDL in #15710.
2020-02-17 19:11:57 -05:00
Augustin Cavalier
b1970a8427 XHCI: Do not try to use hardware with unknown interface versions.
Should fix the crash in #15717.
2020-02-17 17:18:11 -05:00
Augustin Cavalier
5d08e3a5b9 runtime_loader: Combine and correct term function invocations.
In d49942867b (part of hrev52813),
I moved invocation of the TERM_BEFORE/TERM_AFTER functions to
runtime_loader. Unfortunately, I only updated one location where
they should be invoked, and runtime_loader had two.

After this commit, there is one function that they are called from,
which is itself invoked from the appropriate places.

Noted by ttcoder & mmlr in #14047.
2020-02-17 17:07:39 -05:00
Augustin Cavalier
c119d85329 ReadMe: Update links.
* OpenGrok has moved.
 * cgit is just at "git...", and is now HTTPS-enabled.
2020-02-17 14:43:59 -05:00
Augustin Cavalier
357adccf9f XHCI: Rearrange RemoveEndpointForPipe to fix crashes and deadlocks.
* As we were clearing out the endpoint structures before detaching
   the xhci_endpoint from the Pipe, it was possible for SubmitRequest
   to be called while we were being destroyed and then use the half-
   torn-down endpoint, leading to crashes. Instead, we now call
   SetControllerCookie first, so that SubmitRequest will thus
   fail.

 * Lock the endpoint after calling StopEndpoint, for the same
   reasons that this is now the order of operations in CancelQueuedTransfers.

Probably fixes #15710, and maybe other issues.
2020-02-17 14:33:54 -05:00
Augustin Cavalier
41e5cf016e XHCI: Remove unnecessary xhci_device::state field.
It was only actually used to determine if a device was disabled
or not, which can be determined by checking the "slot" field
is "0" instead, as 0 is an invalid slot number.

No functional change (intended.)
2020-02-17 14:13:40 -05:00
X512
6bff918400 Tracker: fix window focus behaviour
* Also fix LongAndDragTrackingFilter
Fixes #15605

Change-Id: I98c5f3ca435e54c98515ebe2fccbbfd5d08c1a25
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2081
Reviewed-by: Sergei Reznikov <diver@gelios.net>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-17 17:29:13 +00:00
Jérôme Duval
073e295aa6 kernel/x86: stores cpu number in TSC_AUX if rdtscp is available
On modern x86, one can use __rdtscp to get the current cpu in userland.

Change-Id: I1767e379606230a75e4622637c7a5aed9cdf9ab0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2248
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-17 17:26:39 +00:00
Alexander von Gluck IV
b9db31f649 EFI: Add VolumeIcon to EFI system partition
Change-Id: Idc50cfee16db5f7c0dbea625a7739ad42b2d7bf0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2249
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-17 14:31:59 +00:00
Alexander von Gluck IV
987f40eb8f build/jam/ppc: Fix PowerPC boot after hrev53614
* "xorriso doesn't support much of the mkisofs options"
* Dropping the hfs map made our bootloader no-longer get
  mapped as :tbxi which means qemu + Apple devices refused
  to boot it.
* Switch to genisoimage which can generate the correct image.
  (xorriso -as genisoimage doesn't work either)

Change-Id: Id71b97796f5004f6ddf6244644c51a5787f9bf8e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2241
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-02-17 02:37:37 +00:00
Humdinger
3587ea6581 Adding Kyle Ambroff-Kao and Ilya Chugin (X512) to contributers
Both made many valuable contributions.
Thanks, Kyle and Ilya!

Change-Id: Iaf819f37319df45050c6892ddc2066901f93f7eb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2247
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-16 18:36:28 +00:00
Jérôme Duval
8a7eacc7de media_addon_server: delay the start up sound by 2 seconds.
This workarounds the start delay for sound output.
This can be reverted when sound output is available right after startup
tested on emulation.

Change-Id: I2efb5d46ab25dcda15602bba70e728ae9e34537a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2238
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-02-16 11:38:43 +00:00
Jérôme Duval
f368188360 Revert "hmulti_audio.media_addon: stop the output thread on BTimedEventQueue::B_STOP"
This reverts commit 571148258b.

Change-Id: I5efa34035ebe51fce2521684987bb6e8b7dc42d3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2246
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-02-16 11:35:54 +00:00
Jérôme Duval
9c9a810c41 Media Kit: BBufferCache: if not reclaimed, only mark the buffer for deletion
hrev53379 clears the buffer cache for disconnected clients, and also delete buffers.
This is too early (see #15263, media_addon_server crash), and should only happen
after the buffer is recycled. This can be resolved by abusing the fFlags field of
BBuffer to mark the buffer for deletion, and mark the buffer to be reclaimed.
Some BBuffers don't reside in the SharedBufferList, so we have to mark them as to
be reclaimed. For those in the SharedBufferList, call a new RemoveBuffer(), which
can check whether the buffer is still to be reclaimed. For reclaimed BBuffers,
delete them right away, others can be marked for deletion.
fixes #15606 #15263, possibly #15433

Change-Id: I66e94138e7e10a40d4c48e2ac042f816c79f5aab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2245
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
2020-02-16 08:38:49 +00:00
Kyle Ambroff-Kao
0dde5052bb tests/net: Working integration tests for HTTP client
This patch is part 1 of 3 with the goal of having a working
integration test harness for BHttpRequest. In this patch the existing
test cases were expanded and fixed for HTTP. In followup patches the
test harness will be updated to support HTTPS and reverse proxies.

Before this patch the tests for BHttpRequest had hard dependencies on
the external services httpbin.org and portquiz.net. These tests
eventually stopped working because the owner of those services made
changes, causing the assertions in these tests to fail.

The goal of these patches is to make a test harness that allows for
the same kinds of end-to-end integration tests but without any
external dependencies.

The test suite now includes a Python script called testserver.py which
is a HTTP echo server of sorts. When it receives a request, it will
echo the request headers and request body back to the client as a
text/plain response body.

The TestServer class manages the lifecycle of this testserver.py
process. Each test case calls Start() on the server to start a new
instance, and then it is shut down when the destructor is called. On
each invocation a random port is assigned by the kernel in TestServer,
and that socket file descriptor is provided to the child testserver.py
script.

Authorization tests are supported, currently implementing Basic and
Digest auth. If the test server receives a request for a path
/auth/<auth-scheme>/<expected-username>/<expected-password>, then the
appropriate authorization scheme will be employed. For example, if
/auth/basic/foo/bar is used as the path, then the server will expect
the Authorization header to contain an appropriate Basic auth
payload.

The tests now perform a bit more validation than before, validating
the expected HTTP headers and response body is returned from the
server.

The following tests are not fixed yet or were removed:
* PortTest was removed entirely since I'm not sure of the point of this
  test, and that functionality seems to be covered by the existing tests
  anyway.
* HTTPS tests are not functional yet, but will be in a followup
  patch. THis requires updating testserver.py to generate a
  self-signed TLS cert if --use-tls is provided.
* ProxyTest was disabled before this patch, but can be enabled in a
  followup patch by providing a reverse proxy in the test harness.

Change-Id: Ia201ef4583b7636c61e77072a03db936cb0092be
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2243
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-16 08:34:08 +00:00
Jérôme Duval
3fded0b515 desklink: watch media_server quit event to disconnect itself.
StartWatching() must be called for each notification type.

Change-Id: I34957af526a0af557a86eef0c3de5722f3503ca5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2244
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-15 13:31:17 +00:00
Autocomitter
a42a10c319 Update translations from Pootle 2020-02-15 08:48:39 +00:00
Jérôme Duval
1a836b9e04 kernel: x86: add some more cpuid flags.
Change-Id: If81c8e38c4e5a8347b5818440a7516298be585bc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2242
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-02-14 14:25:43 +00:00
Jérôme Duval
27fee67244 Media Kit: let launch_daemon know that media_server will quit
'Restart media services' in Media Preferences works better.

Change-Id: Ifbffdbd81ee851ae3e7d3dfd14f3d5f41ac155ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2240
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-02-14 14:24:13 +00:00
Murai Takashi
0c481598be nfs4: Fix PVS V595
Move NULL check for 'fReply' and 'fRequest', since they might be NULL.

Change-Id: Icc42b8f24f406d6752c25f4203d6ebe3f6ba0d97
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2168
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-02-12 18:44:06 +00:00
Alexander von Gluck IV
d38ba84d44 efi: Add quirks for some unicorn Apple EFI protocols
* grub and linux do the same thing.
* Based on MIT code here:
  https://github.com/0xbb/apple_set_os.efi/blob/master/apple_set_os.c

Change-Id: I299b3721197c5cdd4406d313d8769d4923f7edb4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2239
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-12 14:30:58 +00:00
Jérôme Duval
e79dc1ff93 desklink: recycle MixerControl and correctly release media nodes.
Change-Id: Id00a7fdb3bfd995bf6891bac85d21931f527606c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2237
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2020-02-11 18:59:37 +00:00
waddlesplash
90bf90fac5 kernel: Move memset of KPath buffer to after NULL check. 2020-02-10 22:20:19 -05:00
Preetpal Kaur
640c0e7f8f AboutSystem: add Preetpal Kaur to the contributors
Change-Id: Id91daf874d3e582ab722a4b57244374d478c534b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1126
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-10 09:59:57 +00:00
Adrien Destugues
3d11fed209 Installer: fix drawing of optional packages view
Rework the layout of the installer window, do not try to put everything
in a single grid but instead use a mix of grid and groups as
appropriate, which keeps things simpler.

Make the width of the window more font sensitive.

Have the package view properly resize with the window, and the items in
it still draw properly (checkbox and name on the left, size on the
right)

The menu fields for source and destination don't need to extend to the
whole window width, so allow them to be smaller.

Fixes #5785

Change-Id: If0683f610b9e7f3629d51d25c1d8e8b00c101156
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2185
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-10 09:49:51 +00:00
Augustin Cavalier
299279610c kernel/vfs: Add some missing initializations and BStackOrHeapArray.
Part of #14961.
2020-02-09 18:22:57 -05:00
Augustin Cavalier
d29d80ebe2 kernel: Initialize allocated KPath buffers to 0.
KPaths are most commonly used in the VFS syscall paths,
and so they are typically user_memcpy'd to/from userland.
In the "to" case this is not really necessary (but it should
be so small of a performance difference as to not matter),
but in the "from" case, we must always clear the buffer
we received from the allocator, so as not to leak information
to userland.

Part of #14961.
2020-02-09 18:17:01 -05:00
Augustin Cavalier
877c1b934f EHCI: Call InitKernelAccess at the top of SubmitTransfer functions.
I missed that this was not done before WriteDescriptor was called.
Fixes #14835 (again.)
2020-02-09 17:35:13 -05:00
Adrien Destugues
11d738a430 wacom: remove control device
It is unused, and it leads to an unexpected entry in the Input
preferences.

Change-Id: I68f31c3ae6baca7be1a5d6070dc1ebcf04522dad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2208
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-09 22:21:40 +00:00
Autocommitter
d5d32c48dc Update userguide translations 2020-02-09 17:12:40 -05:00
Adrien Destugues
8854b89737 PaneSwitch: fix a layout issue with large font sizes
This is used in Find window and also in Installer.

Remove some unused code (I think leftovers from Tracker InfoWindow
refactoring).

Change-Id: Ic0dd07e06c11b3839adbe5b8ef9598a5b16171a6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2234
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-09 20:52:27 +00:00
Adrien Destugues
980a393047 intel_extreme: build fix, remove unused variables. 2020-02-09 18:39:17 +01:00
Adrien Destugues
af8d74ae10 intel_extreme: fix width of interrupt register.
The driver had been using 16 bit reads and write (introduced by Axel in
2006), but the hardware documentation (released in 2008) says the
register is 32bit. Use 32bit since that makes the code identical to
what's used for later devices.

If 16bit is needed, it's only for the pre-2008 devices.
2020-02-09 17:32:27 +01:00
Adrien Destugues
015fbeab9c intel_extreme: fix pipe selection for Ivy Bridge and later
Should fix #15661 and #15662.
2020-02-09 15:40:52 +01:00
Humdinger
0c1bd1b601 Fixed missing word in GUI string 2020-02-09 08:29:56 +01:00
Augustin Cavalier
2591d679e5 XHCI: Fix endpoint deadlock in CancelQueuedTransfers.
If a transfer completed before the StopEndpoint did,
HandleTransferComplete would try to lock the endpoint,
resulting in a deadlock, and so StopEndpoint would
always time out in this case.

May help with #15161, #15141, #15215, #15416, #15657.
2020-02-08 23:44:33 -05:00
Augustin Cavalier
f62329b34d USB: Explore ports when something is connected without a status change.
It seems that many controllers do not report status changes following
the hand-off from the BIOS, so we were never probing those ports
and reporting the devices attached to them.

The BSDs do something similar (although it seems to only do this
on the first explore, not always.)

This fixes booting off of USB3 ports from most Intel controllers,
as well as a variety of others with similar behavior.

Fixes #15000.
2020-02-08 16:33:02 -05:00
Adrien Destugues
0e280da525 SecureSocket: fix non-blocking reads
OpenSSL says we should retry when a non-blocking read finds no data is
pending. But in that case we should not retry immediately, because the
operation should be non-blocking.
2020-02-08 22:21:27 +01:00
Augustin Cavalier
3a63d1efff EFI: Restore the previous logic for BOOT_VOLUME_BOOTED_FROM_IMAGE.
Fixes booting from USB drives on my machine after previous changes.
2020-02-08 16:00:40 -05:00
Augustin Cavalier
5be6527a63 ImageRules: Use mformat's -f argument.
Should not be a functional change, but reading the docs, I'm not sure
our arguments were valid here, so this should be more correct.
2020-02-08 15:45:18 -05:00
Augustin Cavalier
b8852a24a6 XHCI: Do not set "Interrupt Short Packet" on transfers.
Before the refactor to use Event Data TRBs, this was necessary
to detect short packet conditions. Now that we use Event Data
TRBs, the hardware will send us an Event Data event even on
Short Packet conditions, so this is redundant.

Fixes log spam of "TRB ... not found in the endpoint", as
this was causing duplicate event postings. Also potentially
fixes instability seen when those messages were present.
2020-02-08 13:36:51 -05:00
Augustin Cavalier
78b224583c configure: Building GCC2-only Haiku is not supported anymore.
Fixes #15682.
2020-02-08 13:25:23 -05:00
Augustin Cavalier
07ec2cf013 EHCI: Call PrepareKernelAccess before writing descriptor chains.
Fixes #15653.
2020-02-08 13:16:13 -05:00
Augustin Cavalier
7e8263e589 libroot/stdio: Use the proper macros for isnan/isinf. 2020-02-08 12:58:09 -05:00
Fredrik Holmqvist
bc8cfa3a8c EFI: Use BlockIO to find bootable disks
There is one efi_block_io_protocol per disk and one per partition.
All we need to do is find the disk ones and let Haiku find
bootable partitions.

There is a special case for a device with one fixed partition
which does not have one for disk, but it is unlikely we will
ever want to boot from such a device.

Fixes #15587.

Change-Id: I915870d6d3b19947bc58b32a969f9f89d2d2245d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2232
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-08 17:38:38 +00:00
Fredrik Holmqvist
0d932a49ad Revert "loader: fetch all potential boot partitions for boot device."
This reverts commit e888217124.

Change-Id: I06be82ac863f615796d9edc86f5ef903b8123a9d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2231
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-08 17:38:38 +00:00
Augustin Cavalier
2b19786285 Tracker: Remove unused variable.
Fixes the build (due to a -Werror).
2020-02-08 12:34:00 -05:00
Adrien Destugues
445de1d348 Use Input preferences
And remove Mouse, Keyboard and Touchpad.

Userguide and localizations will need to be updated.

Change-Id: I4543b2b63367cd13562c542610bad34b5934b103
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2210
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-08 17:03:19 +00:00