Commit Graph

20 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Ingo Weinhold
b4add623a4 Fixed gcc4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 20:16:41 +00:00
Stephan Aßmus
939fb4077c fix scrolling of BViews that rely on app_server painting the background, remove a forgotten debug output in ViewLayer, reimplemented setting the window title during runtime, fix Decorator redraw on pressing buttons - though I was lazy on that one... it works, but as the TODOs say, it would be better integrated directly in the Decorator class than being handled by WindowLayer
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 22:15:12 +00:00
Axel Dörfler
e83820ed57 Merged app_server_new_clipping branch changes r15290 to 15418 back into trunk.
Also fixed Jamfile for the test environment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15419 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 12:41:19 +00:00