57664 Commits

Author SHA1 Message Date
Julian Harnath
5c821d1200 SystemProfiler: prevent nested wake-up of profiler thread
* When SystemProfiler::_MaybeNotifyProfilerThreadLocked() is called
  and the conditions are right, it will lock the thread's scheduler
  spinlock and unblock it. Internally, the unblock will enqueue the
  thread into the run queue, which causes a ThreadEnqueuedInRunQueue
  event for SystemProfiler. Since the conditions haven't changed, it
  now went into _MaybeNotifyProfilerThreadLocked again (this time
  from the profiler thread context). In there, it will try to lock
  the profiler thread's scheduling spinlock, which is already locked
  by the other thread (which is firmly sleeping). Deadlock, KDL.

* Before unblocking the profiler thread, unset fWaitingProfilerThread
  so that further events will not try to unblock it again.
2017-11-24 18:22:14 +01:00
Julian Harnath
d45104b1eb HaikuDepot: incremental update of FeaturedPackagesView
* Performance: on incoming package update messages, don't setup
  all data in the PackageView from scratch again; instead, only
  update the parts which were actually changed
2017-11-24 18:22:14 +01:00
Julian Harnath
39f995919e HaikuDepot: blue screenshot background and transparency
* Change the background color in the screenshot enlarge window
  from black to the blue, specifically the "Haiku blue", the
  default desktop background color. Makes it look much friendlier.

* Setting the low color later so it's not overriden also makes
  transparency in the screenshot work, i.e. it blends onto the
  blue background (many screenshots are thankfully already using
  transparency to mask out the unused rectangle left by the window
  tab)
2017-11-24 18:22:14 +01:00
Julian Harnath
d90412cb8f HaikuDepot: add repository column in package list view
* As requested in #12538

* Hidden by default to not clutter up the view with information that
  isn't important in the default setup. Like the state of other
  columns, the visibility is remembered.
2017-11-24 18:22:14 +01:00
Kacper Kasper
546065592d PowerStatus: make tab size dependent on font size. hrev51613 2017-11-24 15:28:25 +01:00
Adrien Destugues
8ddec194c6 intel_extreme: backlight control on pre-PCH devices
Thanks to oco for letting me test this on his old laptop.
hrev51612
2017-11-23 23:59:39 +01:00
Augustin Cavalier
e042a53b7d configure: Avoid bashism introduced in previous hrev. hrev51611 2017-11-23 20:21:38 +01:00
hyche
484f64f315 TextInput: Align the text when typing or removing.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Closes #13796.
2017-11-23 20:12:24 +01:00
hyche
1641a0516d Fix aligning when text growing more than the right bound..
because the bound scrolls to the current cursor to view the text (ScrollToOffset).
Follow up #12608

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-11-23 20:10:11 +01:00
Augustin Cavalier
14d690378f app_server/DelayedMessage: Delete scheduled on error.
CID 1422581.
hrev51610
2017-11-23 19:40:04 +01:00
Augustin Cavalier
a20f4f8a85 MidiSettings: Don't leak settings in failure case.
CID 1422944.
2017-11-23 19:40:03 +01:00
Augustin Cavalier
d692d22c9d debugger/elf: Don't leak memory in failure case.
CID 1423098.
2017-11-23 19:40:02 +01:00
Augustin Cavalier
7131246873 BNetworkAddress: Close socket in ResolveForDestination.
It was closed on all the failure cases but not on the success one.
Found by Coverity.
2017-11-23 19:40:02 +01:00
Augustin Cavalier
75fa008e23 BProxySecureSocket: Fix obviously untested code.
* Actually set status before testing it
 * sscanf (reads from passed buffer) not scanf (reads from stdin)
 * &httpStatus not httpStatus.

Found by Coverity.
2017-11-23 19:40:01 +01:00
Augustin Cavalier
14fcbb52cd device_interfaces: Fix memory leak on success.
The module list was closed properly at the end of the function body
(failure case) but not inside the loop on the success case.

CID 605738.
2017-11-23 19:40:00 +01:00
Augustin Cavalier
d73993ff20 configure: Fix & enhance --use-clang.
Now you set the arch along with the argument, and specify the binutils
manually (and thus build without a complete crosstools environment.)
2017-11-23 19:40:00 +01:00
Humdinger
4d87bc24d4 DeskCalc: Improve removal of newlines of dropped files
Thanks to Adrien for the pointers.
hrev51609
2017-11-23 18:18:01 +01:00
Alexander von Gluck IV
eb81dec460 kernel/u-boot: Add a few missed fdt compat's for omap uart hrev51608 2017-11-23 10:25:18 -06:00
Jérôme Duval
b247f935d1 install-wifi-firmwares.sh: remove haiku requires.
fixes #13794
hrev51607
2017-11-23 17:11:51 +01:00
Jérôme Duval
a99d222832 usb_ecm: support for QEmu CDCE network device.
* the CDCE configuration happens to not be the first: iterate the configurations.
* we set the alternate control interface
* queue interrupt requests once opened.
hrev51606
2017-11-23 16:50:23 +01:00
Adrien Destugues
5f4f984a94 etc/profile: Fix setting of LC_* variables
Since hrev51075, locale -m changed meaning to the one expected by POSIX
(it now lists character maps, instead of giving the current language).

Since the short options may change again (locale -c is still not doing
what POSIX requires), use long options instead. This is more readable
and POSIX doesn't specify anything there so we can name them however we
want.

Fixes date parsing in Python which relies on these variables to detect
the current locale.
hrev51605
2017-11-23 14:50:11 +01:00
Adrien Destugues
4205fc9141 locale: document -c as the shortcut to get message locale again.
It was deprecated in favor of -m, but -m then changed meaning to comply
with POSIX. So restore documentation for -c, and add proper
documentation for -m.
2017-11-23 14:50:11 +01:00
Adrien Destugues
8903cd4256 Bump MAX_SHADOW_PWD_PASSWORD_LEN
Fixes #13733.

Unlike written in the ticket, the string length is 136 (not 135),
and the code checks for rejects anything greater or equal to the max
value. So set the constant to 137.
hrev51604
2017-11-23 13:00:48 +01:00
Adrien Destugues
eb5604bcb0 UDP: keep a reference to domain when we need it
The domains could be deleted by other threads while we were using them
to handle incoming packets, leading to an use after free (deadbeef).

Keep a reference to the doamin as long as we need it so other threads
will not delete them.

Fixes #9721, #12567
hrev51603
2017-11-23 12:11:09 +01:00
hyche
11dee0444f TextInput: Fix text width
Thanks PulkoMandy for teaching me how to use Debugger and part of the interface kit..
Fixes #12608

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Thanks for investigating and finding the problem!
2017-11-23 11:06:25 +01:00
Adrien Destugues
a61d30b83b Fix app_server build for brightness support
Thanks to Hy Che for noticing this!
hrev51602
2017-11-22 23:17:51 +01:00
Humdinger
6a35420117 DeskCalc: remove trailing newlines of dropped files
Initialize the buffer.
Remove trailing newlines. Before, the dropped expression would
'scroll' out of view if it happened to have a newline at the
end.
Thanks to DeadYak for helpful input which pretty much changed
my original code about 98%...
hrev51601
2017-11-22 19:25:16 +01:00
Augustin Cavalier
df9bc792e0 runtime_loader: Set sSearchPathSubDir on first image, not on app image.
Under normal conditions this will behave identically. But when using LD_PRELOAD
or the like, some shared objects (and dependencies) are loaded before the
app image is, and on the secondary arch on hybrid builds, will fail to load
any of their dependencies due to sSearchPathSubDir not being set.

Fixes #12214, which had plagued users of libroot_debug for a long time now.
hrev51600
2017-11-22 17:55:36 +01:00
Adrien Destugues
f69717add6 FirstBootPrompt: more layout fixes
ResizeToPreferred will only relayout the window once. Further calls will
not change anything, even if the text in the BTextView changed. So make
sure to compute the preferred size with a very high text view, and only
then, set the (rather short) english text.

This makes the text view large enough to fit the text in all languages,
and the window never changes size.
hrev51599
2017-11-22 16:34:11 +01:00
François Revol
f254805b43 usb_webcam: UVC: guard against NULL config or interface from USB device hrev51598 2017-11-22 14:06:06 +01:00
François Revol
9c7aacad7b Typo 2017-11-22 14:06:06 +01:00
Adrien Destugues
c247a73bea app_server: handle empty drag bitmap
An application is allowed to set an empty drag bitmap. In that
case, the offset from the cursor doesn't matter, because there
is nothing to draw anyway.

app_server would end up confused by the empty bitmap (which has
no bits) and invalid offset (it would try to allocate a 2^16
x 2^16 pixels bitmap to fit both the cursor and the empty
bitmap), and eventually it would crash.

Fixes #13577.
hrev51597
2017-11-22 13:54:12 +01:00
Augustin Cavalier
8742c1d044 Tracker: Remove now-unused bool displayingSymlink argument from InfoWindowRect. hrev51596 2017-11-22 11:36:36 +01:00
John Scipione
a75fc8a7ab Keymap: simplification
Call already existing Offset() method instead of reproducing it.

Set fCharsSize in BKeymap::SetToCurrent()
hrev51595
2017-11-21 14:48:54 -08:00
Augustin Cavalier
164e4f8de4 intel_extreme: Beginnings of Broadwell support.
At present, does not work (it fails to properly set up interrupts,
resulting in thousands of unhandled ones which all but grinds the system
to a halt) but this at least is some progress.
hrev51594
2017-11-21 23:37:18 +00:00
Michael Lotz
cec4fe2f85 app_server: Remove stubbed HTML5 HWInterface.
It was mostly a renamed copy of the remote HWInterface with
beginnings of a webserver and client. It never became actually
functional.
hrev51593
2017-11-21 23:31:44 +01:00
Michael Lotz
83241299ce Move the HTML5 remote desktop client to src/tools. hrev51592 2017-11-21 22:28:07 +01:00
Michael Lotz
e30d37ddd6 RemoteHWInterface: Fix build with tracing disabled. hrev51591 2017-11-21 22:23:16 +01:00
Michael Lotz
85195eb807 Add a HTML5 client for the remote desktop protocol.
It is implemented using websockets and canvas darwing. It directly
speaks the remote desktop protocol. A websocket proxy that translates
the TCP connection into a usable form is needed. Websockify works for
this out of the box directly under Haiku.

Note that not all drawing modes are implemented, and most of them don't
have a good match on the canvas side. Fonts are also not properly
supported yet. A sans serif font will be used on the client for
everything and the metrics between the client and server will diverge
and cause drawing artifacts.

Usage:

* Run an application with a target screen to create the desktop:

	TARGET_SCREEN=5001 Terminal

* Use a websocket proxy to expose the port via websockets:

	websockify.py 5000 localhost:5001

* Open HaikuRemoteDesktop.html in a browser and connect.

To get the full desktop experience you may want to run Tracker and
Deskbar inside the virtual desktop. As they are both single launch
and controlled by the launch_daemon, you have to stop them via:

	launch_roster stop x-vnd.be-trak
	launch_roster stop x-vnd.be-tskb

And then start them manually from within the virtual desktop:

	/system/Tracker &
	/system/Deskbar &
hrev51590
2017-11-21 22:18:17 +01:00
Michael Lotz
778469156a RemoteHWInterface: Add mechanism to retrieve the system palette.
This isn't used by the Haiku client as the palette is hardcoded.
2017-11-21 22:18:17 +01:00
Michael Lotz
4d9d6d7ee3 RemoteMessage: Guard against NULL source/target.
To make it more obvious in case it is ever used the wrong way.
2017-11-21 22:18:17 +01:00
Michael Lotz
703667a98d RemoteEventStream: Guard against unreasonably large input. 2017-11-21 22:18:17 +01:00
Michael Lotz
60882f20e1 RemoteDrawingEngine: Reduce RP_READ_BITMAP result timeout. 2017-11-21 22:18:17 +01:00
Michael Lotz
0863572d73 RemoteDrawingEngine: Whitespace cleanup and a simplification. 2017-11-21 22:18:17 +01:00
Michael Lotz
46f8876d27 RemoteMessage: Make some message parts fixed size.
So they don't differ across architectures.
2017-11-21 22:18:17 +01:00
Michael Lotz
ebf043b962 RemoteHWInterface: Fix 64 bit build with tracing enabled. 2017-11-21 22:18:17 +01:00
Michael Lotz
82873c6ece RemoteHWInterface: Fix lost drag bitmap on cursor change.
The drag bitmap was lost because the original, uncombined, cursor was
sent on cursor change.
2017-11-21 22:18:17 +01:00
Michael Lotz
4d9e21b824 Remote{Message|DrawingEngine}: Add some more debug output. 2017-11-21 22:18:17 +01:00
Michael Lotz
5fb27ee2c4 RemoteDrawingEngine: Implement StringWidth.
It doesn't actually seem to be called though.
2017-11-21 22:18:17 +01:00
Michael Lotz
df55bcf5a0 RemoteDrawingEngine: Fix position of gradient in FillShape.
It wasn't added at the end.
2017-11-21 22:18:17 +01:00