Commit Graph

64850 Commits

Author SHA1 Message Date
Adrien Destugues
b3099de672 DeskCalc: fix live updating of button text color
When using the panel background color, always use the matching panel
text color from system preferences.

When using a custom color, compute appropriate light or dark text color
to go with it.

Change-Id: I107731efec03a8c9661b89e26255a4fe91def79b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3560
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-02-08 15:01:17 +00:00
Adrien Destugues
c8a1650c73 docs/develop: documentation about the C library and features.h
Change-Id: Id87081fbf97e8b427f7a235d969732177d697551
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6045
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-02-08 08:18:59 +00:00
Dale Cieslak
4f52a155e6 BFont: Minor code cleanup and autolocking for AppFontManager
* changed explicit locking to use Autolocker for gFontManager/fAppFontManager
in ServerApp, per comments in https://review.haiku-os.org/c/haiku/+/4790
* changed BFont::LoadFont (memory version) to use size_t for size and offset
* no functional changes

Change-Id: I438a4975d5bb1b2fa17bc54e9e171c31dadfeec5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6003
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-02-06 09:21:12 +00:00
Oscar Lesta
d778c82da4 acpi_lid: fix build on 64 bits.
Change-Id: I1d5b374db37edfa546b1c0d4909c08c779fd392d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6044
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2023-02-05 21:06:12 +00:00
Autocomitter
e9520a1d91 Update translations from Pootle 2023-02-04 08:17:09 +00:00
Augustin Cavalier
5d41cee816 WeakReferenceable: Clear fUseCount when it is 1.
Otherwise, if there are remaining weak references, they could
potentially try to acquire the object and trigger a use-after-free.
2023-01-31 22:36:59 -05:00
Augustin Cavalier
b956691cdd WeakReferenceable: Allow reference counts of either 0 or 1 during destruction.
Same rationale as for BReferenceable.

Fixes a KDL seen on boot by at least one user following prior changes.
2023-01-31 21:43:09 -05:00
Augustin Cavalier
6f7201128c Drop "play" command.
It was used only for playing CDs via SCSI commands, which is what
CDPlayer also did; but this is not really much supported anymore,
so CDPlayer was removed years ago, and now this is too.

Its source code lives on at HaikuArchives.

Fixes #18236.
2023-01-31 17:32:51 -05:00
Augustin Cavalier
61ed147044 keyboard: Store errno right after calling open() if an error occurred.
errno is a thread-local variable, we can't read it in another thread
and have the value make any sense. Thus we need to store it.

Fortunately, as our errors are all negative already, we can just put it
directly in fFD instead of having to make a new variable altogether.

Should help with diagnosing a problem seen in some syslogs.
2023-01-31 17:20:40 -05:00
Augustin Cavalier
d891ca1119 headers/build: Drop Drivers.h and Select.h.
As far as I can tell, these are no longer needed after the previous commit;
fs_shell does not reference them, anyway.
2023-01-31 17:15:14 -05:00
Augustin Cavalier
e05876e25f makebootable: Include Drivers.h only for TARGET_PLATFORM_HAIKU.
It is not needed otherwise.
2023-01-31 17:14:34 -05:00
Augustin Cavalier
8654ab710c kernel/vfs: Use new/delete for advisory_lock structures.
No functional change intended.
2023-01-31 17:12:05 -05:00
Augustin Cavalier
7a6ef4c87d WeakReferenceable: Add reference-count assertion just like BReferenceable. 2023-01-31 15:37:56 -05:00
Augustin Cavalier
1e860e07ee BPrivate::WeakReferenceable: Move implementation to a .cpp.
No functional change to the implementation, just getting it
out of a header.
2023-01-31 15:36:15 -05:00
Augustin Cavalier
da49d61cb7 rtl8125: Modifications and additions to make it compile.
Tested by andreasdr and confirmed to work. Thanks!

Fixes #17835.

Change-Id: Ied6dd316741b9f0451fc0aeda69abdf9d8a5fb43
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6042
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-01-31 03:00:36 +00:00
Augustin Cavalier
f8a90df5fd openbsd_network: New additions for rtl8125.
Change-Id: Id2b2b58e8fe69b5b758ccd8161adcedd7ecaf717
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6041
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-01-31 03:00:36 +00:00
Augustin Cavalier
4a50966655 rtl8125: Import (rge from OpenBSD.)
Just a straight code import, various things need to be done before
it will compile and actually work.

Change-Id: Ibb3629a14067d350d58e2066bafc64a901d6a85e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6040
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-01-31 03:00:36 +00:00
Augustin Cavalier
78eb4676ab freebsd_network: NULL-check if_init before calling.
All FreeBSD drivers set it; not all OpenBSD drivers do.
2023-01-30 21:58:24 -05:00
Christof Meerwald
0ab42081b5 kernel/network: Limit send MSS by interface MTU
see RFC9293 3.7.1. Maximum Segment Size Option

  The maximum size of a segment that a TCP endpoint really sends, the
  "effective send MSS", MUST be the smaller of the send MSS (that
  reflects the available reassembly buffer size at the remote host)
  and the largest transmission size permitted by the IP layer.

Previously, instead of just choosing a lower send MSS, we would
(try to) fragment those packets.

With this change I now get a 10/10 score from test-ipv6.com when
setting the local MTU to 1280 (this is needed as a workaround as we
don't implement Path MTU Discovery).

Change-Id: I27bdfebe2f94a55951407136ab7c4dd9626cdcea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6043
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-01-30 12:11:29 +00:00
Augustin Cavalier
147ca87661 Tracker: Drop ShowHideSelection setting.
Unused since the previous commit.
2023-01-28 15:24:23 -05:00
CodeforEvolution
6d791f2040 Tracker: Fix selected text drawing with light desktop colors, and delayed update for inactive text colors on desktop
This fixes two separate issues in relation to Tracker:
1) If the desktop base color is set to a lighter color (such that black text is used for desktop items),
clicking on another window and then dragging that window over the item leads
to a black selection and text color, leaving the text unreadable. (Fix in Pose.cpp)

2) After fixing the first problem, I noticed that Tracker still didn't immediately update the color of inactive,
though still selected desktop items until another window was dragged over them. (Fix in DeskWindow.cpp)

Change-Id: I43653e23c69a7666ed8a53751b0f65622c8dc596
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5882
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-01-28 20:15:21 +00:00
Christof Meerwald
3554137fa9 network: Always add default route after setting IP address
Previously, a default route was only added if the interface was not
set for auto configuration and it was added before the address was
configured. Currently, using DHCP for IPv4 means that the interface is
set as auto-configured (i.e. this also meant that the statically
configured default route for IPv6 wasn't even attempted to be added).
Also, adding a default route when the address hasn't been set is
questionable.

Always adding a default route (if a gateway is configured) shouldn't
cause any issues, even for auto-configuration cases, as the default
route will just be replaced once auto-configuration has completed
(which already happens for the IP address).

This change fixes network configuration where IPv6 is statically
configured and IPv4 is either also statically configured or
auto-configured.

Change-Id: I6b268ab1fa89777c64e1396cc460444f49edfef9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6039
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-01-28 20:05:30 +00:00
PulkoMandy
49efa33dd0 ps2 synaptics: implement 'extended W' mode.
"Newer" synaptics touchpad support a new mode where they can report more
information to the host. In this mode, there is a different packet
format for tracking extra data from the touchpad, including a wheel
encoder (mousewheel) if available, and multitouch finger tracking.

This mode is documented in the Synaptics touchpad interfacing guide
(Synaptics document 511-000275-01 Rev. B), but was not yet implemented
in our driver.

It should help with detecting multiple fingers, or finger position on
clickpads to determine right or left click.

This change implements the following items from the Synaptics
interfacing guide:

- Cleanup and clarify the code for features detection to properly report
  clickpads
- Enable "extended W" mode if supported
- Process extended W values 0 (mouse wheels, reported in the
  touchpad_event structure and could be used by input_server for
  scrolling), 1 (secondary finger), and 2 (finger count)
- Fix handling of wValue, which is not always a finger width
- Add handling of vValuen which indicates the finger width when wValue
  doesn't

Overall, this should provide the movement_maker with a better picture of
what's happening.

Also improve tracing to show received packets and the corresponding
WValue since that's an important value in identifying which type of
packet it is.

Unfortunately I currently don't have a laptop with synaptics touchpad to
test this with.

Change-Id: If334392f4eb2a146955f6c8c897f0ab64d79b8d9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4425
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: nephele <nep@packageloss.eu>
2023-01-28 14:57:53 +00:00
Christof Meerwald
64a48a5521 kernel/network: Fix neighbor advertisement hoplimit
All neighbor discovery messages need to be sent with a hop limit of
255, but some messages, like solicited neighbor advertisements, are
unicast messages. So need to set the hop limit for both multicast and
unicast messages.

Fixes #14562

Change-Id: I84fba8acbb5833c65d6113c8a7e0cc821a706881
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6038
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-01-28 09:53:06 +00:00
Autocomitter
cebc24425d Update translations from Pootle 2023-01-28 08:19:09 +00:00
Augustin Cavalier
fae0689ac2 kernel/fs: Use open_mode_to_access in rootfs_open.
Addresses a comment by korli.
2023-01-28 00:13:29 -05:00
Augustin Cavalier
4133750ca3 exfat & xfs: Adapt to use next_dirent and shared open_mode_to_access. 2023-01-27 23:56:03 -05:00
Augustin Cavalier
35b40030a7 file_systems/fs_ops_support: Add open_mode_to_access.
This is duplicated across multiple filesystems, and could probably be
used in more still.

Adjusted only BFS, EXT2, and NTFS in this commit, as they are the ones
which make use of fs_ops_support.h already and thus need to be modified
to avoid duplicate-definition errors.

Also tweak next_dirent to support being built under fs_shell.
(Possibly we should define ASSERT there, though?)
2023-01-27 23:53:53 -05:00
Augustin Cavalier
dc95ec5777 file_systems/fs_ops_support: Add comment for next_dirent and mark "inline."
This way, anything which includes the file will not trigger a warning
if it does not use the function.
2023-01-27 23:48:00 -05:00
Augustin Cavalier
fbc5512274 openbsd_network: Some basic additions in preparation for "rtl8125".
These are trivial and do not really need testing.
2023-01-27 23:28:08 -05:00
Augustin Cavalier
231f740ccc openbsd_network & drivers: Implement the real bus_dmamem functions.
This required the addition of some slight modifications to the main
(FreeBSD compat) bus_dma implementation.

Allows some #ifdefs from iaxwifi/idualwifi to be dropped, and will
ease the porting of some future drivers.

Tested with idualwifi7260, seems to work as before.
2023-01-27 23:26:18 -05:00
Christof Meerwald
88864ff1f9 kernel/network: Reply with a ICMPv6 neighbor advertisment
Send a neighbor advertisment when we have received a neighbor
solicitation.

Change-Id: Ie552a8e81d3f06b2dbfaab83ad5a30bac8962224
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6037
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-01-27 09:10:11 +00:00
Christof Meerwald
62ee13a983 kernel/network: Fix ICMPv6 checksum calculation
Ensure that any overflow bits aren't lost when returning from the
helper function. These need to added to the least significant bits in
ipv6_checksum.

Change-Id: Ida9821dd87d34ac1982703d9861419ed97ab4b9e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6036
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-01-27 09:10:11 +00:00
Augustin Cavalier
984e2e527b openbsd_network: Move ifq_*_oactive wrappers to a common header. 2023-01-25 23:09:02 -05:00
Augustin Cavalier
218a511cd4 drivers/network/{ether,wlan}: Drop FreeBSD versions from Jamfiles.
These were rarely in sync. Check the git history to determine when
a driver was last updated, when necessary.
2023-01-25 23:00:04 -05:00
Augustin Cavalier
939b20db33 Terminal: Add new files to DoCatalogs.
Fixes #18232.
2023-01-25 22:35:11 -05:00
Augustin Cavalier
946fa9e85e Terminal: Adjust indentation for kColorTable.
No functional change.
2023-01-25 22:34:56 -05:00
Augustin Cavalier
3773999f93 kernel/fs: Add permissions check to rootfs_open.
Missed in the earlier commit which added permissions checks to the
other functions.
2023-01-25 19:11:33 -05:00
PulkoMandy
83e06e62ef ffmpeg: remove use of deprecated fields in tracing
Change-Id: Id4f1e342bae8dd4a12b3f6647d60b238f98324e6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6014
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-01-25 11:58:15 +00:00
PulkoMandy
a5bcb6e0e6 ffmpeg: fix incorrect error check
The function returns a positive nonzero value when it works.

Change-Id: I99ee3e2f8f60dff960a07fefc1cf42dc3b3969cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6013
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-01-25 11:58:15 +00:00
PulkoMandy
e35a296ef7 ffmpeg: fix missing initialization of AVFrame
ffmpeg API reference does not allow to allocate AVFrame on the stack,
and especially not without initializing anything in the frame. Calling
av_frame_unref then attempts to free some non-existing data, and
crashes.

The code for video was already using a correctly allocated frame, which
we can reuse here.

Fixes #17415

Probably fixes #16831

Change-Id: I9d6ee7724ab9f22547b0030de12542ef3a650640

fix avframe

Change-Id: I170597ec323ac67be460ccbab9dae5ee3e6e1b71
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6015
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-01-25 11:58:15 +00:00
PulkoMandy
5500d61686 ffmpeg: fix build with tracing enabled
Change-Id: Ib563d45ea144c957aeb176dbb2c381a00a55b19e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6012
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-01-21 22:10:21 +00:00
Humdinger
c3162b5d8a MailMessage: Fix date in header of forwarded mails
As investigated by madmax in #18230; Date() returns a time_t since 2015. Thanks!

Change-Id: Ic35129ad60f6cadc09917c05e86f726de3061dcb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6010
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-01-21 16:51:57 +00:00
Autocomitter
3387839223 Update translations from Pootle 2023-01-21 08:18:09 +00:00
Adrien Destugues
9d51367f16 Improve "sourcecode" page of docs/develop/ a bit
Prepare for adding section about getting the sources and submitting
patches (to be converted from the existing docs on the website)
2023-01-20 13:01:19 +01:00
Adrien Destugues
6b1db710f7 docs/develop: introduce intermediate index for each section
The table of content of the top level will include everything that's up
to 2 levels down. Currently this results in a lot of pages and no clear
organization.

Extra index pages allow for more intermediate levels, resulting in less
things being listed in the main page. This way the organization is a bit
clearer, even if this is still not great due to many missing pages and
sections in the documentation currently.

Change-Id: I5bbdd96b3c2ff3334b9ad1b86fd9e7fb00fd63a6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6008
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-01-19 22:09:22 +00:00
Alexander von Gluck IV
7cfd9e92cf tests/qemu-boot-test: Adjust arm64 cpu to max per David k.
* Gets us into the haiku kernel when booted with u-boot

Change-Id: I70aa6cf4c9d8894cf13771e97652778215fe0ab7
2023-01-19 13:00:57 -06:00
Alexander von Gluck IV
ce41afe7f8 tests/qemu-boot-test: Add initial arm64 boot test case
Change-Id: I108a27408873330169de3ab31eecb2fd034ee628
2023-01-19 11:41:33 -06:00
Máximo Castañeda
8e2cd40d9e FontManager: use correct constants for default styles
Reapply part of 12ae5308f2 that was lost in the long revision history of
user fonts. No big deal as the values are the same.

Change-Id: I26bbceb0380b33e35b105519a11e309500f9acf6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6006
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-01-18 17:26:43 +00:00
Murai Takashi
4cff9918f3 screen_savers/flurry: Remove duplicated code
Pointed out by Clang Static Analyzer (Dead assignment).

Change-Id: I3360c52ec42ca1695d4bc45a422fd91de1a349e1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6005
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-01-18 14:20:26 +00:00