Commit Graph

58747 Commits

Author SHA1 Message Date
JackBurton79
b070314f50 FlattenPictureTest: Fix DrawStringsWithOffset test
fixes #14481

Change-Id: I7aee0f9e1ed088d2b5253f22a55228b0fc8f16ec
Reviewed-on: https://review.haiku-os.org/546
Reviewed-by: Stefano Ceccherini <stefano.ceccherini@gmail.com>
2018-09-12 10:44:55 +00:00
Augustin Cavalier
c3ac0a72a6 BMenuItem: Remove ourselves from the super menu on destruct.
This fixes the (intermittently) crashing test added in the previous commit,
and should also fix #12024 and #14348.

Note that this is a slight behavioral departure from BeOS, though since
BeOS crashed when this was done previously, it shouldn't cause any
other problems.

Change-Id: I90b6132ff7741b8d6cb601375a9b11fc3ffacb40
Reviewed-on: https://review.haiku-os.org/541
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-12 01:15:48 +00:00
Augustin Cavalier
4628b6de8e tests/interface: Add a (currently crashing) BMenu "concurrency" test.
Adds/removes items as rapidly as possible from the menu from the
main thread while the menu is open. That part works. Then it deletes
all of the BMenuItems and then closes the menu, which crashes,
as the BMenuItems do not notify the BMenu they are being deleted.

I tested this on BeOS and it seems that this model crashes there also
(looking through the code comments, it seems there are a number of
testcases found throughout the years like this.) Removing the items
before deleting them indeed fixes the crashes on both BeOS
and Haiku.

Change-Id: I8624f966bdc17030ddca05b97aa57b518ab420c5
Reviewed-on: https://review.haiku-os.org/540
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-12 01:15:48 +00:00
David Murphy
81d0a0e0a7 BColumnListView: Always update the reference rect in ::FindVisibleRect...
...if the row is present in the list, but continue to return false if the
row is not currently visible on the screen.

Part of #11675. Cherry-picked from https://review.haiku-os.org/442.
2018-09-11 18:59:32 -04:00
Augustin Cavalier
74e882b39b kernel/fs: Flush the underlying device's write cache as part of sync().
BFS does this as part of journal management, but not as part of block
cache synchronization (which makes sense, as flushing it then would
defeat the purpose of the drive's write cache.) No other file system
seems to touch it at all, so we should do it as part of an explicit sync.

This may help with some of the filesystem corruption issues, as it seems
that on slow disks, the drive might not have enough time to flush the cache
before it is powered off (or on some SATA/AHCI based disks, it is not flushed
before close at all), so triggering it here and, as the ioctl is supposed to be
synchronous, waiting for it also, seems to make sense.

Change-Id: I7d9992c21ca4b59c839711dcc96c973b4b8df052
Reviewed-on: https://review.haiku-os.org/530
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-11 20:06:58 +00:00
Kacper Kasper
709c79a3f7 MediaPlayer: don't fill background for mute button
* The difference is visible when control background doesn't match
  panel background.

Change-Id: Ie3a034acaa52929becd6601520e0e05f32ecc8d8
Reviewed-on: https://review.haiku-os.org/537
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-11 20:03:13 +00:00
Andrew Lindesay
a609673ce8 Support : Fixes for Relative URL Handling
When URLs combine a base URL with a relative part, the relative part's
path component was being pre-processed.  This removed any ".." from the
path and in some cases in the unit test cases, the ".." should have been
retained and then only later applied to the base URL.  This changes
fixes this so that the relative part is not pre-processed and is applied
with it's path in a raw state.

Completes Fixes for #14377
Change-Id: I9cebb8599889494e11f40a3b54c87ebca3ed1a21
Reviewed-on: https://review.haiku-os.org/529
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-09-11 18:39:53 +00:00
JackBurton79
66f19f7201 Fix ClipToPicture() inside a BPicture
Mimic what is't done in clip_to_shape: call SetCanvasGeometry() and ResyncDrawState().

Change-Id: Ibbd77ec8cf90952d94ee35871736e145102a763e
2018-09-11 14:30:59 +02:00
Augustin Cavalier
21e99b4766 pkgman: Suppress the erroneous "aborted: No Error" messages on no internet.
Here's what happens:
 * BPackageManager created a BRefreshRepositoryRequest with a BContext
   of an empty DecisionProvider and itself.
 * Since there is no internet access, the FetchFileJobs that the refresh
   class queued fail. Specifically, the first one does, but then as the
   subsequent ones depend on it, they are all aborted.
 * As some jobs were aborted, the StateListener is notified.
 * The state listener of course has the BPackageManager class as one of
   the listeners, and so calls it, because even though the handler methods
   of BRefreshRepositoryRequest, they are powerless to stop event propagation.
 * The BPackageManager's highest subclass' implementation gets called, which is
   of course pkgman's.
 * pkgman decides to DIE() upon receiving word that a job was aborted.

There are thus four potential solutions to this issue:
 * Rewrite the package kit's event & job handling systems to not be so
   screwed up in terms of propagation. Seriously, there is way too much
   stuff that we send to the "user" in here, and as you can see, it can
   get *extremely* convoluted even for supposedly "simple" tasks. This
   is probably the best "long-term" solution; but obviously is far too
   involved for the present.
 * Only partially rework event handling; specifically in the SupportKit to
   allow JobStateListeners to stop further propagation. This is probably
   the best "medium-term" solution.
 * Do not pass the package manager as the JobStateListener to the
   RefreshRepositoryRequest. This would have the downside that the
   regular notifications about download state, etc. would not be returned
   at all, which we don't want. We could make a shim ... but that would be
   a lot of code for little benefit. The prior solution makes more sense.
 * Completely ignore "JobAborted" notices in pkgman. In fact, this is the
   solution that virtually all other consumers of this API take (although
   some of them seem to have TODOs about it), including package_daemon,
   HaikuDepot, etc., and so it's the one I've taken here. If a "job aborted"
   error is actually fatal, then it's the Package Kit's problem.

Fixes #13075.
2018-09-11 01:32:59 -04:00
Augustin Cavalier
4c7002a3d1 mime_db: Add type for HEVC elementary streams.
"Elementary streams" were introduced with MPEG-2, but did not find much use
outside of internal data interchange until now, which finds some HEVC
files being actually distributed in this format.

The first four bytes (00 00 00 01) are common to all (packetized?) elementary
streams, while the three following (40 01 0c) identify a HEVC stream. Actually
I could not find good data on these; all the HEVC files I saw (and some hex-
dumps on online mailing lists of more) contain these three bytes in common
while following ones appear to be the internal header. (I didn't dig deeply
enough into FFmpeg's source code to find out the "real deal.")

Fixes #12565.
2018-09-10 22:26:32 -04:00
Augustin Cavalier
14162168f5 mime_db: Add entries with sniff rules for DjVu and XPS.
These formats are supported by DocumentViewer.
2018-09-10 21:56:34 -04:00
Augustin Cavalier
503d889314 Remove the "Haiku" screensaver from the tree.
As discussed in #14447.
2018-09-10 19:51:02 -04:00
JackBurton79
5706737797 PictureDataWriter: Fix invert rect.
Resetting the drawing mode to B_OP_COPY was not right, since the previous mode could be anything.
Use WritePush/PopState() instead.

Change-Id: If9cba2c46bf372fd0164d951fcc49696cf72d576
2018-09-10 16:14:49 +02:00
JackBurton79
da51ebe0e5 BPicture: uncomment (and fix build) of the clip_to_picture method.
Does not seem to work, though.

Change-Id: I309d8de79a71ab8e08f4ac2f2566080b67b84800
2018-09-10 14:19:10 +02:00
JackBurton79
cb0d7a1ecd app_server: make a copy of the passed BPicture
Like the AS_DRAW_PICTURE case, make a copy of the passed BPicture also for AS_CLIP_TO_PICTURE

Change-Id: Id9a0adc48d73e5ec9c0d37e2ed85e30aa48369ab
2018-09-10 12:48:30 +02:00
JackBurton79
d1311300dc app_server: local variable was shadowing the outer variable
In the AS_CLIP_TO_PICTURE case, the "picture" variable was shadowing the outer "picture" variable.

Change-Id: I3b9de2432f93a683aaccdb899051a14ebf9b7e6e
2018-09-10 12:45:21 +02:00
Alexander von Gluck IV
7f644d106d xhci: gcc2 buildfix from hrev52319
Change-Id: I5d82059bd002c26ba372d55f5a5538ce7d19ffb2
2018-09-09 13:50:55 -05:00
Jérôme Duval
21c87a5d83 drivers: remove some non-haiku support code.
Change-Id: Ic55bb4832adabeb807f763c87ad938e74fb3a97d
Reviewed-on: https://review.haiku-os.org/520
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-09 17:32:01 +00:00
Augustin Cavalier
24ed1a79a3 AboutSystem Credits: Some updates.
* Move nielx back into Contributors
 * Move hamishm into Past Contributors
 * Add some new translation contributors
2018-09-08 20:14:26 -04:00
Augustin Cavalier
a3e22cdaa7 Installer: Rework status message view sizing logic.
* Make the status message view have a minimum height of the logo
   view's height.
 * Properly add the views to the BGroupView layout.
 * Instead of trying to set the explicit minimum size from the status
   view information, just invalidate the GroupLayout. This seems to fix
   a number of bugs relating to text overflowing the view, while it doesn't
   fix others (e.g. orphan words on their own lines are still not drawn
   in some cases, which appears to be a BTextView bug.)
 * Use BString::SetToFormat instead of snprintf in some places.

As far as I can make out, fixes #13608.
2018-09-08 19:49:03 -04:00
Augustin Cavalier
47ba82bf03 Deskbar: Add missing NULL check in SwitchWindow().
All other functions in this file that locate the TTeamGroup via FindTeam()
do a NULL check afterwards, so the fact that this one did not just looks
like an oversight.

Fixes #14457.
2018-09-08 19:03:06 -04:00
Augustin Cavalier
f960901a70 EFI: Use proper mnemnoic for retf (lret) to appease Clang. 2018-09-08 18:56:33 -04:00
Augustin Cavalier
e282a54db8 BUrl: Remove HAIKU_TARGET_PLATFORM_HAIKU from main header.
These are really only defined during the build of Haiku itself,
so we don't want them in a system header. Since none of these
functions are virtual, leaving them as declared but not defined
should be fine.
2018-09-08 18:56:33 -04:00
Augustin Cavalier
23446707de ArchitectureRules: Pass -shared to the universally to the linker when using Clang. 2018-09-08 18:56:33 -04:00
Alexander von Gluck IV
bd234de11c xhci: Turn OpsReg waits into common function
Change-Id: I52ada3447b638db07622fa51746e75ce6cce7a46
Reviewed-on: https://review.haiku-os.org/518
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2018-09-08 14:38:16 +00:00
Autocommitter
94b53d8118 Translations: Add Catalan, Greek and Korean 2018-09-08 07:20:47 +00:00
Autocommitter
b1547efc75 Translations: remove Croatian and Slovenian 2018-09-08 07:16:50 +00:00
Autocomitter
e2cb18fa9a Update translations from Pootle 2018-09-08 06:46:37 +00:00
Alexander von Gluck IV
4fead684b8 repo: Adjust repos to be more sane [master]
* Set url (identifier) as generic hpkg.haiku-os.org url
  * Set base-url (actual repo location) as eu.hpkg.haiku-os.org (our eu mirror)
  * Drop old "repository" url mess

I had a realization that haikudepot operates off of the base-url, if
we continue using old url's after r1beta1, we're going to be stuck
with all the symlinks and redirects for a looooong time.

This also opens the chance for us to go off of the generic "url"
for haikudepot identification, which will let it work when users
leverage mirrors.

Change-Id: Ic8fa954190cc26602911e133dd3c25ce2a96ce9d
2018-09-07 20:08:20 -05:00
Jérôme Duval
9928fbf629 radeon: fix copy/paste typo.
Change-Id: I669c73a990b0fff84cf5d37b5a4cc57ad97905ff
Reviewed-on: https://review.haiku-os.org/514
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2018-09-06 13:26:58 +00:00
Jérôme Duval
a3a41a5b14 Make areas cloned by accelerants effectively cloneable.
Change-Id: I78046af6548e36571813ce516491c7fb64581967
Reviewed-on: https://review.haiku-os.org/513
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-06 13:23:55 +00:00
Nikolas Zimmermann
0e9dc76e5f Fix build with DEBUG_PAGE_QUEUE enabled
Change-Id: Id9ffcd50835a0ba9e4276a3bb5939cc1d4afa128
Reviewed-on: https://review.haiku-os.org/516
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2018-09-06 07:46:25 +00:00
Murai Takashi
09095817eb Mediaplayer: Suppress -Werror=class-memaccess
Suppress -Werror=class-memaccess pointed out by gcc8.
 * Remove unneed memset(), since media_format is cleared by constructor.
 * Use media_format::Clear() instead of memset()

Change-Id: I02e19c1fab1f1b3f6c348e1d3ac63536d5c829b2
Reviewed-on: https://review.haiku-os.org/484
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
2018-09-05 09:29:01 +00:00
Andrew Lindesay
3cc5e76f2d Support : Fixes for Verbatim Regeneration of URL String Form
A URL in string form should be able to be parsed and then verbatim
regenerated according to 'UrlTest'.  This change fixes this ability
for the case where there is a '?' initiating a query or a '//'
initiating a host/authority section.

Partly Fixes #14377

Change-Id: I6547253c3cdc22d79514edf75284e9725d1a2d17
Reviewed-on: https://review.haiku-os.org/512
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-09-05 09:05:10 +00:00
Autocomitter
44c4473bf0 Update translations from Pootle 2018-09-05 08:15:58 +00:00
Jérôme Duval
0ff73852d1 s3: fixes for SMAP.
untested.

Change-Id: Icbb3ddf8c0f840fae0e2107ca211728036ba8aa7
Reviewed-on: https://review.haiku-os.org/510
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2018-09-04 14:02:18 +00:00
Jérôme Duval
89780a095e ZstdCompressionAlgorithm: handle ZSTD_error_dstSize_tooSmall.
Change-Id: Ib6dca7ac8457afae845fad24514945b4ecd521cc
Reviewed-on: https://review.haiku-os.org/509
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-09-04 12:33:14 +00:00
Humdinger
dc1991b5d5 Installer: update 'EULA' window
* De-escalate the severety of data loss from "high risk" to "risk".

* Remove the advice to not create partitions with DriveSetup. It's been tested
  and been working well since the last alpha. Do recommend making backups of
  all partitions.

* Remove description how to add Haiku to Grub. It's too much detail and the
  user would have to memorize the info. Add a link to our Booting guide
  instead.

* Mention BootManager as an alternative to boot Haiku, refering to the
  Userguide for more info.

* Alpha -> Beta

* Only give normal thanks instead of "a lot" and don't beg to like us.
  Sounded a bit desperate...

Change-Id: I212513fde01287f5d1c9c5c9891827aaf0b7e1ea
Reviewed-on: https://review.haiku-os.org/502
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 1edc131debcf8ea1c9cd9eafd41c356f0432d9a5)
Reviewed-on: https://review.haiku-os.org/508
2018-09-03 01:39:45 +00:00
Augustin Cavalier
0df493a13a libroot: Fix handling of debugger() call in abort().
The kernel's handling of SIGABRT is just to terminate the application
immediately without doing anything else (it only notifies the debugger if
there's one installed for this application already.) More serious faults
(e.g. SIGSEGV) originate in the kernel and handle this logic before they
even invoke the signal handler.

So the correct solution is to do the same here in libroot. This incurs
a very, very slight performance penalty of the syscall time for sigaction(),
though I expect whatever applications are causing SIGABRT to be invoked more
than once a second will call raise() directly instead of abort()...
2018-09-02 00:13:40 -04:00
Augustin Cavalier
e54f86aa6a libshared: Change string_for_rate to use KiB/s instead of Kbps.
string_for_size uses KiB, etc., and so when the two are combined (e.g.
pkgman's progress display), it looked especially strange to have two
different units.
2018-09-02 00:10:30 -04:00
Augustin Cavalier
f45e4bd1b6 drivers/poke: Fix for GCC7 & C++11. 2018-09-01 16:15:01 -04:00
Augustin Cavalier
1e3f0626ab drivers/poke: Only allow root() to open.
This allows applications to theoretically open() the poke device but
then change their uid/euid to something more restrictive. The mem
device is not even this permissive; but I can think of some scenarios
in which this might be useful.
2018-09-01 15:43:57 -04:00
Augustin Cavalier
8d13e72523 drivers/poke: Access the user buffers correctly.
Untested (as it seems /bin/poke was never added?) but unless I messed
up some of the memcpy arguments, this should work.

Fixes #14429.
2018-09-01 15:40:50 -04:00
Augustin Cavalier
5ae6f34b81 drivers/poke: Compile as C++; some formatting cleanup. 2018-09-01 14:52:54 -04:00
Fredrik Holmqvist
6172ccc455 Embedded Controller, sync with FreeBSD
* Tries to handle all pending events at once
 * Wait is now polling every mS while waiting
2018-09-01 19:41:25 +02:00
JackBurton79
59a26ab62f FlattenPictureTest: add tests for ClipToRect,ClipToInverseRect,ClipToShape,ClipToInverseShape
Change-Id: Ia68b6989c2973f37f0772621190ab8f57fbeb381
2018-08-31 10:44:34 +02:00
JackBurton79
3211dccc22 FlattenPictureTest: add test for #6761
Change-Id: I848ccec2ea102dc4fc5c0e4f718053ecad196f8d
2018-08-30 11:25:55 +02:00
Augustin Cavalier
7985831a65 bin/multiuser: Do not exit with an error if stdin is not open.
As the comment says, there are a number of scenarios when this is
the case, e.g. non-interactive SSH sessions.

Change-Id: I3a10043820039f344b3f036f7861c81f6fb7ef05
Reviewed-on: https://review.haiku-os.org/499
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-28 23:34:27 +00:00
waddlesplash
d28caaed68 build_cross_tools: Also touch .in files to prevent their regeneration.
Change-Id: Id893460327fd6db064c6fc0fb4de8e6ada1b1773
Reviewed-on: https://review.haiku-os.org/496
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-28 21:27:50 +00:00
Augustin Cavalier
b41678294b install-wifi-firmwares: Cleanup and fixes.
* Unlink/Symlink not needed as we now use a package.
 * Use correct URLs to download headers.

Fixes #14412.

Change-Id: I76dbca3d48d0b2933a27bea666551ff86d404a93
Reviewed-on: https://review.haiku-os.org/493
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-28 20:14:00 +00:00