Commit Graph

1452 Commits

Author SHA1 Message Date
Axel Dörfler
e520b288ca Fixed compilation with tracing turned on.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17030 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-06 10:02:17 +00:00
Axel Dörfler
ada7365dae Dunno why this was commented out - fixed bug #322.
That was probably what Joshua Austin meant on the mailing list, slightly misleading, though :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16998 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-04 02:19:49 +00:00
Axel Dörfler
903936bcec Added the scrolling offset when a view is created.
This lightens the problem in bug #98 a bit, but doesn't completely fix it; you
still don't see any items in that list on the switch, but they now appear again
when you scroll around there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16997 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-04 01:51:16 +00:00
Axel Dörfler
c0a7267732 Minor cleanup: removed some unused commands.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16980 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-03 11:45:37 +00:00
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