Commit Graph
52 Commits
Author SHA1 Message Date
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 <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-01-18 17:26:43 +00:00
Máximo Castañeda 7a6e72c289 listdev: include dependency on generated file
listdev depends, through usb-utils.h, on the script-generated usbhdr.h.

Additionally, there's no dependency on kdevice_manager.h since 2008.

Change-Id: I77d36d6b5dca48415fcb98121ecb6d372cfa85ab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5972
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2022-12-31 14:45:40 +00:00
Máximo Castañeda 753349fb2e WebPositive: save the cookie jar in the user settings directory also for the curl backend
The files and formats are different for libnetservices and curl
backends, but now they are under the same directory whatever the
installed haikuwebkit version uses.

Change-Id: Iab87d5fd27ebea1fa0a8967a9802dfa2fb11240a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5835
Reviewed-by: waddlesplash <[email protected]>
2022-11-28 19:49:07 +00:00
Máximo Castañeda 5728bdf606 BAlert: invalidate icon view on icon change
Invalidating the layout may not be enough for an update.

Fixes: #18069
Change-Id: I93f6b0feb043c7f317a9ff1e7af11b2047fc7cd5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5821
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-11-17 21:39:13 +00:00
Máximo Castañeda 241f109ccb View: provide the transform between different coordinate spaces
There's currently no way for an application to convert between view and
drawing coordinates with a drawing states stack without keeping track of
all the transformations itself, which is not very convenient for helper
or library functions.

Handle other spaces too, for good measure.

Change-Id: Ic8404a1c111e273fff1eebf2f9f59f58246b796c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5775
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-11-13 04:04:30 +00:00
Máximo Castañeda baf401757e HaikuBook: small list levels and grammar tweaks
Change-Id: I186e38108a57a8a8b82dbfbdf27766730fe659e4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5774
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Oscar Lesta <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-11-02 02:12:23 +00:00
Máximo Castañeda 7b3e89c094 PoorMan: some libhttpd fixes
The last thttpd update was less than perfect. A bad format string was
causing crashes on directory listings, and some of our changes were
removed, like PoorMan's setting for directory listings, leaks and thread
safety.

Fixes: #17329
Change-Id: I84d9862a0ebd5492a2542cf9776462e7fe7dbe77
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5772
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-11-01 01:06:07 +00:00
Máximo Castañeda 2eab9be564 HaikuBook: fix xml
Change-Id: If6dfe4de919d946f1ff19946e1fa1abe726ea95f
2022-09-02 12:12:01 +02:00
Máximo Castañeda 0da59b2407 DesktopSettings: remove unnecessary includes
Change-Id: I94fbffbe359be954bf769299420d1df97b2da184
2022-09-02 12:10:31 +02:00
Máximo Castañeda a4dfc6aa74 app_server: fix deadlock in GlyphLayoutEngine
We want to first try fallbacks with the same style as the main font, if
available, but that introduces the chance of two threads trying to
acquire the same locks in different order, so keep at most the main font
and one fallback locked, and acquire them in a fixed order by address.

Fixes: #17850
Change-Id: Ic352fadc46eb257d2bca4804962b11ab1eb9fa12
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5557
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-08-25 17:16:55 +00:00
Máximo Castañeda 00a1f24972 PicturePlayer: update debug strings
Change-Id: I64a7dead30b8f484b63ba4d8055d93c626447755
2022-07-16 20:33:58 +02:00
Máximo Castañeda eedb92aace app_server: fix reporting of Origin in scaled views
The local state scale is applied from the origin. That is, the origin
value does not change with the local scale.

This fixes the value returned by BView::Origin() when recovered from the
app server instead of from the client cache.

Change-Id: Id628d8f334fab06e6a6d084c079cdca1cfa914c6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5443
Reviewed-by: waddlesplash <[email protected]>
2022-07-11 17:51:22 +00:00
Máximo Castañeda ab52604b90 arm syscalls: add explicit dependency
Some syscall headers are generated during the build process, and jam is
not smart enough to add an automatic dependency.

Change-Id: I7c19da7aca9da4a52c4537a5f5c279fdbe24a48a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5435
Reviewed-by: waddlesplash <[email protected]>
2022-07-06 18:03:45 +00:00
Máximo Castañeda 2e75ef07fe Fix 32bit build
Change-Id: If7c2da0a28302f5535eda25999b1f877cbca1152
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5315
Reviewed-by: waddlesplash <[email protected]>
2022-05-16 16:05:09 +00:00
Máximo Castañeda 20b50a5cb4 app_server: update list of default ignorable code points
Update as per Unicode 14 (and draft 15)
Include the noncharacters. We don't really want the .notdef glyph for
them, except for U+FDD1 which we have reserved internally to force it
from webkit.

Fixes #17593

Change-Id: I5a62bf0e7753adacc81ea19b3351deb58d5c0653
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4984
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-02-20 08:36:19 +00:00
Máximo Castañeda 9a7906eadb PatternHandler: remove unused code
hrev17117 implemented B_OP_COPY with a special treatment for text.
hrev21929 introduced the color cache to speed up that text drawing.
hrev52753 removed the special treatment of text in B_OP_COPY, but left the
color cache and the text flag behind.

Change-Id: Ib506c80a660e829132bce3ec1cb354fcfbab266c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4931
Reviewed-by: waddlesplash <[email protected]>
2022-02-18 21:31:42 +00:00
Máximo Castañeda 1f357f79ca Painter: sync renderer color
SetDrawState sets the pattern directly and then calls the member
functions to update colors. As SetHighColor does not update the renderers
if color does not change, that means we lose sync in some corner cases.

Change-Id: I5f8771baa58643c559df243dcc1603983941faee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4930
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-02-18 21:31:42 +00:00
Máximo Castañeda 72acf6a91b generate_boot_screen: fix build
Change-Id: I4ce2a45887fd2f562216aa49e1bd34269bcfdef8
2022-02-09 21:32:32 +01:00
Máximo Castañeda 3a809d9273 riscv64 syscalls: add explicit dependency
Fixes #17518

Change-Id: Id64ee4c3a3d28a32f41d8303c4a8c0c8228838d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4862
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2022-01-12 05:31:51 +00:00
Máximo Castañeda 910ebfc4f5 ServerFont: keep style if possible when setting face flags
The current style probably has the correct style flags portion. Getting
a new style in that case is unnecessary, and problematic with some font
families that have several fonts mapping to the same style flag
(SemiBold, Bold and ExtraBold are all B_BOLD_FACE, for example): the
chosen one might be different than the one already set.

Fixes #17229

Change-Id: Ie8e73627cc0547df9d624a8fac07f521fc983d06
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4416
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-01-06 10:30:47 +00:00
Máximo Castañeda b009ef381b AlphaMask: fix bounds of inverse masks
For inverse masks the real bounds rect is the canvas, as the points that
pass through are the ones not drawn.

Change-Id: I420a5eca419b215b55e4c2362e2c7646465a4cd3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4455
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2021-10-14 18:49:18 +00:00
Máximo Castañeda c10931f3b0 app_server tests: stacking of inverse clipping
A few visual tests of clipping composition with different combinations of
layers with and without the inverse bit.

Change-Id: Icddb377508733463378f93b24075fd06e54ef2cb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4454
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2021-10-14 18:49:18 +00:00
Máximo Castañeda c634a5cf32 nVidia driver: gcc2 build fix
Change-Id: I6b3f7d25ef66bd5789aa12dbccfd8e9da9701c0f
2021-09-07 21:08:00 +02:00
Máximo Castañeda ae56997857 BCountry: return country name
ICU's Locale::getDisplayName fills in the locale's name in the form
"language (country, variation)". We are interested in the country here.

Fixes #17081

Change-Id: Icb810dbe2c486d95251d4d06a48dfe3a000fa968
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4206
Reviewed-by: humdinger <[email protected]>
2021-07-13 15:03:47 +00:00
Máximo Castañeda 22dda7795d GlyphLayout: emit .nodef glyph for missing glyphs
Use glyph 0 when no glyph is found for a character in the current font
nor any of the fallbacks.

HasGlyphs has to bypass LayoutGlyphs because we want it to mark this
case as false, while still checking the fallbacks.

Change-Id: Ief8d9d53c91992c659922fb56b79be7172f4ab0d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4144
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2021-07-11 12:14:01 +00:00
Máximo Castañeda 4c23dfb3a3 posix: fix confstr
* Off-by-one error copying the string.
* As per the spec, return the buffer length for the string when passed a
  null pointer and 0 length.

Fixes https://github.com/haikuports/haikuports/issues/5821

Change-Id: Ic421f26db00f9820c6a617375e39f7341cd5ebc1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4110
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2021-06-27 08:58:15 +00:00
Máximo Castañeda 1aca853fc9 BMenu: fix menu items width in column layout
Change-Id: Ia16d51ff31760fef28bcceeab7b5c26a05cfbdad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4092
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Axel Dörfler <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2021-06-19 09:28:06 +00:00
Máximo Castañeda e41899a6fe BMenu: fix scroll activation
Fixes #14932

Change-Id: I72b16a26ea4d3cef0e9518381c583b23bdcadc22
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4078
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: humdinger <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2021-06-09 10:58:02 +00:00
Máximo Castañeda 46c95b5d09 BMenu: move menu over the menu bar only if there's more space there
Fixes #16773

Change-Id: I465c2f4366c11b7b0bacaed57c3d8fd33defe8a2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4077
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2021-06-09 10:58:02 +00:00
Máximo Castañeda a60e5cb46e Get font metrics from a bitmap if there are no outlines
FreeType only provides some font parameters for scalable fonts. In
particular, we use the FT_Face values of units_per_EM, ascender,
descender and height, which are 0 for bitmap-only fonts.

Part of #16938.

Change-Id: Iea2d87ad95f3bc1c2e27fb041da0a27c6e68be91
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4042
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2021-06-04 07:39:02 +00:00
Máximo Castañeda bd6434b663 Revert "packagefs and IOCache: don't reread pages when we have them all."
This reverts commit dfc8e52638.

It needs more attention to its influence on other parts of the code.

Fixes #16954

Change-Id: Ibb764d81666434a198023bc345a45ef9d270eadb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3976
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2021-05-23 21:05:01 +00:00
Máximo Castañeda 3349a731ef nfs4: fix gcc2 build
gcc2 preprocessor reads `__func__,` as one token, yielding
dprintf("nfs4: %s()" "whatever"  "\n", );
and a parse error for the expansion of ERROR with only one parameter.
Separating the comma gives the result we want.

Change-Id: I5d20e2c06a796b7092b9f23162fa7bfb269318be
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3899
Reviewed-by: Jérôme Duval <[email protected]>
2021-05-04 14:33:00 +00:00
Máximo Castañeda 8f16317a5b Fix build
Change-Id: I0d3e3afc7262688e3bc90672766e6e7d263f06b8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3884
Reviewed-by: Adrien Destugues <[email protected]>
2021-04-23 11:33:23 +00:00
Máximo Castañeda 8f5700bc46 intel_extreme: disable CK505 clock source
Using the CK505 clock source may need some more checks or configuration
we currently don't do, leading to a blank screen in some systems.
Whatever the reason, disabling it makes the driver work on my machine.

Fixes #16357

Change-Id: If207ffdddcf6e6eb73bc69ce5a8bd2842fd2141b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3867
Reviewed-by: Adrien Destugues <[email protected]>
2021-04-19 19:48:47 +00:00
Máximo Castañeda 6c04dd4898 Fix subpixel scanline size for fonts with bitmaps
Fixes #16788

Change-Id: If4c5a6e37ab5950c2426286d5afab59652a2a61b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3743
Reviewed-by: Adrien Destugues <[email protected]>
2021-02-28 11:16:22 +00:00
Máximo Castañeda 67eeb4db48 MediaExtractor: go back to 3MB min cache size
Should allow us to at least play the same files we could play before.

Fixes #16738, though not its cause

Change-Id: I2d23011696b730a891c802e8c2bfc23afe0041cf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3628
Reviewed-by: Adrien Destugues <[email protected]>
2021-01-19 20:29:39 +00:00
Máximo Castañeda 7f9c675629 MediaExtractor: access chunk cache only when we have it
Change-Id: I533bb2e25b0756acaaa227cdd06c4067d4120066
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3622
Reviewed-by: Adrien Destugues <[email protected]>
2021-01-10 22:07:16 +00:00
Máximo Castañeda 2e68fbd207 Fix wrap for AUDIO_INT
Floats don't have enough precision for all 32 bit integers. In
particular, near INT32_MAX their value is INT32_MAX + 1, which, when
converted back to int becomes INT32_MIN.

Change-Id: Ief3c1177b4f69baac13df5bac977882fea95ae01
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3511
Reviewed-by: Adrien Destugues <[email protected]>
2020-12-30 13:35:14 +00:00
Máximo Castañeda 80a920f65d BSoundPlayer: check for NULL node
Fixes #16683

Change-Id: I81c252b6eeaeb35cc5f33a796a7242c0965c3f27
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3546
Reviewed-by: Jérôme Duval <[email protected]>
2020-12-23 19:57:32 +00:00
Máximo Castañeda a0f0cb5a9d Input preferences: fix list item retrieval
Fixes #16679

Change-Id: I87844b7745dc2d9e126983a888caf01f37f6b742
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3540
Reviewed-by: Adrien Destugues <[email protected]>
2020-12-23 10:49:01 +00:00
Máximo Castañeda 7f7f9f1def ffmpeg decoder: return last chunk of audio
Change-Id: I712e5959f066e65471777e6724637aac7a17d07c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3510
Reviewed-by: Adrien Destugues <[email protected]>
2020-12-21 14:29:43 +00:00
Máximo Castañeda 42b9734805 Set normal mouse mode on set_focus_follows_mouse(false)
Change-Id: Iae4300d7da5ada391c2d2dccff2b7de7f1b38245
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3509
Reviewed-by: Adrien Destugues <[email protected]>
2020-12-21 14:29:15 +00:00
Máximo Castañeda 775eaaafd3 Mixer: fix debug build
Change-Id: I9e998d8fd35b7fd3d505067bd30e1bbcbcdd8e96
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3508
Reviewed-by: Adrien Destugues <[email protected]>
2020-12-16 07:41:26 +00:00
Máximo Castañeda fb6ee7844d GameSoundBuffer: avoid buffer copy
Change-Id: Ibffe80ebe5e8205e853e09b6ebb9ba65b53d83e7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3475
Reviewed-by: Jérôme Duval <[email protected]>
2020-12-08 12:33:22 +00:00
Máximo Castañeda cfe72209cf U8 sound format
U8 sound has a nonzero value as its zero amplitude, so it needs to be
special-cased when mixing, applying gains and other transformations.

Change-Id: I5ad96b5f39d454bffad2449ac9f27b2ae61e2ccd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3470
Reviewed-by: Jérôme Duval <[email protected]>
2020-12-08 12:33:22 +00:00
Máximo Castañeda 8e9d64f0d6 FileGameSound: fix stuck in pause when ramped
Change-Id: I346d7b93fa8507451ee46856ad6618acd6e2d609
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3469
Reviewed-by: Jérôme Duval <[email protected]>
2020-12-08 04:32:56 +00:00
Máximo Castañeda 15de111dcf FileGameSound: fix buffer advance accounting
Change-Id: I15bb2b1e703cad955544a1151adc6a1277b077a8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3467
Reviewed-by: Jérôme Duval <[email protected]>
2020-12-08 04:32:56 +00:00
Máximo Castañeda 8eafd6cd04 GameKit: use more than 1 sec precision ramping
Change-Id: I015f116239fad5dd48f7f4509db503dc8f60c0d0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3468
Reviewed-by: waddlesplash <[email protected]>
2020-12-06 18:17:55 +00:00
Máximo Castañeda a1c9aa9d90 Get a fallback font for each missing character
Make the glyph layout engine look for a suitable font fallback for each
missing character, instead of using the first one found for all of them.

Solves #16404, #16213, maybe other garbled text issues.

Does not solve similar issues of getting slightly different positions and
widths for a whole string than for the sum of its parts due to subpixel
rendering (cf #15007 comment 2).

Change-Id: I40664e32c8ecd5f09e10aa7a60fcdaec230471b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3273
Reviewed-by: Adrien Destugues <[email protected]>
2020-12-01 11:45:27 +00:00
Máximo Castañeda 64fc5a66b1 DefaultMediaTheme: fix Slider scale
Values are using a scale of 1000, but limits are set 0..100. Very
visible in media preferencies when using balance controls for stereo
connections in the mixer: the control is shown full right at first and
the moment you touch it and the gain is updated, you only get sound from
the left channel.

Probably the root cause of #15836 and #16070.

Change-Id: I31d3b6b11a57ca99a1cc8373d9fb003f21b192b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3445
Reviewed-by: Adrien Destugues <[email protected]>
2020-11-30 20:06:16 +00:00
Máximo Castañeda 8c78892580 BFileGameSound: don't copy garbage after track end
Check for the end of track, as the stream is repositioned on the first
frame, the start of which we were copying to the buffer if there was
space left, whether we were looping or not.

Solves #16592

Change-Id: Ic49d1776577b71a4451775876597b9c9003e1d35
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3411
Reviewed-by: Adrien Destugues <[email protected]>
2020-11-24 14:02:30 +00:00
Máximo Castañeda 2ad62d391b resizefs: fix usage string
Change-Id: Ic864135ce7f29220f158112e50aa3164e4bd738e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3210
Reviewed-by: Adrien Destugues <[email protected]>
2020-09-12 19:37:59 +00:00