summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* app_server: Remove stubbed HTML5 HWInterface.hrev51593Michael Lotz3 days28-4773/+2
| | | | | | It was mostly a renamed copy of the remote HWInterface with beginnings of a webserver and client. It never became actually functional.
* Move the HTML5 remote desktop client to src/tools.hrev51592Michael Lotz3 days2-0/+0
|
* RemoteHWInterface: Fix build with tracing disabled.hrev51591Michael Lotz3 days1-0/+1
|
* Add a HTML5 client for the remote desktop protocol.hrev51590Michael Lotz3 days2-0/+2317
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 &
* RemoteHWInterface: Add mechanism to retrieve the system palette.Michael Lotz3 days2-0/+23
| | | | This isn't used by the Haiku client as the palette is hardcoded.
* RemoteMessage: Guard against NULL source/target.Michael Lotz3 days2-2/+5
| | | | To make it more obvious in case it is ever used the wrong way.
* RemoteEventStream: Guard against unreasonably large input.Michael Lotz3 days1-0/+3
|
* RemoteDrawingEngine: Reduce RP_READ_BITMAP result timeout.Michael Lotz3 days1-1/+1
|
* RemoteDrawingEngine: Whitespace cleanup and a simplification.Michael Lotz3 days2-7/+6
|
* RemoteMessage: Make some message parts fixed size.Michael Lotz3 days2-4/+4
| | | | So they don't differ across architectures.
* RemoteHWInterface: Fix 64 bit build with tracing enabled.Michael Lotz3 days1-3/+4
|
* RemoteHWInterface: Fix lost drag bitmap on cursor change.Michael Lotz3 days1-1/+1
| | | | | The drag bitmap was lost because the original, uncombined, cursor was sent on cursor change.
* Remote{Message|DrawingEngine}: Add some more debug output.Michael Lotz3 days2-8/+51
|
* RemoteDrawingEngine: Implement StringWidth.Michael Lotz3 days1-1/+29
| | | | It doesn't actually seem to be called though.
* RemoteDrawingEngine: Fix position of gradient in FillShape.Michael Lotz3 days1-1/+1
| | | | It wasn't added at the end.
* RemoteDesktop: Implement support for BAffineTransform.Michael Lotz3 days5-0/+71
| | | | It is currently somewhat broken client side though.
* RemoteDesktop: Create states for unknown tokens.Michael Lotz3 days2-6/+11
| | | | | This allows to recover from reconnects where creation of some tokens may have taken place before the client was fully connected.
* RemoteHWInterface: Use screen change listener to update mode.Michael Lotz3 days2-15/+54
| | | | | This allows dynamic reconfiguration of the size of the virtual desktop to the dimensions desired by the client.
* app_server: Implement screen changed hooks and notifications.Michael Lotz3 days6-5/+94
| | | | | | | | | | | | 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.
* RemoteDesktop: Switch connection direction and simplify client.Michael Lotz3 days13-236/+294
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.
* package_repo: Fix update command when used with relative target.hrev51522Michael Lotz2017-11-051-2/+5
Renaming of the temporary repo file failed when used with a relative target path. The path was appended twice in such a case. Also when used with a specified base directory, the relative temporary repo file wasn't reachable from the changed working directory. To fix both cases, create the BEntry pointing at the temporary repo file before changing the directory and rename it using only the target leaf name.
* kernel: Fix NULL dereference in ThreadTimeUserTimer::Schedule().hrev50759Michael Lotz2016-12-121-1/+1
The SpinLocker was always initialized to fThread->time_lock even though fThread may be NULL. This looks like a simple oversight as the rest of the method handles fThread being NULL and the team variants of these timers have very similar logic and do the NULL check as well. This fixes the last remaining KDL in the posixtestsuite.
* FreeBSD compat: Align allocations according to FreeBSD man page.hrev50755Michael Lotz2016-12-111-1/+8
According to the FreeBSD kernel malloc man page the allocator is expected to return power of two aligned addresses for allocations up to one page size. While it also states that this shouldn't be relied upon, at least our (directly copied) bus_dmamem_alloc expects it and drivers may depend on it as well. Looking through the FreeBSD commit logs, this expectation seems to be rooted quite deeply. This fixes watchdog timeouts in the ipro1000 driver under KVM and may help with #11953. It might also be related to #9099 and #9601 as those seem memory allocation related as well.
* ioapic: Fix 64 bit build with tracing enabled, some cleanup.hrev50147Michael Lotz2016-03-121-15/+17
| | | | | | | * Use print format macros to fix the 64 bit build. * Correct a typo in the shift of the trigger mode definition. As the value is 0 either way, this does not make a functional difference. * Use macros instead of values in comparisons.
* usb_ecm: Use the current configuration instead of a fixed one.hrev50146Michael Lotz2016-03-121-5/+5
| | | | | | This allows usb_ecm to work in case it is part of a device using different configurations for different types of interfaces and ECM is not the first configuration.
* USB: Force spec mandated control pipe max packet sizes.Michael Lotz2016-03-122-0/+37
| | | | | | | | | | While the USB descriptors are specifically built in such a way that it's always possible to correctly query the max packet size, some devices unfortunatley use bogus values in their descriptors and rely on the stack to use the mandated values. This fixes USB devices in VirtualBox when EHCI emulation is used. This really is a bug in their descriptor emulation though.
* EHCI: Current qtd field in qh overlay has no terminate bit.Michael Lotz2016-03-121-3/+2
| | | | | | Don't initialize the current qtd field with the terminate bit as it does not exist in this field. While the lower 5 bits are documented as being ignored anyway, this is more correct. Should cause no functional change.
* EHCI: Fix alignment check, the mask wasn't wide enough.Michael Lotz2016-03-121-1/+1
| | | | | As this is only an assert that shouldn't ever be triggered, this doesn't change anything in normal operation.
* EHCI: Style cleanup only, no functional change.Michael Lotz2016-03-121-32/+31
Change < B_OK to != B_OK for status_t results and to < 0 for ids.
* runtime_loader: Resync heap impl with the one of the bootloader.hrev49944Michael Lotz2015-12-271-209/+277
| | | | | | | | | | | | | | | | | | The heap implementation of the runtime_loader was switched to the one of the bootloader in 6f0994d but was since updated independently. To keep the diff between the two implementations as small as possible, the bootloader implementation was first copied to the runtime_loader and then some features not relevant in the runtime_loader (like the special large allocation handling) have been removed and the runtime_loader specific features (grow_heap, add_area) have been reintegrated. But basically this applies 96689a5..HEAD of src/system/boot/loader/heap.cpp to the runtime_loader heap. This brings in the switch from a linked list to a splay tree based free chunk management. Since the allocation counts in the runtime_loader are rather small, this does not perceptibly affect performance in either direction though.
* runtime_loader: Fix endless rld heap grow loop in edge case.Michael Lotz2015-12-271-1/+1
The needed storage space for tracking the allocation size was not accounted for when growing the heap. Since the growth size is always rounded up to a multiple of 32KiB, this did almost never matter as the new allocation wouldn't need the full size. If the allocation did happen to need the full size however, the newly added area would always be too small. As the allocation attempt was simply restarted after each successful growth, this lead to an endless loop creating small new areas, which would then quickly starve the system for memory.
* BPathMonitor: Fix locking order reversal introduced in 8599f4b.hrev49798Michael Lotz2015-11-091-22/+8
The sLocker was used as an outer lock with the sLooper locked within. The sLocker therefore can't be used within MessageReceived() as that could lead to deadlocks due to reversal of the locking order. Instead of two locks, just use locking the looper for all serialization. While this has a higher overhead to using a BLocker (due to the looper list locking and lookups) this shouldn't be too problematic.
* vfs: Cleanup: Move functions around for more logical grouping.hrev49787Michael Lotz2015-11-081-93/+93
| | | | | Move static internal functions out of the API functions block and drop their vfs_ prefix and move an API function into the API functions block.
* kernel: Use anonymous namespaces to avoid type collisions.Michael Lotz2015-11-0815-81/+154
The anonymous namespace makes type definitions local to the translation unit (like static does for objects). For pretty much any type not shared across multiple files this is what one wants to happen (and might erroneously expect to happen automatically). This commit solves some actual collisions that were present: * The VFS and the rootfs both used an incompatible VnodeHash struct for their BOpenHashTable. * XSI semaphores and message queues both used queued_thread, Ipc and IpcHashTableDefinition. For release builds these did not cause problems as the types were fully inlined. Debug builds would crash at boot however because parts of a BOpenHashTable<VnodeHash> from the rootfs meant to operate on struct rootfs_vnode would be applied to one from the VFS expecting struct vnode. As such collisions are violations of the one definition rule, the code is at fault and unfortunatley the compiler isn't required to diagnose such problems across translation units (which isn't actually trivial). This can lead to subtle and hard to debug problems and it's therefore best to avoid leaking types into the global namespace whenever possible.
* BPathMonitor: Remove unused headers, some whitespace cleanup.hrev49756Michael Lotz2015-11-071-7/+3
|
* BPathMonitor: Lock on incoming node monitor messages.Michael Lotz2015-11-071-0/+1
The lock was only acquired when paths to watch were added or removed, protecting the data structures against concurrent modification due to addition/removal of entries by the API user. Locking is also required for node monitor messages since these can trigger the data structures to be modified (due to recursive watching and new directories becoming available or due to resyncing of modified ancestor chains). Previously it was possible to corrupt the data structures when node monitor messages were received while still starting to watch a directory structure. This was especially likely in the case of watching devfs directories, as accessing these can trigger device scanning which in turn could possibly add new device entries. Either the path monitor looper or the API user would then trip over the corrupted data structures. Probably fixes #11280. Although I was only able to reproduce crashes on the API side, corruption of the hash tables and corresponding endless loops are quite plausible. Possibly also fixes #12412 if the input_server was in the process of starting to watch entries. It's hard to tell due to the lack of a back trace but would fit the crashes I was able to reproduce with a synthetic test case.
* BLocker: Make misuse warning more useful.hrev49751Michael Lotz2015-11-031-3/+7
| | | | | | | | Also print the locker sem (for manual name lookup) and the involved threads. It was also missing the line terminator which messed up the following output. Also fix a typo in a comment.
* BLocker: Fix recursive count for "unusual" use cases.Michael Lotz2015-11-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Since a BLocker can be unlocked from other threads than the one holding the lock, it can also be further unlocked even when already unlocked. This caused the recursive count to become negative. The first lock then needs to reinitialize the count to 1 for the lock balance to work again. Just incrementing the negative recursive count lead to it never counting back down from one to zero in the unlock case, which made the BLocker impossible to unlock. This makes the Haiku BLocker behave exactly like the BeOS one, including the negative recursive count and reinitialization, as evidenced by its debugging features showing the internal counts. Alternatively to reinitializing the recursive count it could be prevented from going below zero in the first place, but I don't see why we should deviate from BeOS there while allowing its awkward unlock behaviour. This makes some more exotic use cases work like the BGLView <-> SDL combination that previously would always just hang. While these abuses should be reviewed/corrected, just hanging the BLocker doesn't seem useful.
* listsem: Clean up format strings to use format macros.Michael Lotz2015-11-031-5/+8
Fixes printing values on x86_64.
* Update fifechan package to include non 32 bit screen mode fixes.hrev49741Michael Lotz2015-10-312-4/+4
* Update libsdl packages to include 24 bit screen mode fixes.hrev49730Michael Lotz2015-10-273-8/+9
* Add package for Unknown Horizons and dependencies for x86[_64].hrev49721Michael Lotz2015-10-252-0/+33
While the game is pure python and packaged for any architecture, the engine (FIFE) is C++ with python binding via swig, making the game only installable on x86 and x86_64. We'd need to provide a python_x86 to support secondary architecture python modules.
* Add sdl_{gfx|image|mixer|net|sound|ttf}, dependencies for x86.hrev49711Michael Lotz2015-10-191-0/+33
|
* Add boost packages for x86.hrev49710Michael Lotz2015-10-191-0/+25
* BPicture: Fix archive constructor on 64 bit.hrev49621Michael Lotz2015-09-051-13/+10
| | | | | | | | The int32 was cast to a ssize_t which has a different size on 64 bit, therefore clobbering the stack. Also remove the use of basic type references in arguments, which probably was the reason for doing the above in the first place.
* Various whitespace cleanup only.hrev49620Michael Lotz2015-09-055-23/+23
|
* BPicture: Fix archive constructor.Michael Lotz2015-09-051-1/+1
| | | | | | | | | | | The cleanup commit df48d3f9a839a18e16b3d7036935bef621b4fbb6 broke constructing a BPicture from an archive due to an incomplete rename. The passed in BMessage was used as the data buffer instead of the extracted data field. Fixes the application side crash of #12340. Seeing how long this was broken without anyone noticing, the feature doesn't seem to be very popular.
* app_server: Port ServerPicture to the new PicturePlayer API.Michael Lotz2015-09-051-248/+177
| | | | | | This allows for bounds checks on strings and bitmap data to avoid crashing due to corrupted user data. It also avoids copying the data where possible.
* PicturePlayer: Rework to be more safe against corrupted data.Michael Lotz2015-09-052-247/+949
This introduces a more sane API (currently private) that allows for safer and possibly more efficient implementations: * It uses a struct of named and typed function pointers instead of just a void pointer array. This adds type safety to the callbacks so the compiler can figure out if things match up before subtle bugs get introduced. * It provides bounds for all strings/buffers passed to the callbacks. * It uses const references instead of implicitly copying arguments. * It folds stroke_x/fill_x pairs into draw_x functions with a fill argument to reduce the amount of functions needed. * It uses unsigned values where negative values make no sense. The old API has been implemented on top of the new one using adapter functions. It makes copies of all data passed to the callbacks which effectively keeps the picture data from being modified. This matches with the R5 behaviour. This also reimplements the buffer parsing to be safe against corrupted data by validating that the types actually fit in the provided sizes and buffers (using a templated reader). Since this class is used from the app_server with user provided data, making it more safe is important even though it comes with a slight overhead (replicating R5 behaviour, i.e. crashing the app_server when corrupted data is fed, doesn't seem very appropriate here).
* Update haikuwebkit packages to 1.4.12 on x86[_(gcc2|64)].hrev49606Michael Lotz2015-08-303-6/+6