Commit Graph

23939 Commits

Author SHA1 Message Date
Stephan Aßmus
cda5b8808f A test I am currently working on which is supposed to behave a bit like
Firefox. It stores the active clipping region of a view when Draw() is
invoked, and uses that for asynchronous drawing. The test already shows
a couple of problems. When PushState() / PopState() is used, it is not
equivalent to ConstrainClippingRegion(&someRegion) /
ConstrainClippingRegion(NULL). Another problem shows when adding delays
(currently disabled), there should not be any difference, regardless of
how much delay is inserted into the asynchronous drawing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25150 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 10:53:23 +00:00
Stephan Aßmus
b35b070b59 A test I used for debugging Pe's scrollbar problems. (SetSteps() influences
proportion if proportion was never set.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 10:50:12 +00:00
Stephan Aßmus
d88d001f35 A test I used for checking ConstrainClippingRegion() with regards to states,
scales and origins.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 10:49:30 +00:00
Stephan Aßmus
0a6ef8179c I have no idea anymore what I was messing with here, but it looks interesting.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25147 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 10:47:55 +00:00
Stephan Aßmus
e7187dd0f0 * Removed no longer needed work around when Showing buttons.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 10:01:29 +00:00
Stephan Aßmus
ee7cf06d20 * Added link flushing where the change is supposed to happen as soon as
possible on the server side (for example Show() and Hide() need to be
  immediate). But also SetViewColor() and a few others. This fixes the
  bug encountered in Pairs.
* Removed NOTE in DrawAfterChildren(), since it was outdated.
* Corrected a typo in a comment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25145 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 10:00:37 +00:00
Ingo Weinhold
fd4a010b05 rename() is supposed to fail when the target exists and is not a
directory only if the source is a directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25144 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 03:21:14 +00:00
Ingo Weinhold
acb16f5574 * Added missing select notifications on shutdown().
* Notify read/write instead of write/error when disconnecting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25143 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 02:56:03 +00:00
Ingo Weinhold
98e94e0a76 For sockets in listening mode the read_avail() apparently has to return
something.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 01:11:59 +00:00
Ingo Weinhold
210199c5a7 * Resolved {g,s}etrlimit() TODO's, i.e. moved the implementation into
separate functions and made the set errno correctly.
* Added RLIMIT_CORE case. We don't support core dumps, but setting them
  to disabled shouldn't fail anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 01:08:07 +00:00
Ingo Weinhold
d11e733fee * Allow passing sub vnode ops and publish flags to Inode::Create().
* Implemented create_special_node() hook.
* Fixed Inode::IsContainer()/IsDirectory().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25140 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 01:04:48 +00:00
Ingo Weinhold
0951fcb4a3 vfs_create_special_node() always tried to create the node in "/".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25139 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 01:02:12 +00:00
Ingo Weinhold
0e42d1bcd8 Our sockaddr_storage is only 128 bytes long. Hence invocations of bind()
or connect() that passed sizeof(sockaddr_un) would always fail. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25138 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 22:30:54 +00:00
Ingo Weinhold
a47d979fc2 Added BSD compatibility headers to the image. They are not in the search
paths by default, but I guess we want to keep it that way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 21:33:08 +00:00
Ingo Weinhold
1669306c8a Use the short way of opening a pty.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 21:31:45 +00:00
Ingo Weinhold
cc6e7cb347 Added the BSDish openpty().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 21:30:38 +00:00
Ingo Weinhold
fb913b19be Added POSIX functions posix_openpt(), grantpt(), ptsname(), and
unlockpt(), which provide a portable way of opening a pty.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 21:29:13 +00:00
Ingo Weinhold
06b7c7ffe2 * Set reasonable terminal flag defaults. This makes telnetd fully usable
again.
* Publish /dev/ptmx. Opening it will open a fresh pty master. In
  principle /dev/pt/ is obsolete now, but I guess we keep it around for
  compatibility with BeOS. Though there shouldn't be many applications
  opening a pty, that we might be interested in...
* New ioctls B_IOCTL_GET_TTY_INDEX (returns the tty index) and
  B_IOCTL_GRANT_TTY (grants tty slave access rights).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 21:26:35 +00:00
Ingo Weinhold
719f971dea Controlling terminal related changes:
* It is possible to acquire a tty that is already open, iff it is not a
  controlling terminal yet and the process is a session leader.
* Also set the terminal process group when acquiring a controlling
  terminal.

telnetd/login and sshd are a lot happier now (and so am I :-)).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 21:16:57 +00:00
Ingo Weinhold
e225a906d2 With my recent changes release_sem_etc() accidentally lost the
cleverness to reschedule only, if it actually unblocked another thread.
Should have been the reason for #2152 (overall slowdown).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 20:04:43 +00:00
Axel Dörfler
2909d9dc26 * Factored a delete_notification() that is now used in three places.
* remove_transaction_listeners() was checking the events_pending field without
  holding the sNotificatonLock - that should have been harmless (as we're in the
  middle of deleting the transaction), but it now looks better.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25130 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 16:23:10 +00:00
Ingo Weinhold
dcc3839464 Check the shadow password under Haiku, when available. ftpd works again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25129 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 16:07:59 +00:00
Ingo Weinhold
d1dc42cc73 "/bin/bash" is a valid shell, too. ftpd doesn't allow anyone to login,
who has a shell not returned by getusershell().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 16:07:02 +00:00
Ingo Weinhold
9afa8bc573 Small test that repeatedly connects to a server. Under Haiku after
several iterations the connect()s start to fail -- first occasionally,
later quite often.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 15:18:05 +00:00
Ingo Weinhold
2838616b17 Translate connect()s to INADDR_ANY to INADDR_LOOPBACK. Not sure, if that
is required, but Linux seems to do it. It also allows us to create
AF_INET socketpair()s -- not really needed, but probably nice for
testing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 14:19:58 +00:00
Axel Dörfler
701d196668 * Inode::_GrowStream() did not make the double indirect block writable before
adding a block to its array. This could cause all kinds of trouble, and
  fixes at least a part of #2148.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25125 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 11:28:41 +00:00
Axel Dörfler
89eb861a3e * Large cleanup. Removed inconsistent usage of errno in instantiate_object();
instead, it will now use the image_id parameter to store errors in.
* find_instantiation_func() and validate_instantiation() will no longer
  overwrite errno with B_OK.
* Made private functions static, and moved them to the top.
* If the class name starts with '_', it will now try to add a BPrivate namespace
  in case it could not find the class. This should help with the compatibility
  issues Shinta reported (also part of ticket #2086).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25124 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 09:56:03 +00:00
Axel Dörfler
991c062ff3 * Made the archive version of BTextControl::_InitData() more resistant against
a broken archive - it will now create a new _BTextInput_ child, if it couldn't
  find one. This fixes #2086.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25123 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 09:52:27 +00:00
Ingo Weinhold
cfb0e47367 Fixed the write behavior: Blocking writes should write what they can
and loop until everything has been written. Non-blocking writes should
write as much as they can and return B_WOULD_BLOCK, if that wasn't the
whole request.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25122 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 02:23:24 +00:00
Ingo Weinhold
5843f17cb8 When splitting the send request into multiple buffers, we must
succeed after we have successfully sent the first buffer, even if not a
single byte of some following buffer could be sent. We should probably
even succeed whatever the error code -- not sure what is the reason
for only doing that for B_WOULD_BLOCK and B_INTERRUPTED.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25121 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 02:20:00 +00:00
Karsten Heimrich
ccf92546c4 * remove and delete listview items
* removed unmaintained fNode var from listview
* don't exit just in case we can't load the icons,
  instead draw an string what the default printer is
* call create_directory only if the printers dir does not exist



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-23 22:32:14 +00:00
Stephan Aßmus
0babd6b999 Applied patch by Philippe Saint-Pierre:
* Add spacing around the tab view.

Thanks, Philippe! BTW, the tab view will come in handy again, now with the
additional options that sub-pixel rendering is going to offer... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-23 20:40:23 +00:00
Ingo Weinhold
f0a15ccac2 * When appending/prepending data to a buffer we kept the initial
reference to a newly created header. It would thus not be deleted when
  the new node (which also has a reference) was removed again.
* Added debugger command "net_buffer_stats" which prints the allocation
  counts of net buffers and data headers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-23 18:41:49 +00:00
Ingo Weinhold
5b29b956f3 Replaced the reader/writer blocking semaphores by condition variables.
This fixes race conditions. The OpenSSH tests don't hang anymore --
instead they run the system out of memory, apparently due to a net
buffer/data node leak.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25117 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-23 17:10:30 +00:00
Axel Dörfler
74a7b3ff69 * Wrote a test application that tries to fragment your disk by creating many
small files, and then deleting every other.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-23 12:44:00 +00:00
Stephan Aßmus
2d581f8d95 Forgot to commit this, added Pairs to the image in the Demos folder. Sorry!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25115 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-23 09:51:22 +00:00
Stephan Aßmus
69e62e48b9 Added Pairs game contributed by Ralf Schuelke to the image! (Demo folder)
Thanks a lot, Ralf!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-23 09:06:05 +00:00
Rene Gollent
291b899af6 When saving its state, BShelf was erroneously saving the BMessage
given to it when the replicant was first added. This had the net 
effect that any on the fly changes such as the color drops allowed
by the Activity Monitor replicant were discarded. Fixed.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 22:44:40 +00:00
Axel Dörfler
32bcfcf6a9 Some more changes towards a working prototype:
* The "net" driver is now also loaded.
* The node tree is now dumped.
* If registering fails, the node is now removed from its parent again 
  (for now, correct would be to release it).
* device_node::_RegisterDynamic() now also checks for the driver path.
* _RegisterFixed() no longer calls supports_device() - since it has been
  directly specified, we will assume the user knows what he is doing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25112 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 21:52:10 +00:00
Ingo Weinhold
71a49db6b6 Use the thread blocking functions instead of a condition variable for
read request. Can probably be done for writers as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25111 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 21:47:54 +00:00
Ingo Weinhold
023bf5fcda * Added support for timeouts.
* Added support for non-published condition variables. One has to call
  Init() on those, and add entries directly with the
  ConditionVariable::Add() method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25110 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 21:46:23 +00:00
Ingo Weinhold
f842b6fa57 * Added THREAD_BLOCK_TYPE_OTHER.
* Made the object pointer passed to thread_prepare_to_block() const, so
  that strings can be passed without casting. Passing a string could
  maybe be made a convention for THREAD_BLOCK_TYPE_OTHER.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25109 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 21:43:54 +00:00
Karsten Heimrich
a017bfe8de * use HVIF icon on HAIKU, resolves ticket #1802
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 21:40:15 +00:00
Karsten Heimrich
4aa5d96613 * invalidate only the items in question, should fix ticket #1803
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 21:31:28 +00:00
Jérôme Duval
9fdd497614 * typo in Control
* layout the view even in the case of an unarchived one
* this should finally fix #2121


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 21:26:10 +00:00
Axel Dörfler
cd81456e14 Just a minor bug that caught my attention while glancing at the code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 19:55:33 +00:00
Ingo Weinhold
60222c8bac * Made thread_block_with_timeout_lock() more user-friendly. It allows
passing 0 as timeout flags or B_INFINITE_TIMEOUT as timeout, in which
  case no timer will be used.
* Implemented missing thread_block_with_timeout().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25104 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 19:46:08 +00:00
Jérôme Duval
d5b26be18c restores the text controls before using SetValue() since this one uses them
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 19:13:00 +00:00
Ingo Weinhold
c2d96d4500 Added back accidentally removed check for B_THREAD_SUSPENDED when
delivering a kill signal.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 19:01:23 +00:00
Axel Dörfler
43bae01508 * Made waiting for a timer handler more power usage friendly.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 18:46:34 +00:00