* When the device watcher/control thread encounteres an error when
read()ing or ioctl()ing the device, don't just quit the thread and
leave a stale device add-on hanging there, but instead trigger
_RemoveDevice() to exit this cleanly. This also takes care of calling
_RemoveDevice() only from one thread. However, it adds a race condition
should a mouse or keyboard be unplugged and plugged at the same time.
I need to think about how to fix that cleanly, although the situation
may be theoretical only... This fix seems to fix another problem with
hot-plugging USB mice, before this change, the first mouse entry in
/dev/input/mouse/usb/ was never gone and I got two entries after unplugging
and replugging.
* When using BObjectList configured to own the entries - don't delete the
entries! Also don't call RemoveItem() before still using the item. Took
me all day to find this one, because the code looked so... correct. :-}
* In _AddDevice() call _RemoveDevice() just for the sake of it. It is really
important that no device with the same name is published twice. The PS/2
driver behaves strange in that it publishes device more than once, if
I understand correctly, until it decides that there is no device.
* Only StartMonitoringDevice() /after/ having performed the initial device
scan! Or else we may get ourselves confused. I don't know if this was
an actual problem, but the code was like that before and it seems saner
to me. Seeing there is no locking in the device add-on itself, we may
already enter the code from the node monitor thread.
This should fix#2894.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28321 a95241bf-73f2-0310-859d-f6bbb57e9c96
device path, but instead pointing to memory owned by some device addon
instance.
* Added TODO in the AddOnManager init code about a possible race condition
which I have not varified yet.
* Check the return code of BList::RemoveItem() before deleting the item...
pure defensive programming.
* For the time being, print a warning into the syslog when a device name is
registered twice.
* When failing to Unflatten() an event, don't continue in the code after
deleting it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28319 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Use new(nothrow) to allocate the MethodReplicant.
* fSignature needs to be free()d, not deleted.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28318 a95241bf-73f2-0310-859d-f6bbb57e9c96
weird.
* Set fHandler to NULL in _UnregisterAddOns(), just in case it is called
twice (which it probably never is... but be defensive).
* If a B_NODE_MONITOR message does not contain all the necessary fields,
drop into the debugger when compiling in DEBUG mode.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28317 a95241bf-73f2-0310-859d-f6bbb57e9c96
devices that were removed. Should use the BPathMonitor anyways...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28315 a95241bf-73f2-0310-859d-f6bbb57e9c96
rethought and reimplemented with the layout system and my keymap management patch, but
the intent was to make it more usable in the mean time.
* Don't change the focus on keydown so that we can naviguate the list with the
keyboard.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28314 a95241bf-73f2-0310-859d-f6bbb57e9c96
things could be rewritten in a cleaner way but i'd rather finish my keymap
management patch as i rewrote the preflet for it anyway. For example the '(Current)'
item shouldn't be needed anymore but is still there in case the keymap:name attribute
read fails or if the original keymap file doesn't exist anymore (for example, applying
a user keymap, quiting the preflet, deleting the keymap file, and reloading the
preflet)
* Revert/apply data wasn't correctly loaded when the first load was on a system
keymap. This would allow revert/apply right after starting the preflet. That was the
cause of #2659.
* fCurrentMapName wasn't updated after a Revert or Apply
* Select the active keymap in the lists after reverting.
Quick cosmetical fix follows.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28313 a95241bf-73f2-0310-859d-f6bbb57e9c96
bfs_inode to store the link path (up to a certain length). If this was long
enough to clobber the data_stream::size field (which luckily was the last
field of struct data_stream), Inode::Free() would mistakenly assume this to
be a valid data stream to be freed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28311 a95241bf-73f2-0310-859d-f6bbb57e9c96
feels. This caused floating/modal app and subset windows to not work anymore.
* This fixes bug #2914.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28309 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Fixed unloading the add-on image twice in error case of failing to
add the add-on info to the list.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28307 a95241bf-73f2-0310-859d-f6bbb57e9c96
the wrong Link actions were used (always the no-attributes-support ones
which remove the target first), for instance.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28304 a95241bf-73f2-0310-859d-f6bbb57e9c96
* In this case, SoundRecorder shows a different error message, more informative, confer bug #134
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28303 a95241bf-73f2-0310-859d-f6bbb57e9c96
updates during the vertical refresh, but it causes flickering again since
there is no guarantee that screen regions will stay clean from the time that
they were scheduled with the UpdateQueue until the UpdateQueue thread
transfers them. Therefor it is still disabled.
* Refactored a bit the distinction between Invalidate() and CopyToFront().
Invalidate() used to be virtual, but now CopyToFront() is. This was mainly
needed for the app_server test environment, because the host window needs
to call Invalidate() when the front buffer bitmap is clean. When the
UpdateQueue is used, this needs to be CopyToFront(). Now the separation is
cleaner in combination with the UpdateQueue.
* Fixed a problem in HWInterface::CopyToFront(): When separating the region
outside the cursor and the region with the cursor during a transfer, it
needs to hold the fFloatingOverlay lock to make sure the cursor is not
moved in the meantime. This fixes graphics glitches with remnants of the
cursor staying on screen. These could very rarely be observed, but much more
often with the accelerated double-buffer mode.
* Enabled the accelerated double buffered mode, since it works now very well.
I was able to test it with the nVidea driver on an nVideo 7300. It works by
allocating a frame buffer twice the height of the configured screen mode.
Then all drawing goes into the offscreen portion, including accelerated
driver functions. AccelerantHWInterface::_CopyToFront() then uses acceleration
to blit the clean regions in the offscreen portion of the frame buffer into
the visible part. Please tell me if there are problems, for example when
if there is too few video memory, or if a driver does not handle it correctly.
To disable it, see src/servers/app/drawing/AccelerantHWInterface.cpp line 511.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28301 a95241bf-73f2-0310-859d-f6bbb57e9c96
when the HWInterface was using acceleration and at the same time double
buffering.
* _CopyToFront() should always be used, since it calls a protected virtual that
derived classes of HWInterface depend on. This fixes some graphics glitches
in certain situations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28300 a95241bf-73f2-0310-859d-f6bbb57e9c96
fixes in my tree to make it compile on R5 still. I don't really want to
check this in, I'd rather adopt the buildsystem to make it run on Haiku
itself...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28298 a95241bf-73f2-0310-859d-f6bbb57e9c96
* vm_clone_area() does now set the B_SHARED_AREA flag on both the source
and the cloned area. This is necessary, since it would no longer be
guaranteed that areas are backed by leaf caches only (after
fork()ing), which doesn't work with our cache merging strategy.
Fixes#2605.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28296 a95241bf-73f2-0310-859d-f6bbb57e9c96
parts of the init sequence if that's not the case anyways. This correctly
initializes the engine lock and a few other things, fixing the deadlock in
ticket #2893. This also seems to result in somewhat improved graphics
performance, at least on my X800.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28295 a95241bf-73f2-0310-859d-f6bbb57e9c96
matches the program's image name. This is a special case for add-ons
that link against the application, with the application not having a
soname set. The concerned Pe add-ons (HeaderHeader and others) work now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28294 a95241bf-73f2-0310-859d-f6bbb57e9c96
This is not necessary, since userland teams' page directories also
contain the kernel mappings, and avoids unnecessary TLB flushes. To make
that possible the vm_translation_map_arch_info objects are reference
counted now.
This optimization reduces the kernel time of the Haiku build on my
machine with SMP disabled a few percent, but interestingly the total
time decreases only marginally. Haven't tested with SMP yet, but for
full impact CPU affinity would be needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28287 a95241bf-73f2-0310-859d-f6bbb57e9c96
that dprintf_no_syslog() can avoid sending something to the syslog.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28286 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added deferred_delete() that takes a DeferredDeletable and deletes it
asynchronously.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28285 a95241bf-73f2-0310-859d-f6bbb57e9c96
and throws up a BAlert if not. Reuse this when the user clicks expand to check
for and grab the destination path. This fixes the problem that if the user
manually types in or pastes a destination path and then immediately clicks
Expand, the actual destination path used is never updated. Thanks to Daniel
Teixeira for reporting.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28283 a95241bf-73f2-0310-859d-f6bbb57e9c96
workspaces between this and the previous one.
* Note that this is mapped to a specific key on the keyboard (key 17), so
it will differ with the keymap, but will usually be the key below the escape
key.
* This closes ticket #2766.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28282 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Changed the password window to use this feel.
* Later, the screen saver itself should use this feel whenever the password
mode is enabled. The password window should then use a modal-app feel, but
this doesn't work yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28281 a95241bf-73f2-0310-859d-f6bbb57e9c96
the <DROP> marker at the place data was dropped, not somewhere else. See
ticket #156; this might already fix this bug.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28278 a95241bf-73f2-0310-859d-f6bbb57e9c96
This was the cause of #2571 and duplicate #2888 although the bug wasn't
triggered anymore since r28205.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28274 a95241bf-73f2-0310-859d-f6bbb57e9c96