Commit Graph

61194 Commits

Author SHA1 Message Date
X512
371b3b2b42 Keymap: remove flickering workarounds, small fixes
Part of #15623.

Change-Id: I44d62a39efeaa25ecdc3b8a9aa27ca9fef33e5b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2279
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-25 04:44:29 +00:00
Jérôme Duval
84195a491f kernel/x86: add a compiler level memory barrier to wbinvd
Change-Id: Id96e37b83110f413a2b30f2967921ce90f31dd94
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2272
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-25 04:43:41 +00:00
X512
f9b0390d8f PowerStatus: use transparent view
Change-Id: I04d988a54d0199e8c7dac37f5b78c6f1e2e0cadc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2278
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-25 04:42:23 +00:00
X512
485a9ea0e6 NetworkStatus: use transparent view
Change-Id: I707f043e08b7f54de1304c7697e19621ff279c7c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2277
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-25 04:42:23 +00:00
X512
17a91a9886 BMenu: fix menu navigation area
Change-Id: If9326ebc99978627d9dfb1eaff67912f0114f292
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2071
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-25 04:41:22 +00:00
X512
e18a08119d GLTeapot: normalize quaternion
Quaternions representing rotation should have unit length. Multiplying
quaternions cause error accumulation and length change. Normalizing
quaternion after rotation will avoid that.

Fixes #7160.

Change-Id: I82f1f2b89c326a4d2c956c03296600e79ac267c2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2270
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-02-24 15:15:12 +00:00
John Scipione
6f114b94f2 Deskbar: Set no horizontal window size limit in vertical mode
... better so that for scroller arrows will work again.
This regression occurred in hrev53890 trying to fix #15067.

Use B_SIZE_UNLIMITED not -1 for no window size limit.
2020-02-23 17:19:50 -05:00
John Scipione
d7aa468e43 Revert "Deskbar: Set no horizontal window size limit in vertical mode"
This reverts commit bc9e33a5fb.

This can cause other problems though, will need to provide a better fix.
2020-02-23 16:32:29 -05:00
John Scipione
bc9e33a5fb Deskbar: Set no horizontal window size limit in vertical mode
... so that for scroller arrows will work again. This regression
occurred in hrev53890 trying to fix #15067.
2020-02-23 15:46:40 -05:00
Alexander von Gluck IV
82a7c7395c efi/arm: Begin stubbing out the essentials, add fdt library
* We *might* no longer need FDT knowledge in the bootloader?
* For now though, arm sources reference gFDT, so we need it.
* Need to move away from lazy gFDT and store in arch_kernel_args.
  (which is next and will be a larger commit)

Change-Id: I77cce0fc645143b78a7fd9f50ac8b96c97b5c862
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2268
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-23 18:41:28 +00:00
Preetpal Kaur
2a64b13f81 Input preference: inconsistent dialog buttons location.
Fixes #15685

Change-Id: I38a48394ba45c7c53208e4333c797ec0b2310c96
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2262
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-23 10:19:31 +00:00
Kyle Ambroff-Kao
762f26bac8 tests/net: Implement testserver.py TLS for HttpsTests
This patch is a followup to 0dde5052b which added testserver.py, a
HTTP echo server for the HttpTests and HttpsTests in the ServicesKit
test suite. This patch implements `testserver.py --use-tls` which
allows for re-enabling HttpsTests.

If `--use-tls` is used, then a self-signed TLS certificate is
generated in a temporary directory which is used by the test
server. This option is used when running HttpsTests.

There doesn't seem to be a good way to have these tests trust the
certificate generated by this test at the moment. Until that API
exists I've just made these tests ignore certificate validation. We'll
want to resolve this and update these tests to actually verify that
validation works as expected.

Some minor tweaks had to be made to testserver.py to take care of
differences in the response body when serving HTTP and HTTPS requests.

Some additional changes:
* Don't depend on any files outside of src/tests/kits/net/service for
  these tests. UploadTest was uploading a file from /boot, but I
  copied it into the test source directory to avoid having these tests
  break if someone makes an unrelated change. It doesn't really matter
  what the contents of this file is as long as it doesn't change.
* Use BThreadedTestCase. This speeds up the tests considerably, mostly
  because it means that the different test cases can share the same
  HttpTest instance, which means there is only a single TestServer
  instance, and it takes around half a second to bootstrap the test
  server on my system, and even longer if --use-tls is used.

Change-Id: I6d93d390ebd56115365a85109140d175085e1f01
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2260
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-23 07:58:58 +00:00
X512
9176b546e3 Haiku3d: fix textures
Textures creation like other OpenGL calls must be inside LockGL/UnlockGL.

Fixes #15246.

Change-Id: Id1f3ae7c04548dba301e5c5ba75a89163c08d69d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2269
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-23 07:53:19 +00:00
Alexander von Gluck IV
71680f7b7d efi: Cleanup arch_mmu, drop extra arch_timer.h
Change-Id: I0d6d2f8db2bc86c08d5ba2648f1cf46d85b54a5e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2267
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-02-22 22:15:08 +00:00
Alexander von Gluck IV
d2986cb6d0 system/boot: More cleanup and shuffling
* arm efi additions
* cleanup some cpu headers which were oddly
  split between efi and bios_ia32
* Move calculate_cpu_conversion_factor over to
  arch_timer since it is timerish, and x86 only
* Drop some duplicated code from efi start. Move
  hpet init code into efi timer/hpet code

Change-Id: Ia4264a5690ba8c09417b06788febc4f572f111ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2259
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-22 14:37:45 +00:00
Autocomitter
cc89f2de18 Update translations from Pootle 2020-02-22 08:48:23 +00:00
Alexander von Gluck IV
957f468cc1 efi/mmu: ensure sNextVirtualAddress is valid on 32-bit platforms
Change-Id: I1c762410860ac7a27cfc78345de3226e36195aba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2258
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-21 17:03:27 +00:00
Alexander von Gluck IV
04f1baa771 EFI: Make our haiku_loader architecture agnostic
* This is the bulk of the work. Anything else should be
  minor cleanups and tweaking.
* riscv64 isn't a viable EFI platform yet.. just acting
  as a stand-in to test a non-x86 EFI haiku_loader

Change-Id: Ib03de81e2b562e693987b86d7b4318209fb1c792
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2256
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-21 14:29:22 +00:00
Augustin Cavalier
35b4b2373a PS/2: Fix build.
Copy/paste error from refactoring, sorry about that.
2020-02-20 13:32:35 -05:00
Augustin Cavalier
544e086e8f PS/2: Actually mask off SysReq when it is released.
The previous code was missing a "~" make it possible for someone to
press PrntScrn, and then later Alt+D to trigger KDL, which is obviously
not the desired behavior. SYS_REQ_KEY only triggers when Alt+SysReq
is pressed, so this was not as much of an issue without PrntScrn.
2020-02-20 13:22:23 -05:00
Augustin Cavalier
2280633335 PS/2: Handle PrntScrn as well as SysReq for emergency keys.
Usually these are the same physical key, but some keyboards
(like my laptop) do not have a SysReq key, only a PrntScrn key.

Fixes entering KDL via the shortcut on my laptop.
2020-02-20 13:22:07 -05:00
Augustin Cavalier
46ab6b2917 kernel/debug: Zero-initialize droppedEvents.
There is a case where NextBuffer can return B_OK without initializing
droppedEvents, so make sure we do that here.
2020-02-20 12:11:09 -05:00
Adrien Destugues
8e1e00129c Installer: handle hpkg files in _packages_ directory
Fixes #14310.

Change-Id: Iafd75b86d242af816a089dd1bdaea2c697668f5d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2184
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-20 16:25:38 +00:00
John Scipione
03399b17b8 Deskbar: remove mistaken double assignment 2020-02-19 18:44:13 -05:00
John Scipione
7211f720c8 Deskbar: Set replicant tray height to team menu item height
... in horizontal mode.

Tray was wrong size for big font and mini icon.
2020-02-19 13:23:31 -05:00
Augustin Cavalier
0d3250fdb5 XHCI: Round TD Size up instead of down.
This is what the specification dictates.
2020-02-19 12:26:35 -05:00
Augustin Cavalier
0c9e6791d8 Deskbar: Fix build after merge. 2020-02-19 12:22:39 -05:00
John Scipione
15eb397e32 Deskbar: Adjust team menu items with font size.
The Deskbar team menu should look the same at 12pt but much better
at larger (and smaller) font sizes.

Determine team menu item height in TBarView instead of
TTeamMenuItem::GetContentSize() because it is needed earlier in the
process, and also call method in GetContentSize().

The clock is centered horizontally in the first replicant row and the
width can grow to push the replicant icons better at larger font sizes.

The replicant tray and clock go to the bottom in horizontal bottom mode
and go to the top in horizontal top mode for Fitt's Law convinience and
go in the center of the first row in vertical mode.

Grow horizontal team item widths with font size, and shrink them
down to 1/2 of full width to fit more, or 1/2 padding for icon-only.

In horizontal mode the menu item size increases so that you can fit
approximate the same amount of label text based on icon and font size.
hit the width limit the items shrink and the label gets truncated
(like before.)

Scale team menu with font size. Reduce to half width for hide labels.

Change-Id: I93ecc8acded274b994728e7247768455862e31c5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/345
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-19 16:20:01 +00:00
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