* check if locking the offscreen window succeeds before calling delete on it
* don't return offscreen windows in CountWindows and WindowAt (works now as on R5)
fixes ticket 1522, 1591, 1946, 2318 and propably more
While creating an BBitmap in BApplication the bitmaps window looper would
be added to the applications gLooperList, thus calling Quit() on that window
and later delete on a stale window pointer in BBitmaps dtor. The Lock() check
would fix the problem, but tests on R5 have shown that BApplication hides the
offscreen window in CountWindows() and WindowAt().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28236 a95241bf-73f2-0310-859d-f6bbb57e9c96
makes sure that the best match just stays selected instead of always selecting
the topmost pose.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28234 a95241bf-73f2-0310-859d-f6bbb57e9c96
was at least one character matching at the start of any file it would have
gotten a score >= 1. This rendered the substring matching completely useless
as soon as this happened, because it would always get a score < 1 depending on
the position of the occurance. Now substring matching is the first (and without
word mode, the only) score to get. Since the score depends on the position of
the match, this doesn't change anything for exact matches at the beginning, but
it does allow for substring matches even if there is a file starting with the
same letter as the search string. Also use strcasestr() instead of strstr() to
make the search case insensitive.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28233 a95241bf-73f2-0310-859d-f6bbb57e9c96
delete. Therefore the constructor/destructor of the contained EntryCache is also
called. The manual call of the destructor to the OpenHashTable inside the
EntryCache was therefore superflous and the destructor would be called twice,
leading to bug #2869.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28232 a95241bf-73f2-0310-859d-f6bbb57e9c96
would scroll to (0, 0), and screw the now always-in-sync fViewState.
After testing every possible mode transition, there seem to be no side
effect as the comment would suggest. Stippi, do you remember why it
was necessary? See r18699.
* This enabled me to do my previously added TODO's.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28231 a95241bf-73f2-0310-859d-f6bbb57e9c96
that solves most app_server locking headaches: it now works asynchronously,
and therefore doesn't need to lock the EventDispatcher anymore.
* EventStreams now allow to inject messages into the stream to allow the above
functionality.
* InputServerStream::GetNextEvent() no longer returns when there is no event.
* Desktop::ActivateWindow() now locks all windows before checking the
workspaces of the windows, fixing a race condition that could lead to
Window::Foremost() being called for a window that isn't on the current
workspace, leading to a crash.
* I currently cannot access Trac, but I recall there should be an open bug
report about this.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28224 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Introduced flag "invoke_scheduler" in the per CPU structure. It is
evaluated in hardware_interrupt() (x86 only ATM).
* Introduced SMP_MSG_RESCHEDULE_IF_IDLE message, which enters the
scheduler when the CPU currently runs an idle thread.
* Don't do dprintf() "CPU x halted!" when handling a SMP_MSG_CPU_HALT
ICI message. It uses nested spinlocks and could thus potentially
deadlock itself (acquire_spinlock() processes ICI messages, so it
could already hold one of the locks). This is a pretty likely scenario
on machines with more than two CPUs, but is also possible when the
panic()ing thread holds the threads spinlock. Probably fixes#2572.
* Reworked the way the kernel debugger is entered and added a "cpu"
command that allows switching the CPU once in KDL. It is thus possible
to get a stack trace of the thread not on the panic()ing CPU.
* When a thread is added to the run queue, we do now check, if another
CPU is idle and ask it to reschedule, if it is. Before this change, the
CPU was continuing to idle until the quantum of the idle thread
expired. Speeds up the libbe.so build about 8% on my machine (haven't
tested the full Haiku image build yet).
* When spinlock debugging is enabled (DEBUG_SPINLOCKS) we also record
the spinlock acquirer on non-smp machines. Added "spinlock" debugger
command to get the info.
* Added debugger commands "ici" and "ici_message", printing info on
pending ICI message respectively on a given one.
* Process not only a single ICI message in acquire_spinlock() and other
places, but all pending ones.
* Also process ICI messages when waiting for a free one -- avoids a
potential deadlock.
* Mask out non-existing CPUs in send_multicast_ici(). panic() instead of
just returning when there's no target CPU left.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28223 a95241bf-73f2-0310-859d-f6bbb57e9c96
* "iospace p" should only print the entries for actually existing
memory.
* Fixed output of "iospace v".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28222 a95241bf-73f2-0310-859d-f6bbb57e9c96
{memset,memcpy_to}_physical() functions.
Mapping lots of physical pages at once as done before was an actual
problem on systems with enough RAM, as the physical page mapper can map
only 64 chunks at a time. So multiple threads could play dining
philosophers, each getting only one of two chopsticks, waiting for
another one to be freed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28220 a95241bf-73f2-0310-859d-f6bbb57e9c96
the free queue.
* "thread" also prints the thread's I/O priority.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28218 a95241bf-73f2-0310-859d-f6bbb57e9c96
Desktop::ActivateWindow(), or Desktop::SendWindowBehind().
* This fixes a potential deadlock.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28217 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Made the StressTest app into a real stress test for the app_server, as the
windows are now randomly changed, ie. moved, resized, hidden, activated, ...
* This already helped identifying two long-hiding bugs in the app_server code!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28216 a95241bf-73f2-0310-859d-f6bbb57e9c96
DoublyLinkedListLinkImpl, and fs_mount now uses a DoublyLinkedList instead
of a typeless struct list.
* Also added a constructor/destructor to fs_mount which simplifies and cleans
some code.
* This should not contain any functional changes :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28215 a95241bf-73f2-0310-859d-f6bbb57e9c96
* The parent entry ("..") of a directory was not removed from the cache when its
directory was removed.
* When moving a directory to a new parent, it's cached parent entry wasn't
updated.
Those would lead to stale cache entries for directory parents. If a certain inode
would be reused to create a new directory after removing another, this would lead
to an invalid inode being returned when looking up the parent of the new
directory. This was easily reproducible by unzipping some directory structure,
deleting it and unzipping it again. You would end up with many "inode already
deleted" messages.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28214 a95241bf-73f2-0310-859d-f6bbb57e9c96
deleted inode (which might always happen when accessing an inode by ID),
for example by using the BDirectory(node_ref&) constructor.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28213 a95241bf-73f2-0310-859d-f6bbb57e9c96
* This has the advantage that we no longer need to call get_vnode(), and
instead can use lookup_vnode().
* This means at least most of the "corrupted BFS inode" messages should be
gone; they were produced when fs_sync() tried to get already deleted vnodes.
This was actually harmless, but doesn't really help in trusting your system :-)
* Also, it no longer tries to write back removed vnodes.
* And finally, it now uses a marker vnode when iterating over the list, so
that it doesn't need to break out of the loop anymore, and can always sync
all willing vnodes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28212 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Refactored a User Guide style documentation from the previous Welcome
documentation. The Welcome documentation links to the User Guide, the
biggest difference is that there is now a separate contents page.
* Improvements to the text.
* Added Tracker-Add-ons page.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28211 a95241bf-73f2-0310-859d-f6bbb57e9c96
The method was called after _sending_ all the messages, not after receiving
them all. This fixes the scroll validity check in AddPosesCompleted in list
mode (bug mentioned in my last commit).
We can now close#2441, tracker windows should now be completely persistant
with regard to scrolling now, in all modes (spatial mode, single window
mode in list or icon mode). \o/
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28210 a95241bf-73f2-0310-859d-f6bbb57e9c96
used that handles NULL returns and doesn't expect an exception. This fixes that
certain constructors would still be called even if the allocation failed in low
memory situations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28208 a95241bf-73f2-0310-859d-f6bbb57e9c96
As a consequence this setting was lost unless another setting was also altered
that affected the workspace configuration in some way.
Fixes#2849.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28206 a95241bf-73f2-0310-859d-f6bbb57e9c96
list mode) or switching dir in single window navigation. Fixes the other half of the problem in #2441. Left some
todos.
I discovered an other bug that can add a random offset after finishing adding poses.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28205 a95241bf-73f2-0310-859d-f6bbb57e9c96
set to its current position if that is the only workspace it's in.
* This fixes missing windows on other workspaces in the Workspaces app after
boot, ie. before you had visited that workspace.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28204 a95241bf-73f2-0310-859d-f6bbb57e9c96
selected item which does not make much sense. Disabled the checkmark.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28201 a95241bf-73f2-0310-859d-f6bbb57e9c96
the interrupt handler. There can be more than one interrupt handler installed
on the same interrupt number with different data, so we also need the data
pointer when removing the handler (to remove the right one). But since ACPI
doesn't supply it to us, we have to do the mapping ourselfs. Fixes#2848.
* Renamed acpi_root to sACPIRoot.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28200 a95241bf-73f2-0310-859d-f6bbb57e9c96
interrupts (UHCI/EHCI not working).
* Add missing line break in debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28199 a95241bf-73f2-0310-859d-f6bbb57e9c96
pages have to be written and how tight the memory situation is.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28198 a95241bf-73f2-0310-859d-f6bbb57e9c96
interrupted, another thread closing the other end of the pipe could
invoke thread_unblock() while the first thread already entered
mutex_lock(). This would make the first thread think it successfully
locked the mutex, without removing its (on-stack) wait entry from the
mutex queue, thus leading to crashes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28195 a95241bf-73f2-0310-859d-f6bbb57e9c96
* fixed LineHeight() for the case when the textview does not yet contain
anything - instead of returning 0 we now return the lineheight of the
default style (or the textview's font).
Fixes#2231
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28194 a95241bf-73f2-0310-859d-f6bbb57e9c96
Make sure you rm generated/downloads/NetSurf.zip to get the new replicable one.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28190 a95241bf-73f2-0310-859d-f6bbb57e9c96
boot, but it's not needed there either.
* Return 1 for the thread id when ACPI asks and we are thread 0 (early boot),
because it treats 0 as an error.
* Switch over logic when installing/removing interrupt handle to panic when
installing the interrupt handler if the data supplied is non-NULL. In case it
is NULL we're fine because we can remove it again without knowing the data.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28188 a95241bf-73f2-0310-859d-f6bbb57e9c96