Commit Graph

17515 Commits

Author SHA1 Message Date
Michael Lotz
c3157a2749 Created a compatibility header for the USB Stack so that it can be compiled on BeOS too. How to do this correctly? I don't think that this stuff should go to HaikuBuildCompatibility.h as it's kernel stuff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-19 13:18:03 +00:00
Stefano Ceccherini
27f1bc8217 Don't activate the window, because it will steal the focus from the current active window, and clicking elsewhere won't close the menu
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 10:26:29 +00:00
Stefano Ceccherini
152808170e Reverted the previous change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 10:18:10 +00:00
Stephan Aßmus
a3b31b17d2 added versions of the logos on transparent background, clipped to
have no unnecessary pixels around the logo


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 09:54:11 +00:00
Stefano Ceccherini
08c1246909 In case of error, errno should be set to a positive value. Yeah, I know,
it's sick.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 09:40:12 +00:00
Stefano Ceccherini
c941d45cd5 oldSet shouldn't be changed in case of error. Thanks axel for noticing
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 09:37:32 +00:00
Stefano Ceccherini
0ce93ee730 the signal block mask is inherited by the child process on fork()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 08:26:37 +00:00
Stefano Ceccherini
a5a36fe421 the second parameter of sigprocmask() can be NULL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 08:00:07 +00:00
Stefano Ceccherini
8cf2c839c5 more fork() tests. Some pass, some fail
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 07:24:36 +00:00
Axel Dörfler
79dd3d935a * The parent/group dead semaphores are now released a bit earlier to make
wait_for_child() hanging less probable - there is a general problem with
  this code, though, as we need to have a dedicated free counter for the
  semaphore to remove all race conditions.
* Also, test fork_3-1 still sometimes fails because the thread is still
  available to the public for a short time, even after its death entry
  has been collected.
* Added a TODO in the code for these issues.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18529 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 21:45:37 +00:00
Axel Dörfler
73a56f1bac * wait_for_child() (the backend to waitpid()) did not work correctly in case you
wanted to wait for a specific child; it always assumed you had specified WNOHANG.
  This fixes the bug the fork_3-1 and fork_4-1 test applications reported. 3-1 still
  sometimes fails, but that's a different problem (to be solved later).
* Also, it could return B_BAD_THREAD_ID instead of the expected ECHILD (for waitpid()).
* There was a race condition between testing for a thread, and checking its death
  entry.
* wait_for_child() can now be interrupted in case it has to wait.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18528 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 21:40:55 +00:00
Axel Dörfler
d024bdc9e6 kill() is supposed to return ESRCH instead of B_BAD_THREAD_ID.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 19:59:44 +00:00
Axel Dörfler
3b46e73c2b Replaced DOS newlines with "real" ones :-)
This lets the files compile again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 18:16:23 +00:00
Stefano Ceccherini
278510fe87 added two tests for fork(). Both fail on waitpid().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 15:20:47 +00:00
Jérôme Duval
e18b600868 posix headers not needed anymore
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 14:27:15 +00:00
Jérôme Duval
cb57453f51 fix the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18523 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 13:22:36 +00:00
Jérôme Duval
25160e5093 restored sys/ioccom.h in headers/compatibility/bsd/
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18522 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 12:58:01 +00:00
Jérôme Duval
44d5675324 KernelAddon and KernelStaticLibrary don't include kernel, kernel arch, boot platform headers anymore.
Fixed the build of most of targets using these rules. Though the build can be still broken, feel free to fix.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 12:18:11 +00:00
Stefano Ceccherini
83333816a2 adding back Terminal.cpp as it's obviously needed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 08:41:53 +00:00
Stefano Ceccherini
16f6901c0b Removed old and unused files
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18519 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 08:08:49 +00:00
Stefano Ceccherini
6636dcac56 BTextView::DrawLines() was drawing some text over some already existing one. Fixes bug 738 (and also the weird text redrawing in Terminal and StyledEdit)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 08:00:27 +00:00
Stefano Ceccherini
4e338ac6df Started implementing menu keyboard navigation. Does only work for menubars because menu windows never get keyboard focus. Any idea how to solve this, since menu windows are B_AVOID_FOCUS both in beos and haiku?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 06:12:48 +00:00
Michael Lotz
5591ec214e Use the new usb_ioctl to get the logical device name for publishing devfs entries in usb_raw.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-16 20:10:49 +00:00
Michael Lotz
64f3c06503 Implemented a usb_ioctl to retrive the logical device name (like 0/0, 0/1/0 or 1/hub) that will be used by usb_raw to publish the according devfs entries.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-16 20:07:24 +00:00
Jérôme Duval
3bb475bdcb try at fixing bug #737
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-16 10:50:03 +00:00
Jérôme Duval
f96cab8aa3 tentative at fixing bug #733, unable to test
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18513 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-16 10:24:00 +00:00
Michael Lotz
8c76868794 Adding usb_raw driver. Written from scratch, but kept the data structures and status codes to be compatible with existing apps. Tested OK with the PTP plugin for Exposure.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-15 23:36:18 +00:00
Michael Lotz
bf9d24edd2 * Fixed memory leak of Transfers never getting deleted (intentionally until now).
* Reduced the Transfer class to a minimum and removed support for synchronous transfers. The only usage of this is in SendRequest(), which now provides a callback and QueueRequest()s it's request instead.
* Clarified semantics of SubmitTransfer(). It returns a status_t indicating wether the transfer was submitted successfully. This includes no information about the outcome. Therefore the UHCI RootHub now reports the status only through the callback and returns B_OK or B_ERROR for SubmitTransfer().
* Added comment to the Transfer class explaining who takes ownership of the Transfer in which cases.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-14 20:54:57 +00:00
Michael Lotz
49617128ca * Fixed data toggle handling. It must be taken after the transfer finished and from the last transmitted transfer descriptor (which in case of a short packet is not neccessarily the last descriptor of the chain)
* Moved convenience endpoint requests from ControlPipe to Pipe

With this change, bulk transfers are fairly stable now. See here for evidence: http://haiku.mlotz.ch/haiku-usb01.png ;). Those are pictures from my Canon Digital Ixus 750 downloaded with Exposure using the PTP plugin. I of course navigated Haiku with my USB Logitech iFeel mouse which works nice since some days.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-14 19:26:51 +00:00
Oliver Tappe
a6eda7a04f * added deletion of semaphores to close_hook() such that free_hook() is now actually
being called, resulting in the driver supporting taking interfaces down and back
  up
* some more cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-13 16:33:13 +00:00
Stephan Aßmus
2f953b71af * min/max visibility scale is now between 0 and 4
* flat icon format optimizes for grays in styles


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-13 16:06:42 +00:00
Michael Lotz
d83f3c1a45 * Fixed setting configurations (need to use the configuration_value instead of the index of course)
* Fixed reported power status of the UHCI Root Hub
* Added preservation of the SOF_MODIFY register when doing a global reset of the UHC
* Read out the actual length for outgoing transfers too
* Made actual length handling for transfers a bit safer and correct in respect to NULL packets
* Use short packet detect to handle short packets
* First step at implementing the hub interrupt

Since the devices are now configured correctly, some bulk transfers actually work. Also my hub now reports its status correctly.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-13 14:48:10 +00:00
Stefano Ceccherini
bfb0aa18d3 some adjustments at the menu width calculation. Menus are generally a bit less 'compacted' now. Might need review
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-13 06:06:00 +00:00
Stefano Ceccherini
509c95da0e Added s small workaround in BMenu::OkToProceed() to fix deskbar not opening the be menu under heavy load (or, always, under qemu) if the mouse button was released too soon. Beos seems to do something similar, although it's a hack
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-13 05:39:00 +00:00
Michael Lotz
f1020a6c49 * Changed the Stack lock to a benaphore
* Removed some debug output from UHCI
* Added some debug output to the usb module instead ;)
* Rewrote the way new devices are attached and ports are handled (now more similar to FreeBSD)
* Corrected handling of port resets so that they should work on hubs too
* Cleaned up some headers

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-12 21:07:34 +00:00
Michael Lotz
8be9a75c4e Forgot this in my last commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18497 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-12 12:50:53 +00:00
Michael Lotz
b8c6a85136 * Implemented most of the USB module public API (using opaque handles like in R5 will change that to using IDs later)
* Fixed the UHCI root hub and the hub implementation. Interface and endpoint descriptors are part of the configuration descriptor, they cannot be requested individually.
* Added simple support for interrupt and bulk transfers to UHCI. It's enough to get my USB mouse working to a stable and usable degree.
* Cleaned up and reworked some other parts, added allocation checks and such.

Yes, my internet connection is back up :)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18496 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-12 12:49:45 +00:00
Michael Lotz
852c3506f5 Check the reallocation in usb_hid. Use B_NO_MEMORY instead of B_ERROR in other checks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-12 10:14:55 +00:00
Michael Lotz
4872c00b87 Fixed usage of realloc. Fixes crashing bug of usb_hid under Haiku.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-12 09:42:50 +00:00
Axel Dörfler
95e5d8a86c * Turns out GCC 4 didn't like my latest changes in Shelf.cpp.
* Further cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 20:28:33 +00:00
Axel Dörfler
0240ccffa0 Don't use <new.h> - there is <new> for you.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 20:08:51 +00:00
Axel Dörfler
ed0d15ba46 * Use max_c() instead of max() in C++ files.
* Updated license header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 20:06:09 +00:00
Axel Dörfler
78aa8eea3d * Added get_uint32_color() again, the previous "hack" doesn't compile
on GCC 4.
* Fixed buggy scripting error responses: "error" is only included on
  error, and B_ERROR (-1) can hardly be a candidate for the
  BMessage::what field (uint32).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 20:01:26 +00:00
Axel Dörfler
01b2099116 Added __eieio() function to let etherpci build on PPC, too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 19:47:00 +00:00
Axel Dörfler
db942edbe1 * Fixed warnings when compiled with GCC 4.
* Minor cleanup on the way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18488 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 19:42:49 +00:00
Axel Dörfler
6e0e4ca6b2 * Fixed bug that let the dragger not hide in the Deskbar (was in ListManage(), now
in _AddToList()).
* Cleaned up BDragger and BShelf a bit, moved private classes into the BPrivate
  namespace, renamed private methods to have the '_' prefix.
* Rewrote Dragger.h.
* Is that static dragger list needed at all? And if so, for what?`


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 19:26:37 +00:00
Axel Dörfler
804ee69a78 * Fixed crashing bug on startup.
Andrew, TCP is actually used in the build, so please test if it crashes before
  committing.
* Fixed some minor style issues.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 17:34:57 +00:00
Axel Dörfler
e192628c47 * In case of an error, status is always -1, only errno shows the actual error.
* Added test mode for UDP broadcasting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 14:56:16 +00:00
Axel Dörfler
c6bfe05b1e Added some UDP test apps from Oliver - removed lots of warnings, and fixed one
bug in all apps: status was defined unsigned.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 14:48:24 +00:00
Axel Dörfler
93d0415885 * If a BView::SetMouseEventMask() arrived in the app_server after the mouse buttons
have already been released again, the temporary listener was still added.
  This fixes bug #727.
* No longer removes temporary listeners if there are mouse buttons left pressed; ie.
  if you press two buttons at once, the listeners are now only removed after you've
  released them both. This is not only more logical, it's also how BeOS behaves :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 14:24:42 +00:00