* Add new WorkStatusView which keeps the user informed about what's
happening. It's a status bar at the bottom of the window which
shows on the left side either a spinning barber pole (for
operations without a progress), or a progress bar (for download
progress). Next to that is a text view showing a descriptive
status text.
* Currently, it will notify of the following operations:
- Repository refresh (barber pole)
- Background packet actions, like preparation of install or uninstall
(barber pole)
- Package downloads, including downloads of dependencies (progress
bar). Status text indicates the name of the package currently
being downloaded (if any), and how many more packages are queued
for download after it (if any).
* Hooks into PackageListView to be notified of package status changes
(such as becoming pending or download progress)
* When the package currently being downloaded is also selected in the
list view, the user sees the progress bar in WorkStatusView
as well as the one in the PackageInfoView, which is redundant. This
still needs a good solution...
* Add a new event "ConfirmedChanges" to PackageProgressListener. It
triggers when a package action was confirmed by the user and is
about to be run. This can be used to e.g. get a full list of
packages about to be installed (i.e. including dependencies)
right before the process of fetching/installing them is started.
* Add a handler for it which looks at PackagesToActivate and sets
all their PackageInfo states to pending (so now, when installing
a package, its dependencies immediately become pending as well).
* When a view is used with the layout system, its initial frame rect
was set to (0, 0, 0, 0), which is a BRect covering 1 pixel in the
top left corner of the window.
Since this a valid rect, it can cause "badly behaved" views to
trigger redraws of themselves and other views during the layout
process, which is ultimately the reason for the HaikuDepot UI
freezing while populating with packages.
The misbehaving view in this case is BTextView. When in read-only
mode, since commit e27a53b2, its GetHeightForWidth() implementation
causes the view to resize (really resizing, not just simulating a
resize) and thus it invalidates itself. This is broken behaviour,
and needs to be fixed in BTextView. Since GetHeightForWidth() is
called during the layout process, all the not-yet-layouted views
have a frame of (0, 0, 0, 0). The invalidation of just the one
BTextView in the layout then hits *all* new views that are being
layouted (because they all occupy the same one pixel in the
corner), and they all get redrawn.
Many view Draw() implementations ignore the update rect, so work
is being done. And even if not, this can cause a lot of traffic
on the app_server link. In a test case with HaikuDepot's
FeaturedPackagesView, adding 300 rows (each containing a BTextView,
among other views) in quick succession caused over 6 million
commands to travel over the app_server link, completely freezing
the UI for a long time.
* The actual problem here is in BTextView::GetHeightForWidth() and
must be fixed there.
However we also put in an extra-fix here because it never makes
sense anyway to try and draw a view that has not yet been layouted.
So we set the initial BView frame to an invalid rect
(0, 0, -1, -1), which will suppress any actual updating, even
when the view actively invalidates itself, as long it doesn't
have a size yet. (The dirty region will always end up empty
then).
* Fixes HaikuDepot UI freezing during package population (caused by
above described behaviour from BTextViews in FeaturedPackagesView).
Might improve performance in other applications using BTextView
with layouting as well.
* Fix use-after-free in the auto-generated JSON listener code (was
calling method of instance after 'delete this')
Will also submit a patch for the code generation script in the
haikudepotserver repo so it won't get lost -- this is just a
temporary fix-up until then.
* Fixes some random occasional crashes
* BarberPole view for indicating that the application is busy while
the amount of work is not known
* Flat looks with scrolling color stripes. Number of stripes and their
colors are freely configurable, so you could add a whole rainbow of
colors to endlessly scroll through if you like.
* 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.
* 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
* 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)
* 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.
because the bound scrolls to the current cursor to view the text (ScrollToOffset).
Follow up #12608
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
* Actually set status before testing it
* sscanf (reads from passed buffer) not scanf (reads from stdin)
* &httpStatus not httpStatus.
Found by Coverity.
* the CDCE configuration happens to not be the first: iterate the configurations.
* we set the alternate control interface
* queue interrupt requests once opened.
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.
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.
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.
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
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!
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%...
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.
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.
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.
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.
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 &