Commit Graph

1548 Commits

Author SHA1 Message Date
Axel Dörfler
cce5601a7a * The background is now repainted on workspace switch in case the background
color differs. This fixes bug #373.
* The workspaces window is now invalidated when the workspace color is
  changed, so that it shows the correct color then.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16979 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-03 11:41:16 +00:00
Stephan Aßmus
b9e275a6a5 app_server remembers the font settings now
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16961 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-01 22:03:44 +00:00
Axel Dörfler
61212865dc More or less rewrote cursor conversion code: it's now working as expected.
Note, this code needs to be reviewed for PPC; do they really work with little endian RGBA?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16960 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-01 18:36:50 +00:00
Stephan Aßmus
600fbd78e4 * BView::FillRegion() sends the BRegion data instead of decomposing
it and rebuilding it on the server side (that causes a huge speed
  up for regions containing many rects)
* There is a method in ServerLink that could have been used, but I
  actually needed to add the direct BRegion support to LinkReceiver
* added LinkReceiver as a friend to BRegion class
* ServerApp and ServerWindow keep the CursorManager locked after they
  have retrieved a cursor until they have called Acquire() on the
  cursor. (Axel: what good is using atomic* stuff in Acquire() and
  Release() if we have to protect this by a lock anyways?)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16957 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-01 16:56:10 +00:00
Stephan Aßmus
b22badf221 added TODO comment about writing an AGG Vertex Source for BShape data
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16956 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-01 16:49:18 +00:00
Stephan Aßmus
5d0c78f416 skip hardware acceleration for small regions, should speed up rendering of small regions in the same way it helped small rects
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-01 16:48:28 +00:00
Axel Dörfler
82e704cd1b Now writes the file type of the PNG files as well. This fixes bug #374, even though
it only cures the symptoms, ie. bug #194 remains valid (broken file types when built
from Linux).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16954 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-01 15:51:48 +00:00
Axel Dörfler
a1a04a4742 * A fake B_MOUSE_MOVED message is now send on workspace change, and when
a window is closed, too (only happened when a new window was shown
  before). This is done via the new Desktop::_SendFakeMouseMoved()
  method. This fixes bug #342.
* The MouseFilter now always sets Desktop::fWindowUnderMouse, so that
  one can differentiate between no window under mouse, and decorator
  under mouse.
* EventDispatcher::SendFakeMouseMoved() now expects a BMessenger instead
  of an EventTarget as target - this guarantees that it can safely be
  called with any window now (instead of only the current window).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-01 15:43:25 +00:00
Axel Dörfler
4436fae24d Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16952 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-01 15:38:49 +00:00
Axel Dörfler
2828c4d1d7 Scrolling and CopyBits() no longer clobber the current screen if the window
isn't even visible. This closes bug #341.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 23:58:05 +00:00
Axel Dörfler
74e8df0e6e Follows the suggestion by Stefano and caches the square root.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16904 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 22:31:49 +00:00
Jérôme Duval
ae89492b27 fixes wokspaces grid
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 19:26:38 +00:00
Axel Dörfler
8c86105b9a If you still think this is informative, just have a look in the SVN history :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-20 23:35:25 +00:00
Stephan Aßmus
4ec7e19751 * fixed filling B_CMAP8 bitmaps with white (255 was the wrong
color index)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-19 22:35:20 +00:00
Stephan Aßmus
d7e9392e25 forgot I made this change... added locking to
the lookup of a cursor


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-19 22:34:05 +00:00
Stephan Aßmus
8e56a3ff2e * some cleanup (removed unsued functions, regrouped others)
* FillRect() doesn't use the HW acceleration if the rects
  are too small (< 100 pixel area, about the sweet spot on
  my box) -> the same change should be used for FillRegion as
  well. (4x speed up of rendering large amounts of small rects)
* replaced dynamic allocation and freeing of blit_params and
  fill_rect_params in the accalerant based HWInterfaces on the
  heap with caching to make using the accelerated functions a
  little less expensive
* fixed a bug in bypassing Painter for B_OP_OVER when the
  pattern was B_SOLID_LOW (nothing should be rendered)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16841 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-19 22:33:00 +00:00
Axel Dörfler
bc9902cf98 Implemented freeing of blocks, though it's not very efficient yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16833 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-18 18:37:37 +00:00
Axel Dörfler
16ed1e1d15 * Removed headers/private/servers/app - everything is in src/servers/app now.
* Removed DisplaySupport.h, wasn't needed anymore.
* Removed private color set functions from InterfaceDefs.cpp - we might want
  something similar, but definitely not like that.
* Minor cleanup, added some missing licenses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-18 16:42:14 +00:00
Axel Dörfler
38a6ea1d98 * Removed the old AS_AREA_MESSAGE stuff - it's currently not used at all, and
even though we might need something similar, we can't use it (since it was
  based on BGet++).
* Removed BGet++, it's not used anymore.
* Removed ServerMemIO class, was never used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-18 15:59:23 +00:00
Axel Dörfler
0476838149 The test environment should now build okay again, as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-18 15:48:12 +00:00
Axel Dörfler
9a44fdc97c * Implemented a new client allocation method: instead of having all bitmaps of
all teams in serveral server areas, and instead of having to eventually clone
  them all several times in BBitmap, we now have one or more areas per team,
  and BBitmap will only clone areas once if needed. As a side effect, this
  method should be magnitudes faster than the previous version.
* This method is also much more secure: instead of putting the allocation
  maintenance structures into those everyone-read-write areas, they are now
  separated, so that faulty applications cannot crash the app_server this
  way anymore. This should fix bug #172.
* Freeing memory is not yet implemented though! (although all memory will
  be freed upon app exit)
* There are now 3 different bitmap allocation strategies: per ClientMemoryAllocator
  (ie. via ServerApp), per area (for overlays, not yet implemented), and using
  malloc()/free() for server-only bitmaps.
* ServerBitmap now deletes its buffers itself.
* Cleaned up BBitmap and BApplication a bit.
* The test environment currently doesn't build anymore, will fix it next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-18 13:43:26 +00:00
Axel Dörfler
acfa924c01 * The workspaces window now cannot be moved with the Workspaces app anymore;
was a bit strange anyway - this closed bug #317.
* The selected window now gets a selection frame in case it can be moved.
* If the window cannot be moved, a new workspace isn't selected either.
* When choosing a workspace, the one currently selected also gets a selection
  frame.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16823 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-17 17:09:40 +00:00
Axel Dörfler
150e5ed532 * When the current focus window was closed or invisible, we used to
chose the front window as our next focus window - but this proved
  to be problematic with B_AVOID_FRONT windows. Therefore, we now
  simply chose the top-most window as the next focus window.
  This fixes bug #281, and potentially also fixes bug #181.
* This also revealed another bug in SetFocusWindow(): when the window
  to have focus already had focus, but were hidden before, the focus
  did not change; if that window was subsequently removed, the app_server
  would have crashed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-15 21:33:12 +00:00
Stephan Aßmus
420379aef6 I should have finally fixed those app_server crashes
in HWInterface::_DrawCursor(). Axel, even though we
understood the problem, we didn't really fix it back
then: When the sync flag was set to true in
BView::SetViewCursor(), the link was only flushed,
which means that the function still returned before the
ServerWindow thread processed the message. This means
that the race condition (the cursor being immediately
deleted after SetViewCursor returns, which might be
processed in ServerApp thread before the SetViewCursor
request in ServerWindow thread) still existed. I changed
SetViewCursor now to do a real sync (wait for the
ServerWindow reply) before returning. The alternative
would be to set the fPendingViewCursor flag in either case.
Anyhow, I could reproduce the error quite reliably before
this change, and now it is gone... here is to hoping!



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-15 14:04:44 +00:00
Axel Dörfler
c16fda11ae Fixed those stylish pink window buttons I just made.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-15 00:26:53 +00:00
Axel Dörfler
49fe96777b * Removed ColorUtils.cc from libbe.so - I can't think of a reason why
these should be public (they don't match any basic Be naming style
  anyway :-).
* Put the code that's used by the app_server where it's needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-15 00:22:01 +00:00
Axel Dörfler
8896266062 * Now moves with absolute coordinates instead of relative, which makes moving
windows to other workspaces so much easier that even I managed to get it
  right...
* Moving windows on another workspace is now working as well.
* Fixed a positioning bug in Desktop::SetWorkspace() - was only visible in
  case the window was in more than one workspace, but not in all.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-13 23:47:32 +00:00
Axel Dörfler
14fe11cfae * Implemented moving windows around via the Workspaces app. However, you
can't move them to another workspace, and you currently don't see a
  window moving that is not in the current workspace. (this fixes bug #135)
* Desktop::SetWindowBehind() didn't update the WorkspacesLayer.
* Changed Desktop::MoveWindowBy() to be able to move window on any workspace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-13 22:05:49 +00:00
Marcus Overhagen
8b6f573f3f Fixed screenshot function. Creates PNG files without alpha channel now.
This should fix bug #124 and makes much nicer screenhots.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16769 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-13 18:43:13 +00:00
Michael Lotz
0581480cfe * Fixed ServerBitmap::ImportBits() to use the correct width/height
* Extended ConvertBits() to properly handle negative offsets and overlapping lines
* Implemented blitting the software cursor to the bitmap returned from ReadBitmap()

Note: In the future we will have to directly use the final graphics buffer for ReadBitmap() if we want DirectWindow output too (R5 includes it). I don't know how R5 handles the hardware cursor though.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16766 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-13 16:48:44 +00:00
Axel Dörfler
e2c5e77531 Fixed a crashing bug Stippi's StressTest revealed: hidden (and especially,
removed and deleted) windows must not be the mouse event window (ie. while
dragging or resizing the window).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-12 21:49:35 +00:00
Axel Dörfler
f025cd8b72 While the user resizes a window, programmatical resize operations are ignored,
likewise, while the user moves a window around, programmatical moves are ignored
as well.
This fixes bug #264.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16743 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-12 16:59:15 +00:00
Axel Dörfler
f5659a7615 Quick build fix, Stippi, can you review this?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16723 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-11 20:43:35 +00:00
Stephan Aßmus
30ce5790f2 added two TODOs
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-11 19:39:35 +00:00
Stephan Aßmus
a587720a30 print something to stderr when window creation fails
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16718 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-11 19:39:03 +00:00
Stephan Aßmus
a0cfff3e97 fix crash in case fTopLayer is NULL when the window is destructed, this will happen when the ServerWindow thread could not be run
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-11 19:38:20 +00:00
Stephan Aßmus
d26af39650 actually add the converted rects to the region
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-11 19:37:28 +00:00
Michael Lotz
bdbd1cb441 Removing the USING_MESSAGE4 define.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-11 18:06:46 +00:00
Axel Dörfler
1e766d4688 Moved the ViewUnderMouse() functionality from the EventDispatcher to the Desktop;
this saves us some locking headaches and solves a possible deadlock in
ServerApp::Activate().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-10 13:03:41 +00:00
Axel Dörfler
73bc0d629e * Fixed a possible locking bug in Desktop::WindowAction().
* Cleaned up locking a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16686 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-10 11:42:58 +00:00
Axel Dörfler
87b1f40c0f * Fixed misbehaviour of AS_SET_CURSOR: it will no longer set the mouse cursor
when it's not over a view of the application.
* The application cursor is no longer applied when the mouse cursor is over
  the border (or tab) of a window.
* Gave up and imitate BeOS behaviour: the mouse cursor now always get the
  shape the view below dictates, ie. it will no longer fall back to the
  default cursor outside the focus window.
* The window is now set to the default in case there is no window under it
  at all (ie. if Tracker isn't running).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16685 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-09 22:54:10 +00:00
Axel Dörfler
6417229f7c Floating and left titled windows are now always drawn "active" (ie. have a yellow
tab that doesn't become gray, even if another window gets focus), adopting the
R5 behaviour.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16684 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-09 22:13:00 +00:00
Axel Dörfler
9ce4e5b4ed * The ServerApp now has the concept of a current cursor: this is either the cursor
of the view currently under the mouse, or the application cursor, if the view doesn't
  have its own cursor (ie. it will no longer set the wrong cursor in certain situations).
* AS_DELETE_CURSOR has no longer an influence on the application cursor, as this grabs
  a ref for its own use - this fixes bug #275.
* AS_SET_CURSOR no longer sets the cursor when the application is not active.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16678 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-09 18:37:28 +00:00
Axel Dörfler
ed45b6652a Cleaned up AS_SET_CURSOR a bit: it now just calls Desktop::SetCursor(), and no longer
HWInterface::SetCursor() directly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-09 16:00:36 +00:00
Axel Dörfler
52b3e056cd AS_SET_CURSOR now grabs a reference to the current app cursor, so that it won't be
deleted when the local BCursor object is gone. This should fix bug #275 (ScummVM
should no longer have two cursors), not tested yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-09 15:51:52 +00:00
Axel Dörfler
083ec97572 Implemented kLeftTitledWindowLook.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16672 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-09 12:52:40 +00:00
Michael Lotz
d6bada84a3 Fixing white background on different B_CMAP8 icons. Fixes bug 268.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-08 20:03:22 +00:00
Stephan Aßmus
26f8325935 fix build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16659 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-08 19:04:26 +00:00
Stephan Aßmus
907e89c6e8 * The EventDispatcher takes care of reference counting the ServerBitmap
used for the drag bitmap, see NOTEs on why that is...
* moved reference counting of the ServerCursor from Desktop into
  HWInterface where it is actually used
* I hope to have fixed the problems with _DrawCursor when dragging
  something. At least the reference counting of the ServerCursor was
  for real, since the HWInterface rejected changes to the cursor while
  something was dragged, which caused the old cursor to be Released() and
  deleted each time the mouse moved...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-08 19:02:20 +00:00
Stephan Aßmus
8e89843efc * when the client constrained the clipping on a view, the server used to
take an empty region as an indication to remove the clipping, but on R5,
  this is actually valid... this patch fixes the problem
* the ViewState::clipping_region is now consistently used to memorize
  the user defined clipping of the view state instead of being sometimes
  used to cache the current view clipping


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-08 18:57:44 +00:00
Axel Dörfler
1bbdbf9cda When the last window was removed with floating windows on screen, they wouldn't
be closed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-08 12:56:56 +00:00
Axel Dörfler
2c9acb6697 InWorkspace() was not in balance with SubsetWorkspaces() - this fixes bug #266.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-08 12:31:04 +00:00
Axel Dörfler
14fb2b690b * A double click on the window border now minimizes the window - has a fixed
double click time, though.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16631 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-07 15:23:35 +00:00
Michael Lotz
2a6e97186b Actually commit the change to ReadBitmap()...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-06 00:23:16 +00:00
Michael Lotz
ee18c3ccff Added an extended ImportBits() to ServerBitmap to allow the use of offsets and made ReadBitmap() use it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-06 00:18:26 +00:00
Michael Lotz
bdc6f9e7ef * Fixed a swapping bug for 16 bit colorspaces
* Added some comments
* Added some checking to avoid noop shifts
* Added buffer length checks
* Implemented (as Stephan suggested) a version of ConvertBits() that takes offsets.
This new version allows to move a region of the source into a region (possibly not at the same point) on the dest while converting colorspaces on the fly.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-05 23:53:33 +00:00
Michael Lotz
a97ee677a7 Ensure that the cursor is not drawn (it was visible in single buffered mode). Drawing the cursor is not implemented yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-05 14:41:52 +00:00
Michael Lotz
acfad7920c Added an ImportBits() function to ServerBitmap and used it in ReadBitmap(). Should work for all colorspaces now.
Magnify does now work correctly, fixed bug 197.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16581 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-05 12:59:39 +00:00
Stephan Aßmus
8b41c21369 * B_BITMAP_WILL_OVERLAY bitmaps are currently not
supported. (makes VLC run without changes)
* B_BITMAP_CLEAR_TO_WHITE causes the server to
  clear the bitmap to white... :-)
* removed weird comment


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16578 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-03 20:24:13 +00:00
Michael Lotz
f1fb383d6f Small fix for the last commit. Next thing is color conversion using a subset of what is in Bitmap.cpp. Maybe the conversion functions should be put into a conversion class that can be used by the app_server too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-03 00:13:43 +00:00
Michael Lotz
3e2ee69551 Started implementing the server side of BScreen()->ReadBitmap().
Colorspace conversion is not done yet so that it only works correct in 32bit modes.
Also drawCursor is not respected yet. Partially fixes bug 197.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-02 23:50:06 +00:00
Axel Dörfler
f19839c230 Some groundwork for overlay support. If someone wants to finish this, feel
free to continue (it would be nice to be notified before, though, in case
I get to it again in the next weeks).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-01 21:20:57 +00:00
Axel Dörfler
9cc21fd165 Changed the way a valid display mode is chosen:
* instead a fitting display mode from the list, and having a fallback
  "ignore frequency" mode, the closest available screen mode is now
  chosen.
* The display_mode's frequency of the mode found is now adapted to the
  requested frequency, as it's done in the screen preferences panel.
* Removed the fallback 8 bit mode for now; instead, we should have
  _FindMode() deviate from the color space as well, if needed.
* This all fixes the problem that you suddenly had an (still badly
  supported) 8 bit mode after reboot, instead of the one originally
  chosen in the screen mode preferences.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-01 16:08:28 +00:00
Axel Dörfler
bfe698736d * Implemented private do_window_action() function, used by the Deskbar to bring
windows to front (or minimize them).
* Desktop::ActivateWindow() no longer crashes in case the window to be activated
  is not on the current workspace - instead, it doesn't do anything at this
  point. IOW it doesn't handle workspace activation at all, yet.
* Renamed ServerWindow::GetWindowLayer() to ServerWindow::Window().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-28 18:31:16 +00:00
Axel Dörfler
52cd65cdf4 Fixed build for GCC 4, this closes bug #239.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-28 14:48:23 +00:00
Axel Dörfler
9b5a183539 * Fixed BWindow::Show()/Hide(): fShowLevel was changed and checked without
holding the window lock.
* Run() is now called before creating the window in the app_server when
  Show() is called for the first time (which is now checked with fRunCalled
  instead of some thread arithmetics).
* Minimize() now sends the show level of a window to the app_server, so that
  it can actually determine if minimizing or maximizing the window should
  have any effect. This fixes bug #225.
* fShowLevel's meaning is now reversed; when it's above zero, it now means
  the window is shown (before, a level less than 1 meant shown). This definitely
  better fits its name :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-27 16:45:58 +00:00
Axel Dörfler
f8d8085d7a * Quitting a non-hidden window no longer deadlocks the app_server (_Hide() was called
without a lock).
* Renamed private methods to start with the '_' symbol.
* Removed superfluous SetLayer[Font]State() and moved back those one-liners into their
  AS_* handlers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-27 16:14:08 +00:00
Axel Dörfler
da0f53d8e4 B_AVOID_FRONT window were ignored when activating a window, and thus, menus could
steal the focus of the focus window.
This fixes bug #181.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-27 14:05:04 +00:00
Axel Dörfler
4a47f44363 Reverted change made in r16467: bug #207 is invalid, and the fix broke node monitoring
of the font directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-27 14:01:48 +00:00
Axel Dörfler
2ed942c199 * Added LinkReceiver methods that return the length of the string.
* AS_GET_STRING_WIDTHS now uses this method to send the strings to the app_server;
  ie. it no longer sends the whole strings, and it saves sending the string length
  separately.
* BFont::StringWidth() will now always return 0.0f in case of an error (instead of
  some random value)
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-27 13:09:37 +00:00
Stephan Aßmus
9a0c473378 * hopefully fixed the weird color inversion of
colors with full saturation in the part where
  the cursor is transparent
* fixed leakage of cursor data (placed making the
  copy it in the wrong bracket)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16523 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-27 11:43:10 +00:00
Stephan Aßmus
588259b66d various changes to handling custom cursors:
* all cursors owned by a team are visually different,
  or (iaw) an already existing cursor is reused when
  it is set by the client again
* changed various occurances of cursor data from "int8*"
  to "uint8*"
* ServerCursors also remember the R5 data from which
  they were created
* the reference counting and destruction of
  ServerCursors changed: The cursor knows it is attached
  to a CursorManager and one can simply use
  ServerCursor::Acquire() and Release() and the reference
  counting and everything is being taken care of
* destroying a ViewLayer will now correctly release a set
  ServerCursor
* fixed a race condition when setting a cursor through
  BView::SetViewCursor(): If the client code looks like this:

  BCursor cursor(cursorData);
  someView->SetViewCursor(&cursor, false);

  there is a relatively high chance the BCursor destructor
  told the ServerApp thread to destroy the cursor before
  the ServerWindow thread got to "acquire" the cursor for
  use by the view layer. The very same problem is likely the
  reason that SetViewCursor works to unreliably on R5, even
  when the "sync" flag is set to "true" (although it should
  theoretically work in that case).

all these fixes make WonderBrush work fine again with the
new support of custom cursors.... coded by axeld and myself
(the joys of pair programming :-)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-26 18:15:31 +00:00
Stephan Aßmus
2d8561e4c6 make it easier to get a stack crawl in case the server crashes after quitting in the test enviroment (code by axeld)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-26 18:03:00 +00:00
Stephan Aßmus
43307330ce the main inactive border color matches the now lighter tab color
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16519 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-26 17:59:20 +00:00
Stephan Aßmus
4aaa5aa100 * added a way to retrieve the view under the mouse
via token

(coded by axeld)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-26 17:58:03 +00:00
Stephan Aßmus
c684b4ca64 oops, this completes the previous commit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-26 17:56:59 +00:00
Stephan Aßmus
83fb1d46b1 limit the rate at which windows are moved to 50 fps, the various clients have now more time to redraw stuff
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-26 17:55:33 +00:00
Stephan Aßmus
81c5a58e04 * slightly adjusted coding style
* lightened up inactive window tab


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-26 17:53:57 +00:00
Stephan Aßmus
d511c14bbd no longer needed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-26 17:52:16 +00:00
Axel Dörfler
348837ad2f Fixed warning and simplified error output (BTW if this should stay, it should probably
go into the syslog).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-26 16:34:16 +00:00
Michael Lotz
20a4e7265c * Changed the AGGTextRenderer to use the new UTF8 handling
* Added more char codes to is_white_space(), should be all I think

Sorry if I stepped on your toes Stephan, but I wanted these changes flushed before I leave for holidays :-).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-23 09:04:26 +00:00
Jérôme Duval
dac2d29a21 don't create the directory if it doesn't exist, fix bug #207
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-19 16:42:51 +00:00
Stefano Ceccherini
7938b1158e Decorator() can be NULL in case the look is B_NO_BORDER_WINDOW_LOOK. Fixes bug 204
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-18 09:38:42 +00:00
Axel Dörfler
a9f98d52a3 When unhiding views, we need to update the clipping deep, or child views may be
omitted. This fixes bug #181, or at least the part of it I can reproduce.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16442 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-16 21:58:22 +00:00
Axel Dörfler
45a93d5d6b Fix for a bug I introduced with the last change: views were no longer removed at all!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16440 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-16 20:58:58 +00:00
Axel Dörfler
62b5f42b35 * Fixed view deletion: _CreateSelf() and RemoveSelf() are now symmetrical, removing
all those error output from the app_server.
* AS_LAYER_DELETE now gets a token, no longer frightening choice of parent.
* Removed locking in RemoveChild(); it has to be called locked now.
* Removed AS_LAYER_DELETE_ROOT as it's no longer needed.
* Removed support from BView for being PR3 compatible.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-16 14:43:33 +00:00
Axel Dörfler
36e8fa618f The keyboard focus is now always updated if the message is a B_[UNMAPPED_]KEY_DOWN or a
B_MODIFIERS_CHANGED message.
This fixes bug #175 (which was probably caused by a bug in our old BMessage implementation,
see TODO item in line 141).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16414 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-15 18:38:39 +00:00
Axel Dörfler
966fbea627 A work-around for the Tracker desktop redraw problem of the previous change.
Should probably be cleaned up a little. This fixes bug #146.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16377 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-13 13:43:30 +00:00
Axel Dörfler
3dcbe9fc88 Implemented redrawing the desktop after color changes. Right now, it only works
correctly when Tracker is not running; obviously, the background is cleared in
Tracker before it had the chance of changing the view color.
Maybe the app_server needs to detect the background view of the desktop and
change the view color manually :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-13 13:12:10 +00:00
Stefano Ceccherini
1afee82631 Even more BPicture support. We should have the basic to draw every picture used in our tree (for example, Tracker's navigator's buttons)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16350 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-11 17:48:19 +00:00
Stefano Ceccherini
3da4d36c6a Added support for bitmaps in BPictures.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16348 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-11 15:21:29 +00:00
Stefano Ceccherini
f06f67c546 Implemented more BPicture related stuff. With this change, at least buttons can be drawn in pictures almost perfectly
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16344 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 22:20:32 +00:00
Stefano Ceccherini
38690d41b0 Renamed TPicture class to PicturePlayer
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 21:38:53 +00:00
Stefano Ceccherini
2c2773c4c3 Fixed a bug which prevented BPictures to be drawn. Small cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16341 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 21:18:53 +00:00
Axel Dörfler
a544829365 _PrepareUnicodeBuffer() no longer processes empty strings which should hide the
often seen error message.
I'll investigate if convert_from_utf8() is supposed to return an error for empty
strings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16327 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 11:37:06 +00:00
Axel Dörfler
f877af82fe * Implemented private functions do_minimize_team(), and do_bring_to_front_team()
used by the Deskbar (for "Hide All" and "Show All"). The latter doesn't work
  correctly yet, though, it just maximizes all windows of that application.
* Added a TODO to ServerWindow AS_MINIMIZE_WINDOW on how to make it work correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16315 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-09 18:53:36 +00:00
Axel Dörfler
995ab7b3c6 The server now differentiates between hidden and minimized - that concept somehow
got lost, before.
It might not work 100% correctly yet, but it works good enough to hide the Tracker
status window from the Deskbar, and thus, fixing bug #133.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-09 18:28:29 +00:00
Stephan Aßmus
ebae3c7d61 this fixes Chart leaving dirty stars in BDirectWindow mode... at least on my machine. Looks like BDirectWindow resizing is notably smoother on Haiku btw. :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16311 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-09 15:07:56 +00:00
Stephan Aßmus
d365e2039e small cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16310 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-09 15:05:33 +00:00
Stephan Aßmus
76cf2ec33f turn off the blitting based MoveBy version, until it works better. The problem is that resizing views with children can invalidate parts which could still be copied by blitting when the child is moved because of FOLLOW modes. Or the problem is only with views that are moved and resized at the same time. I will find out later...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16309 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-09 12:42:08 +00:00
Stephan Aßmus
b5182fe099 don't blit stuff arround on screen when moving or resizing invisible windows, this bug was most visibly triggered when navigating menus, since the menu window was reused and moved and resized when it was invisible, weird things could happen on the screen...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16308 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-09 12:38:46 +00:00
Axel Dörfler
a92dff57f2 Stupid me - thanks to Michael Lotz for pointing that out :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-09 11:27:06 +00:00
Axel Dörfler
2a47269907 SetWindowFocus() could reset the focus of a window that already had focus.
This fixes bug #128.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-09 10:44:02 +00:00
Stephan Aßmus
6697289d80 some changes supposed to speed up VESA mode on real hardware, based on my experience with optimizations in other parts
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16259 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-06 19:36:30 +00:00
Stephan Aßmus
95e29889f4 This fixes the update problems that I could observe. The client might have been not in sync with the server regarding window position and size, which in turn messed up the ConvertFromScreen() functions and also the view Bounds(). Therefor the current window geometry is also added to the information the client gets when starting an update session. I think the problem was there before my previous changes, just maybe less likely to be observed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16258 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-06 19:34:36 +00:00
Stephan Aßmus
6134fcc936 * update the visible status of new children
* speed up from/to screen conversion of BRects and BRegions
* invisible views don't need updating


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16257 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-06 19:31:02 +00:00
Michael Lotz
9e7948f45e * Fixed locking of the FT_Face by moving it into Get/PutTransformedFace()
* Removed the FaceGetter as it was only needed for locking
* Cleaned up TruncateString()
* Fixed a typo in moreUTF8.h

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-06 17:42:18 +00:00
Axel Dörfler
8527f8ffbe The display resolution is now saved and restored. Probably doesn't handle non-default
modes right yet.
The settings are stored in B_USER_SETTINGS_DIRECTORY/system/app_server/workspaces.
They are currently saved as a flattened BMessage - we might want to switch to the
driver_settings format, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16249 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-06 13:36:46 +00:00
Axel Dörfler
d5ffccabb7 * Removed unused MakeBlendColor().
* At least 15 bit mode is broken, and should probably be removed.
* Cleanup - do we really need this class?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16247 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-06 11:47:13 +00:00
Stephan Aßmus
bb160ab5f6 change the way the _UPDATE_ message is used: it is now a mere notification that some views need updating. The BWindow will then pull data from the server which views exactly and the update rect. Therefor, the server can append regions to the current update session even if an _UPDATE_ message has already been sent to the client. If multiple views are invalidated in the client, only one update session will be triggered instead of two with the old implementation. Some drawing defects can be observed, but I know how to reproduce them so I hope to fix them soon.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16245 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-06 10:28:30 +00:00
Stephan Aßmus
a7250011e8 more or less cosmetical fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16242 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-06 10:15:48 +00:00
Michael Lotz
db5734a452 More work on the BFont special functions.
* Reworked functions like GetEscapements(), GetBoundingBoxesAsString() and GetGlyphShapes() completely
* Made the ServerFont functions uniform in their prototypes and cleaned out unnecessary arguments
* Added new UTF8 handling functions to moreUTF8.h that are now used by ServerFont
* Put the common transformations of the FT_Face into an own GetTransformedFace() to lessen code duplication

In other words, ServerFont is now cleaned and handles UTF8 pretty efficiently. Some ToDo's are still left though.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 23:36:59 +00:00
Axel Dörfler
195e980ef1 * Cursors are now reference counted, so it shouldn't be possible anymore
to delete them accidently :)
* You should no longer call HWInterface::SetCursor(), but the new Desktop::SetCursor()
  if you need to change the cursor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16238 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 19:43:44 +00:00
Axel Dörfler
aa1f543799 Some work on cursors:
* Fixed a myriad of bugs all over the place, ranging from locking errors to
  deleting objects that don't belong to the one deleting them (hello HWInterface!)
* Almost all ServerWindow cursor stuff was broken; I've replaced all commands
  to set a cursor with a single one AS_SET_CURSOR.
* Renamed some cursor commands.
* Changed the (broken) way ServerApp::fAppCursor was maintained - the application
  cursor is now NULL as long as possible.
* Removed superfluous ServerCursor app signature stuff.
* The BApplication will no longer duplicate the default/I-beam cursors, it will
  just reuse the default ones which now have fixed tokens.
* As a result, changing the cursor is now working as expected, closing bug #102.
* Rewrote Cursor.h, renamed private members to match our style guide.
* Minor cleanup.

What's still left to be done is reference counting the cursor objects to make them
work right and reliable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16237 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 18:14:14 +00:00
Axel Dörfler
73b3ea3cd7 Fixed a few more uninitialized variables.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 18:03:09 +00:00
Axel Dörfler
47f1b81ce2 * fCurrentWorkspace wasn't properly initialized.
* Removed AS_SET_SYSCURSOR_DEFAULTS handling for now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 15:58:29 +00:00
Michael Lotz
739ccb9b2f Changed the way the pen location is applied to shapes according to Stephan, removing the slower matrix calculation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 11:51:13 +00:00
Michael Lotz
7213cb626c * Changed DrawShape() to take the current pen location into account (Stephan please review that AGG part)
* Fixed GetEscapements() to return the correct values
* Corrected and enabled the rotate / shear transform for GetGlyphShapes() and GetEscapements()

The Iterview sample code demo is now working. If you play with it a bit you can also rotate the text.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 02:03:09 +00:00
Michael Lotz
bb96bd0a70 * Fixed GetGlyphShapes(). The BShapes that are outputted are correct now but the app_server still cannot draw them correctly.
* Changed the allocation to new for GetGlyphShapes() and GetEscapements() as the data is deleted in ServerApp.cpp
* Minor cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16231 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-04 22:20:00 +00:00
Axel Dörfler
ff3abf4d6f * Started a naive implementation of BView::SetViewCursor() server-side - doesn't
work though, as HWInterface can only draw B_RGB32 cursors...
* More build fixes for libbe_test target - it defines __HAIKU__ as well, now


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-02 20:19:29 +00:00
Axel Dörfler
f7969f54fb Fixed build in the test environment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-02 20:08:16 +00:00
Stefano Ceccherini
667fa89b02 BDirectwindow is notified when workspace changes. Fixes bug #99
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 23:12:29 +00:00
Axel Dörfler
c7023acdc6 * Fixed B_AVOID_FRONT support in the app_server.
* Menu windows now use the kMenuWindowFeel feel (but still need the B_AVOID_FOCUS
  flag set, as that's currently independent from the feel).
* Minor cleanup in MenuWindow.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16150 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 13:40:22 +00:00
Axel Dörfler
304636cc5e Implemented kMenuWindowFeel, not that much tested, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 11:50:02 +00:00
Stefano Ceccherini
92071609a1 extended support for BPicture, still not working
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16006 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-18 21:29:29 +00:00
Stefano Ceccherini
af675e2c03 implemented some more stuff for bpicture support. In theory StrokeLine, Stroke/FillRect should work but in practice they don't.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16005 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-18 20:49:29 +00:00
Stefano Ceccherini
9cc00d82fb sync
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16003 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-17 21:39:41 +00:00
Stefano Ceccherini
9e8d2dd28b Removed PicturePlayer, it only contains code duplicated from TPicture. Some cleanups for BPicture. This commit also completes previous commit for BMenu
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-17 21:39:07 +00:00
Axel Dörfler
4ea667a0b0 Fixed possible crashing bug for B_NO_POINTER_HISTORY views.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15998 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-17 16:14:53 +00:00
Axel Dörfler
9a96efa92a Fixed build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15977 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-16 14:43:50 +00:00
Stephan Aßmus
7023b103b3 I took the liberty to revert Stefanos patch in 15953 since you all seem busy, it is ok and even required for the Desktop window to be able to have focus
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15970 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-16 11:44:18 +00:00
Stefano Ceccherini
3532dd20d5 Now the kDesktopWindowFeel means also that the window doesn't want focus.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-15 19:36:16 +00:00
Stefano Ceccherini
ade091f23e Don't activate a window (in FFM mode) if it has the B_AVOID_FOCUS flag
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-14 22:51:10 +00:00
Stephan Aßmus
df19082398 * cleaned up ServerApp header a bit
* added support for nested cursor showing/hiding


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-12 11:59:24 +00:00
Stephan Aßmus
cf6fe303d6 * I decided having the cursor obscuring feature in the HWInterface class
was not such a bad idea after all.
* Reenabled obscuring the cursor in ServerApp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15925 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-12 11:46:49 +00:00
Stephan Aßmus
74ae324849 * when the parent ServerApp of the focus window changes,
it's Activate() method is called, if there is no
  new focus app, the cursor is unhidden for safety. The
  most notable difference: After having run a screen
  saver, the cursor will be visible again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15919 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-11 22:30:12 +00:00
Stephan Aßmus
bd5f895aa6 * made hiding and unhiding the cursor actually work
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15918 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-11 22:28:19 +00:00
Stephan Aßmus
b073091ab3 * small cleanups
* reworded Activate and commented out all code
  that actually tries to change the cusor shape


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15917 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-11 22:27:51 +00:00
Axel Dörfler
92b292f540 Implemented B_NO_POINTER_HISTORY. Window moving/resizing uses this mechanism
as well now, and makes quite a difference in Qemu.
Not tested for standard BViews, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15907 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-11 12:25:06 +00:00
Axel Dörfler
40be0d5583 Quick fix to make the Qemu experience less bad :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 23:18:36 +00:00
Axel Dörfler
5143d99bb0 Removed timeout in the EventDispatcher, clarified TODO about the message queue
of messages that failed to be sent.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 20:47:16 +00:00
Stephan Aßmus
7afc7c5074 ServerFont:
* fixed weird pointer conversion in SetStyle()
* fixed a potential mix up in operator=() in case the
  other ServerFont has fStyle == NULL

ServerWindow:
* the WindowLayer fTopLayer cannot be deleted by
  client request, just for safety reasons
* the link is flushed if there is no drawing engine,
  but this case is theoretical only
* deleting the ServerWindow object syncs with the
  client, so that when BBitmaps are deleted, they
  can be sure there are no pending messages (which
  would be executed in a nother thread)
* there is no timeout anymore when sending messages
  to the client, which made absolutely no sense

AGGTextRenderer:
* renamed fFontManager to fFontCache, because that's
  what it really is
* fLastFamilyAndStyle defaulted to the system plain
  font and therefor that font was never loaded when
  the font never changed meanwhile

DrawingMode:
* I'm not quite sure but I think there was the
  potential of a division by zero, at least I
  had crashes with "divide error"

HWInterface:
* fix update when the cursor shape changed in
  double buffered mode
 
ViewLayer:
* since the top layer is never really deleted
  before its time has come, it is not necessary
  to set it to NULL in the ViewLayer destructor

ViewLayer/WindowLayer:
* added a function to collect the view tokens
  that are affected by an update session

EventDispatcher:
* use the importance of the message for the timeout
  in _SendMessage()
* drop mouse moved events in the server if we're
  lagging behind more than 5 ms (Axel, maybe review)

View:
* there were some problems with the locking
  of the BWindow looper in RemoveSelf(), since
  this is called from the window destructor,
  also of BWindows from BBitmaps, which have
  never been run (this might need review), at
  least I seem to have solved the crashing
  problems introduced by actually deleting the
  view hirarchy in the BWindow destructor
* fixed _Draw() for being used non-recursively,
  temporarily disabled DrawAfterChildren, which
  didn't work yet anyways (because views cannot
  draw over children in the server yet)

Window:
* small cleanup when deleting shortcuts
* sync with the server when having send
  AS_DELETE_WINDOW (see ServerWindow above)
* fixed locking in Begin/EndViewTransaction()
* removed folding of _UPDATE_ messages, since
  there is only one ever in the queue
* set the fInTransaction flag during an update,
  I plan to use this in BView later to
  flush the link when drawing outside of an
  update
* BView::_Draw() is now called by view token,
  this gives the next leap forward in speed,
  the overhead because of drawing clean views
  was considerable



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 22:04:52 +00:00
Stephan Aßmus
1e1b86ef54 * make sure that fTopLayer is NULL when the top layer is deleted
* make sure layers are removed from the token space when the
  WindowLayer is deleted


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15852 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-06 17:17:54 +00:00
Stefano Ceccherini
7898383a8a Implemented AS_CREATE_PICTURE, started cleaning up Picture.cpp
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-05 10:27:29 +00:00
Stefano Ceccherini
8f3f25cf63 Merged the four AS_LAYER_DRAW_BITMAP handlers into just one handler
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-04 12:15:58 +00:00
Stefano Ceccherini
9c0c899e7d Added a copy constructor to ServerPicture. ServerPicture's constructors are private now, and can be called only from ServerApp (friend). Changed BList to a stl::stack which is better suited as a stack... Changed ServerApp::CreatePicture() to accept a picture to clone, instead of passing back a token which was never used anyway.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-04 09:49:47 +00:00
Stefano Ceccherini
ee6bcb7d78 Initial support for recording (some, for now) drawing events into a BPicture
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15838 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-04 07:30:38 +00:00
Ingo Weinhold
850f611735 Fixed GCC4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15836 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-04 02:35:12 +00:00
Stefano Ceccherini
b41356006a Implement AS_CLONE_PICTURE handler, needed to copy bpictures server side. Not tested yet
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 16:41:00 +00:00
Axel Dörfler
a342fafcf4 Undo 15810 again; it messed up the window lists (as WindowLayer::InWorkspace() and WindowLayer::Workspaces() must be in sync).
Might reveal other problems in this area, that are worth looking into.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15823 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 16:12:52 +00:00
Stefano Ceccherini
cba9e9ece6 Moved picture handlers to DispatchViewMessage, otherwise they are never called as the view can be hidden
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 13:49:20 +00:00
Stefano Ceccherini
1c33148d10 Implemented handlers needed for Begin/EndPicture, and a handler for DrawPicture().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 12:44:29 +00:00
Stephan Aßmus
0de2f00de7 updated some comments
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15814 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 12:07:11 +00:00
Axel Dörfler
cf48970b0f Initial workspace is a bad idea after all - why should debug alerts always open
on workspace 1 just because the system booted in that workspace? :-)
Now modal windows are opened on the current workspace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 11:55:15 +00:00
Axel Dörfler
843bc3cd0d * Introduced an initial application workspace - should be retrieved differently,
though (ideally when launched).
* B_MODAL_APP_WINDOW_FEEL windows are now visible on the initial app workspace
  in case it has no other window visible. This fixes the missing BAlerts in
  the debug_server or just the "alert" command. Thanks to Stephan for pointing
  this out.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 11:39:03 +00:00
Axel Dörfler
574af5597c Floating windows start with 0 workspaces - probably didn't matter, though, as
freshly added windows are hidden anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 11:36:45 +00:00
Stefano Ceccherini
69706266c5 Added SetPicture and Picture() to ViewLayer
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 10:30:08 +00:00
Stephan Aßmus
7324b0ceb8 invisible views are not allowed to draw
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 10:19:20 +00:00
Stefano Ceccherini
82b37bb257 Replace our current ServerPicture implementation with the one from Marc Flerackers. Currently it doesn't do anything as I commented out or removed most code, but it shows what we need to do
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15807 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 09:29:22 +00:00
Stefano Ceccherini
20c2f67293 Added Create/DeletePicture to ServerApp
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 08:08:20 +00:00
Stephan Aßmus
fd7d912ff6 * round of baseline position for DrawString()
-> fixes some clipping problems (because of
  hinting, the text was displayed at a rounded
  position anyways, but the clipping calculation
  was screwed up)
* take the drawing_mode and low color from the
  current state for drawing line arrays


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-02 18:11:15 +00:00
Stefano Ceccherini
a5e82db05a Commented out AS_LAYER_***_PICTURE handlers, as they don't do anything and can block the client
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-02 13:09:59 +00:00
Stephan Aßmus
21625cdc1b fix checks for when to draw something
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-02 12:45:07 +00:00
Stephan Aßmus
35cf9ee250 remove left overs
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15779 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-02 01:05:42 +00:00
Stephan Aßmus
e067fed541 Decorator::ResizeBy tells you the dirty region, DefaultDecorator::Draw() pays attention to the update rect, small clean ups along the way
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-02 01:03:31 +00:00
Stephan Aßmus
3155f89a0c blame SaveToPNG for not handling other colorspaces
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-02 01:00:12 +00:00
Stephan Aßmus
e644f39677 thought I would accelerate taking a screen shot, but it turned out I slowed it down, but I have yet to test this on Haiku somehow. The new code is commented out
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-02 00:58:37 +00:00
Stephan Aßmus
ec42af75e8 * fixed wrong byte order in DrawingModeAlphaCC
* added another optimized bitmap drawing routine
  for B_OP_ALPHA and BGR[A]32 bitmaps. When actual
  blending takes place, it is more than 1.7 times
  faster than R5, and about the same speed when
  the bitmap is fully opaque.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15761 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-31 01:03:26 +00:00
Stephan Aßmus
1fce337f89 cleaned up the code using templates and added optimized version for CMAP8 bitmaps and B_OP_OVER (to benefit Tracker)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15760 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-30 23:41:57 +00:00
Stephan Aßmus
2de437fa29 The first stab at optimizing bitmap drawing,
with quite good results I might add. Drawing B_RGB32
bitmaps is more than 1.2 times faster than on R5, while
B_CMAP8 bitmaps are slightly slower. The optimization
is only for B_OP_COPY and unscaled bitmaps
(B_RGB32 and B_CMAP8). Drawing only parts of the bitmap
is supported. Adding optimization for scaled bitmaps
should be beneficial, since the generic version is 2 two
4 times slower. I think it gets even worse for partial
bitmaps.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15758 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-30 21:31:36 +00:00
Stephan Aßmus
d95c3678b9 the source buffer is const of course
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-30 21:26:24 +00:00
Axel Dörfler
9aad1a5754 Fixed some problems of the EventDispatcher I introduced since I've played
with the "EventMask" test app the last time:
* The focus view didn't get any mouse messages anymore if there was a permanent
  B_POINTER_EVENTS view.
* B_KEYBOARD_EVENTS now works again.
* B_MOUSE_WHEEL_CHANGED messages no do arrive their targets without prior
  keyboard input.
* Added TODO item that other focus messages don't go through to the app without
  keyboard input (fix only works for B_MOUSE_WHEEL_CHANGED).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-30 20:59:14 +00:00
Stephan Aßmus
002356d2c9 round off the destination view rect of the view bitmap to avoid problems with drawing the view color around it
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15753 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-30 19:56:42 +00:00
Stephan Aßmus
835a0aaf32 prevent drawing bitmaps at fractional offsets
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15732 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 19:31:43 +00:00
Stephan Aßmus
8d66d23e83 removed some of Axels TODOs and added some notes, avoid clipping operations if nothing needs to be drawn
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15731 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 19:30:48 +00:00
Axel Dörfler
fc6ec91732 Implemented AS_SET_DESKTOP_COLOR - the desktop is not redrawn yet, but freshly exposed
areas will be filled with the new color.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15724 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 18:09:07 +00:00
Axel Dörfler
55fd3336b6 * Fixed a bug in ServerApp: when a ServerWindow would take too long to quit,
it could crashed the server.
* ViewLayer now deletes the view bitmap on destruction, if any.
* BitmapManager::Delete() now also accepts NULL bitmaps.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15723 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 17:40:18 +00:00
Axel Dörfler
4c66abd6f2 Implemented basic server side BView::SetViewBitmap() support. Things like B_TILE_BITMAP
or even the resizing mode isn't done yet, though. See TODOs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 16:46:02 +00:00
Axel Dörfler
4acb99b60f Implemented reference counting of ServerBitmaps, made constructor and destructor private,
as only the BitmapManager class is allowed to call them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15718 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 15:36:18 +00:00
Axel Dörfler
93052717b0 Renamed AS_LAYER_GET_{DRAW|BLEND}_MODE to *_{DRAWING|BLENDING}_MODE.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 15:06:24 +00:00
Stephan Aßmus
cd2b129d07 * removed superflous LockSingleWindow() from WindowLayer::MoveBy()
and ResizeBy()
* WindowLayer::SetSizeLimits() needs to be called with the
  AllWindows lock held
* I was observing weird behaviour with "unclickable" windows
  that I might have fixed by explicitly excluding invisible
  windows from Desktop::WindowAt(), there might be something
  wrong with the "current" window list though, Axel would know
* finally found the problem with "delayed background clearing"
* enabled delayed background clearing and removed unnecessary
  code. It should be more efficient, since it clears larger
  areas at once, and it solves the problem of views unable to
  draw into regions that are pending for another update - among
  other things, updates in resizing windows are more fluent, 
  especially for B_FULL_UPDATE_ON_RESIZE views. "Cut off" scroll
  bars should no longer appear when the view being scrolled takes
  too long to redraw.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15714 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 14:15:59 +00:00
Stephan Aßmus
f5b6cf65b2 * extracted the frame buffer memcpy routine from HWInterface.cpp
into a new frame_buffer_support.h
* added blend32 routine for blending a certain color with
  a scanline in the frame buffer
* added "solid" versions of B_OP_ALPHA drawing with
  B_ALPHA_OVERLAY alha function (blending on top of
  a non-transparent background such as the frame buffer)
* implemented an optimized shortcut for alpha blended
  FillRect() in Painter
* used the "packed" version of scanlines for shapes with
  an outline thicker than 4 pixels (and filled shapes anyways),
  this improves drawing speed when there are a few anti-aliased
  pixels at the beginning of a scanline, then a solid fill and
  some anti-aliased pixels at the end of the scanline. Such as
  large letters.

To summarize: The alpha blending in Painter seems to be about
1.45 times faster than on BeOS R5 which benefits drawing large
shapes. For example, drawing a large alpha blended rounded rect
is 1.28 times faster on the Haiku app_server. On the other hand,
B_OP_COPY is quite tough to beat. It is currently 10 times faster
on R5. But a great deal seems to be caused by the Painter
rasterization algorithm itself, since commenting out the actual
drawing doesn't gain any speed.
The other useful experience I collected was that reading and
writing and over the PCI bus in the same loop really hurts
performance. It is actually faster (like 1.8 times!!) to allocate
a second buffer, read from frame buffer into that, doing the
blending at the same time, then writing the buffer back to the
screen.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-28 19:53:00 +00:00
Stephan Aßmus
65b53cc601 quick fix for supporting B_TRANSPARENT_MAGIC pixels in CMAP8 bitmaps when drawing those with B_OP_ALPHA (composite, constant alpha)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-26 17:41:18 +00:00
Stephan Aßmus
56a1266027 I never get those right the first time
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15672 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-25 22:43:02 +00:00
Stephan Aßmus
9d909e2556 first simplistic implementation of drag bitmaps, drawing modes need more work, drawing text into offscreen bitmaps seems to be broken for some weird reason, B_OP_COPY actually copies the alpha value of the color as well
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-25 22:17:17 +00:00
Stefano Ceccherini
5a077d3f0d Windowscreen sorta works. This should've waited till the end of Christmas holidays, but since I had to fix the build today...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-25 10:45:39 +00:00
Stefano Ceccherini
51a523b147 implemented AS_GET_ACCELERANT/DRIVER_PATH and renamed the relative constants
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-24 16:25:47 +00:00
Stephan Aßmus
208e6678e3 small efficiency improvements - overall, the drawing speed of a usual BView, especially controls, is pretty much equal to R5 now (Drawing straight text, using StringWidth(), tons of AddLine()s, FillRect() etc) :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-23 15:57:55 +00:00
Stephan Aßmus
cf434f8eec fixed comment
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-23 15:54:41 +00:00
Stephan Aßmus
8f30140c63 fixed opening windows in other workspaces than the current, keeps the window lists valid
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-21 13:50:45 +00:00
Stephan Aßmus
5659f08c68 fixed weird resize behaviour (the mouse cursor returns to the initial drag offset after the window has been resized more than the resize limits allow)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-21 13:49:19 +00:00
Stephan Aßmus
3ca8cdfc07 remove empty functions which are no longer virtual anyways
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-21 11:23:37 +00:00
Stephan Aßmus
28f0e47c1a fix B_SUBPIXEL_PRECISE usage, animation in BitmapDrawing is smooth again
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-21 11:22:48 +00:00
Stephan Aßmus
464f836807 since this is potentially drawing to the frame buffer in the testenviroment too, we don't use memcpy anymore per se
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-21 11:21:56 +00:00
Stephan Aßmus
1f0a4ee8c7 removed unused stuff from Painter and DrawingEngine, fixed the deadlock when trying to use the (20 times faster) DrawingEngine version of StringWidth, the font is now usually ignored when taking on a DrawState in Painter... should add a little speed overall
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 22:39:54 +00:00
Stephan Aßmus
bee1ec1ee0 overall more correct, most importantly corrected a bug in content scrolling that caused view redraws to ignore the window content clipping
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 22:35:36 +00:00
Stephan Aßmus
3c0e5f8e8b added marking a ViewLayer dirty (ie if background needs to be cleared yet)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15626 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 22:31:42 +00:00
Stephan Aßmus
a07317fc10 correctly figure out bits per pixel in the direct window info code, this fixes direct windows in the Accelerant test environment, added a note about how the all windows lock seems to be grabbed for the entire duration of a client update on R5, which cannot quite be the truth, because apps crashing in BView::Draw() would take lock up the app_server, added skipping the processing of drawing messages if the current drawing region is empty, added currently disabled code for clearing the view right before the client draws it... doesn't work for some reason unfortunately
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 22:30:02 +00:00
Stephan Aßmus
33ab390e50 currently, there is no mechanism to update the DrawingEngine to a changed frame buffer pointer, so the Window for the Accelerant based test environment is non-movable... will change later
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15624 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 22:25:20 +00:00
Stephan Aßmus
ef4635a3f9 added a few comments
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 22:23:48 +00:00