Commit Graph

31149 Commits

Author SHA1 Message Date
Axel Dörfler
91d5822a7c * The code to handle AS_GET_SCREEN_ID_FROM_WINDOW did not lock the desktop,
which got unnoticed since the former Desktop::ActiveScreen() never changed.
  This fixes bug #4301.
* Also fixed a possible deadlock on application crash with a kWindowScreenFeel
  window; the locking order of the Desktop's and the ServerApp's window lock was
  reversed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32578 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 18:08:04 +00:00
Axel Dörfler
67838392dc * Applied stippi's no-patents patch, but without the ffmpeg part, as that one
is obviously already configured not to use patented code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 17:20:23 +00:00
Axel Dörfler
c53744492d * Fixed the output directory of the haiku-netboot.tgz.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 16:22:56 +00:00
Stefano Ceccherini
3b33d6307b Fixed B_READ_WRITE -> B_READ_AREA | B_WRITE_AREA problem.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32575 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 16:21:39 +00:00
Michael Lotz
29bd9bfd7d Remove SMP_MSG_RESCHEDULE_IF_IDLE as it is not used anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 16:14:18 +00:00
Michael Lotz
861b223cf2 * Strip down scheduler_simple. Anything related to multiple CPU handling has
been removed. That includes CPU disabling and thread pinning, as that becomes
  pointless with only one CPU.
* Return a proper reschedule hint on enqueing a thread, based on the priority
  of the current thread vs. the enqueued one.
* Enable dynamic scheduler selection. With one CPU the simple scheduler will
  be used, otherwise affine is selected.
* Removed the scheduler type define as we now always auto-select it.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 16:10:27 +00:00
Stefano Ceccherini
d3ae6ef65b use DIRECT_BUFFER_INFO_AREA_SIZE instead of B_PAGE_SIZE, even if they
are the same, but it's more correct. Also memset the buffer_info struct.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 15:40:53 +00:00
Stefano Ceccherini
7d9dfe90a5 fixed style violations
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 15:24:37 +00:00
Stefano Ceccherini
f1400a3199 More refactoring of the DirectWindow server code. No new bugs introduced
(hopefully), and now I could enable the B_SCREEN_CHANGED notification since 
it works a bit differently


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 15:07:40 +00:00
Michael Lotz
38516368ea Switching to the ATA stack for the @alpha targets. We need more widespread
testing to determine where we are at sooner than later now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 14:34:16 +00:00
Axel Dörfler
8759c47161 * We need to cast to BFile instead of BNode, as BNode is not a subclass of
BPositionIO. This fixes ticket #4299.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 14:05:45 +00:00
Ryan Leavengood
7f0af426b2 Fix the build. Sorry for the breakage.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32567 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 13:39:42 +00:00
Axel Dörfler
fe7f167df1 * Resolved a TODO and got rid of Desktop::ActiveScreen().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32566 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 13:34:33 +00:00
Axel Dörfler
cc93fbbba8 * Shuffled methods around to match their location in the header.
* Made ScreenChanged() private, and renamed it to _ScreenChanged().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 13:19:53 +00:00
Axel Dörfler
5e3f4c41a6 * ServerApp now maintains a mask of workspaces with temporary mode settings,
and reverts the modes if the app goes away (ie. if it crashes).
* Desktop::SetScreenMode() also set the mode on the current screen, even if
  it should have been set on another screen.
* Cleaned up the Desktop.h header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 12:57:24 +00:00
Stefano Ceccherini
c1df12d278 fixed / removed comments
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 11:50:21 +00:00
Stefano Ceccherini
1f3bec8961 removed resolved TODO comment
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 11:49:15 +00:00
Axel Dörfler
90ac66553e * Fixed computation of the screen frame in case of multiple screens.
* Removed debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 10:30:30 +00:00
Axel Dörfler
5ce919497d * The changed settings format (display mode instead of composed fields) actually
broke Desktop::WorkspaceFrame(), which I didn't notice before; Workspaces now
  shows everything in the right dimensions, even if resolutions differ.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 10:28:46 +00:00
Axel Dörfler
e18224cdf4 * Added a new AS_GET_SCREEN_FRAME function, as getting the frame via
AS_SCREEN_GET_MODE won't work with multi-screen support anymore, and is also
  more overhead than needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 10:23:01 +00:00
Axel Dörfler
f7e005eb83 * Moved PrivateScreen.h header to headers/private/interface.
* Desktop is now including it as well to be able to use the new
  B_CURRENT_WORKSPACE_INDEX constant.
* Include order cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 09:37:54 +00:00
Axel Dörfler
aadbd94ef7 * BPrivateScreen used B_CURRENT_WORKSPACE where an index was required. This
was reason that caused bug #2658.
* Introduced a new constant B_CURRENT_WORKSPACE_INDEX in PrivateScreen.h; maybe
  this should be made public one day.
* Fixed another reason that caused bug #2658: BPrivateScreen waited 100ms
  between frame updates, leaving a large window open for such problems; I've
  reduced it to 10ms now, but the actual bug fix is to reset the counter for
  each BScreen object, so that when you create a new BScreen object, the frame
  is retrieved timely.
* The reference count was not initialized, causing BPrivateScreens to be leaked
  forever.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 09:20:25 +00:00
Axel Dörfler
50dfc607fb * Fixed typo that prevented the app_server from restoring the
ScreenConfigurations correctly.
* Removed scoring for the screen ID alone - if there is a monitor info, we don't
  want to match an existing info if it only has an ID, as that one hasn't been
  stored for the current monitor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32556 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 08:02:09 +00:00
Michael Lotz
2e7672a2a0 Adding a simple wake on LAN command line utility. It will broadcast a magic
packet that targets the MAC address supplied by argument.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 05:52:36 +00:00
Rene Gollent
009ccc2962 anevilyak+mmlr:
* scheduler_enqueue_in_runqueue() now allows the scheduler to return a hint as to whether a reschedule is desirable or not. This is used in a few other places in order to relegate scheduling decisions entirely to the scheduler rather than the priority hacks previously used. There are probably other places in the kernel that could now make use of that information to more intelligently call reschedule() though.
* Switch over the default scheduler to scheduler_affine().



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32554 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 04:11:40 +00:00
Ryan Leavengood
e58f5f3d02 Extract libjpeg from the JPEGTranslator and make it a standalone lib. Added to
image and DevelopmentMin optional package. This is the original libjpeg (6b),
which I will updated to version 7 within the next few days. I need to
understand better the modifications made to it before updating.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32553 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 02:17:42 +00:00
Michael Lotz
9dbe55ebcc Fix typo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 02:07:11 +00:00
Michael Lotz
c265fd23cd We cannot use the condition codes to determine if a transfer descriptor is
processed. The controller may initialize it to any value when starting to
process the descriptor. If a controller did that it was possible that we thought
a transfer was already done even if it actually just started. Transfers would
then return that weren't processed, returning uninitialized buffers.
Instead of relying on the condition codes we now check that the head and tail
pointers are the same. This guarantees that all transfer descriptors of the
endpoint at hand are completed.
Reverted r32534 again as this one fixes the problem for real. The same things
that were mentioned there could happen here essentially, so in the worst case
the device or controller could stall because of freeing in-use structures.
Fixes #4067.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 00:14:50 +00:00
Rene Gollent
66dde0a85d Fix build with TRACE_SMP enabled.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 23:39:22 +00:00
François Revol
af0ba3c2c8 Fix gcc4 picky warnings...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 22:30:32 +00:00
François Revol
23ac6129a6 Fix gcc4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 22:28:02 +00:00
Ryan Leavengood
366df3d41b Copy our current libjpeg to it's new location before merging the new vendor branch
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 21:12:25 +00:00
Ryan Leavengood
4197604101 Remove useless if, /bin/open will handle this itself. Thanks Rene and sorry for
the noise.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 20:15:39 +00:00
Ryan Leavengood
fa3f8dcf9f Launch executables and use /bin/open on everything else in the boot launch
directory. I think this should be good enough until we have session management.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 20:10:31 +00:00
Ryan Leavengood
b6b0567fbd - Change Autostart directory name to launch.
- Move the launching of files in this directory from the Bootscript to the
UserBootscript.
- This means we now ship a working UserBootscript instead of just a sample.
- Updated documentation based on this change and Humdinger's suggestions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32544 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 19:21:18 +00:00
Axel Dörfler
0eed918306 * Rewrote screen configuration management: VirtualScreen doesn't have anything
to do with the configurations now, instead, there is a separated
  ScreenConfigurations class that maintains all known screen_configurations
  per workspace (and the Workspace::Private class has two of them, one for the
  current modes, one for the stored modes).
* Added Desktop::{Get|Set}ScreenMode() methods, ServerApp now only calls those.
* Getting and setting of anything else than the current screen is now supported.
* This change also fixes that a temporarily set screen mode was not being
  restored on workspace switch.
* Also, the Deskbar now seems to have the wrong location a lot, which is
  something that should be easily fixable therefore. I will look into this next.
* Got rid of the unhandy screen_id structure server side, and in BPrivateScreen;
  we now just use an int32 - the next API break should definitely replace the
  screen_id with a simple typedef.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 17:52:32 +00:00
Rudolf Cornelissen
4caccc456d modified the 100kHz timing inside the DDC common accelerant code. If delays with values near the timer resolution are required, the values should always have one resolution step added since otherwise the minimum delay isn't quaranteed. the 400khz timing needs fixing as well I guess... This modification fixes at least ticket #4084 where a DDC monitor isn't detected otherwise.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 16:41:39 +00:00
Rudolf Cornelissen
f72c42f862 reverting part of the I2C delay between writing SCL and DAT since the hardware design does not suffer from the read-modify-write issue I thought it might be.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32539 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 16:33:33 +00:00
Alexandre Deckner
725ad924ff * When checking a draw/updateRect intersection, an offset was added too early
making the check fail when Pose::Draw was called with a non zero offset.
 Fixes #4289
* Fixed an x/y typo (that had no really visible effect, the fade effect might
 need some more indepth review)
* Removed dead code, and replaced an inlined intersection check with
 BRect::Intersect.  



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 10:59:53 +00:00
Axel Dörfler
02b6c95990 * VirtualScreen::RestoreConfiguration() now also takes care of collecting the
screens that actually changed their resolution, which simplifies the code
  in Desktop considerably.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 09:45:54 +00:00
Axel Dörfler
0d1d2de59b * Desktop::SetFocusWindow() now takes kWindowScreenFeel windows into account,
and does not give focus to any window behind that one.
* Added TODO comment to the DefaultDecorator bitmap caching mechanism (although,
  it really seems to be fast enough, anyway, at least once we remove no longer
  used bitmaps).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 09:18:32 +00:00
Axel Dörfler
acc71e7c7c * The feel of a BWindowScreen should actually be kWindowScreenFeel. This makes
the Deskbar behave, and not appear in front of those. However, if auto-raise
  is turned on, the mouse cursor is shown, so it seems to get activated anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 09:02:55 +00:00
Michael Lotz
840cdc9efc When adding a transfer, the current tail descriptor of the endpoint will be
reused and overwritten by the first descriptor of the new transfer and the first
descriptor will become the new tail. We anticipate this situation in
_AddPendingTransfer() and set the first_descriptor of the transfer data to the
tail already. Since the tail was pretty much cleared to zero, this introduced
a race condition. After adding the pending transfer it can already be found
in the finisher thread. If this happened before actually switching the tail
and first descriptor it would find a descriptor with a condition of 0, meaning
"No Error" and would process the transfer incorrectly. Depending on the count
of descriptors and the timing of the switch taking place this could have
resulted in aborted transfers with actual length 0 or with the correct actual
length but invalid data. In the very worst case it could have freed things still
in use by the controller, resulting in all sorts of device errors. Sadly it
doesn't fix #4067.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 07:24:49 +00:00
Ryan Leavengood
177e730557 Incremental progress in improving the Twitcher:
- Remove '`' and '~' keyboard shortcuts from DoKey as those will no longer be
processed there (they are processed at a higher level.)
- Make shortcut for previous app '1' (same behavior as the left cursor key.)
This required adding B_UNMAPPED_KEY_DOWN to MessageReceived since it is actually
Ctrl-1 that is being pressed (which is unmapped in our default keymap.)
- Make the processing of Ctrl-~ (or `) cycle through the windows when the
Twitcher window is showing. This is to mimic the behavior when the Twitcher
window is never shown. There is still a bug though: the order of the switching
changes after the Twitcher window is shown. Why do we have both CycleWindow and
SwitchWindow methods in TSwitchManager? The changing of order seems to be due
to the use of SwitchWindow instead of CycleWindow. I suppose this is for the
day when we implement quick window switching?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 05:19:35 +00:00
Michael Lotz
5f92e39f7b That's actually not how it works. OHCI does the dirty work of splitting up the
transfer descriptors into individual packets. The descriptors are more a
logical thing. As such we do not generate one descriptor per packet but one
for each block of two pages at max. Therefore we only set the initial toggle bit
to the one we stored on the first descriptor and let OHCI use the carry bit for
subsequet descriptors. That error would only be visible on transfers above two
pages in size though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 04:45:13 +00:00
Michael Lotz
b0a2e9e7aa Even though the specs say the toggle carry field contains the value of the last
retired descriptor, it actually contains the value that is to be used next.
Confirmed that by cross-referencing FreeBSD.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 02:43:40 +00:00
Alexandre Deckner
f2b42dbb1b * Favorites in filepanels are always folders, the type of favorites here
doesn't depend on the 'node flavor' of the parent filepanel.
 Fixes #3624
* Minor style fix


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 02:19:08 +00:00
Alexandre Deckner
50f1b82d5b * Rewrote rename-click detection to be more usable. The code is much smaller
and is based on the pose selection time, not on click time. It is more 
 robust and since the selection might have been by click, keyboard or
 selection rect, it makes the behavior very pleasant (in my opinion) for
 multiselections. Try and tell me!
* Disabled the modifiers (first click editing). Too many of them, and
 conflicting with other usages, i'd like your opinions/preferences.
* Removed old, hackish and now unused DelayedEdit/SetDelayedEdit stuff.

Fixes #3617



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32529 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 01:19:41 +00:00
Ryan Leavengood
f67cd235ef Add a blurb about the Autostart directory in the bash scripting section. If
there is a better place please move it there. Also fixed a bad link in the
Tracker section.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32528 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-19 21:44:03 +00:00
Ryan Leavengood
176b361595 Add an Autostart directory as an easy way to start applications at boot up.
The dead simple Bash code was just copied from Humdinger's patch on #1202. He
also suggested having a link on the Deskbar for this folder, but I don't know
if that is needed. We just need to document it, which I may do next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-19 21:26:36 +00:00