Commit Graph

57845 Commits

Author SHA1 Message Date
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.
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.
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.
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
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!
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%...
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.
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.
2017-11-22 16:34:11 +01:00
François Revol
f254805b43 usb_webcam: UVC: guard against NULL config or interface from USB device 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.
2017-11-22 13:54:12 +01:00
Augustin Cavalier
8742c1d044 Tracker: Remove now-unused bool displayingSymlink argument from InfoWindowRect. 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()
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.
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.
2017-11-21 23:31:44 +01:00
Michael Lotz
83241299ce Move the HTML5 remote desktop client to src/tools. 2017-11-21 22:28:07 +01:00
Michael Lotz
e30d37ddd6 RemoteHWInterface: Fix build with tracing disabled. 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 &
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
Michael Lotz
91c1d3dbb3 RemoteDesktop: Implement support for BAffineTransform.
It is currently somewhat broken client side though.
2017-11-21 22:18:17 +01:00
Michael Lotz
f7fb4538de RemoteDesktop: Create states for unknown tokens.
This allows to recover from reconnects where creation of some tokens
may have taken place before the client was fully connected.
2017-11-21 22:18:17 +01:00
Michael Lotz
f609f4fa64 RemoteHWInterface: Use screen change listener to update mode.
This allows dynamic reconfiguration of the size of the virtual desktop
to the dimensions desired by the client.
2017-11-21 22:18:17 +01:00
Michael Lotz
f3e8ed4d48 app_server: Implement screen changed hooks and notifications.
The ScreenOwner interface gets an additional ScreenChanged() hook. It
is implemented in the Desktop class to automatically set the preferred
screen mode on the changed screen.

The HWInterfaceListener, previously only used by the downstream
DrawingEngine, gets an additional ScreenChanged() hook as well to inform
an upstream client of a changed screen.

The ScreenManager ties these two mechanisms together.
2017-11-21 22:18:17 +01:00
Michael Lotz
5ed41cffff RemoteDesktop: Switch connection direction and simplify client.
Instead of the server connecting back to a listening client, make it
into a more traditional setup with the server listening on a port and
the client connecting to it.

The client can now either connect directly, unencrypted and without the
ability to trigger listening and specifying a command, or through SSH,
as before with the possibilty to run a target application and causing
the creation of the listener.

With the direction change, there's only the need for one, local, port
forward with SSH, which simplifies things.
2017-11-21 22:18:17 +01:00
Adrien Destugues
b140a1c340 NetworkAddressResolver: cache needs to be locked
It is not a good idea to have a thread get an address from the request
cache, while another thread is deleting said address as the cache has
grown too large. Add a lock around the cache access to make it safe.
2017-11-21 22:15:32 +01:00
Adrien Destugues
4c99992724 Deskbar: update time format when locale changes.
Thanks to Skipp_OSX for reminding me that B_LOCALE_CHANGED was already
handled in Deskbar.
2017-11-21 22:15:31 +01:00
François Revol
e96fd79311 ata_adapter: Remove bad casts for ram_address()
We now accept and return a phys_addr_t as we ought to.
2017-11-21 21:44:02 +01:00
François Revol
4dde854c8a silicon_image_3112: Remove bad casts for ram_address()
We now accept and return a phys_addr_t as we ought to.
2017-11-21 21:44:02 +01:00
François Revol
aef94baf32 ISA: fix ram_address() to use phys_addr_t for completeness
I don't know of any driver actually making use of it, but some weird
architecture might want to emulate an ISA bus to reuse a driver maybe...
2017-11-21 21:44:02 +01:00
François Revol
16bb99fdac PCI: fix ram_address() to use phys_addr_t
Since it handles physical address it should really be this.

It's not like many drivers actually used it anyway. It shouldn't harm
compatibility, drivers calling it with only 32bit would leave garbage in
the higher bits but since on x86 it's a noop anyway, it would end up in
the MSB register tha's ignored because it expects a 32bit result.
2017-11-21 21:44:01 +01:00
Janus
66672a5fa4 Fix broken convention 2017-11-21 21:32:21 +01:00
Kacper Kasper
2b7297f879 DeskCalc: accept file drops.
* Fixes #9283.
2017-11-21 21:15:16 +01:00
Janus
d18b272d3e [PowerStatus] The menu item quit doesn't close the Tracker
* Fixes #13790
2017-11-21 18:13:00 +01:00
Kacper Kasper
f4a1f9c06a ICNSTranslator: add missing B_TRANSLATEs. 2017-11-21 20:08:29 +01:00
Kacper Kasper
2c856023e9 DeskCalc: fix cut off buttons.
* Window frame might change based on set size limits.
  Creating view with rectangle used to create the window causes it
  to anchor outside the window.
  To address that pass current frame rectangle to the view.
* Fixes #13167.
2017-11-21 20:08:29 +01:00
Adrien Destugues
6663167b59 pkgman: improve progress bar
- Do not update more than twice a second
- Do not use tabs, so we can reliably compute the string width
- Cleanup and tweak other parts of the code

There is still a glitch when resizing Terminal, but it isn't as bad as
before. Ideally, using the SIGWINCH signal would solve that, but it is
sent to the app only when you release the mouse after a release
operation, so in our case, it is already too late.
2017-11-21 18:24:44 +01:00
Adrien Destugues
feabff3ebb TeamMonitor: redo layout
Add several sizing constraints to avoid the window becoming too small.

Fixes #7560.
2017-11-21 16:16:12 +01:00
Augustin Cavalier
3b3688c7a5 fs_shell: Change {set_}real_time_clock to match the new definitions. 2017-11-21 15:18:11 +01:00