-> 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
* 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
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
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
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
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
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
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
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
mappings yet, that's a good way to test this functionality.
* Turns out the directory of the mappings must be known already - they
should be added automatically, but I've added them manually for now
(which is okay for the default system directory).
* Having more than one style with the same family in the mappings didn't
work as planned - it now does.
* On my current system, time spend in the font manager constructor went
down from 1.5 secs to around 12000 usecs (and I have only a moderate
number of fonts installed, or so I thought - looks like the mappings
were a good idea :-)) - and that directly cuts down the boot time.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15580 a95241bf-73f2-0310-859d-f6bbb57e9c96
the debugger - killing them only very rarely works out anyway.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15516 a95241bf-73f2-0310-859d-f6bbb57e9c96
the AS_REDRAW message.
The AS_REDRAW message is now only used as a notifier - it's arrival is not
critical anymore, IOW it's simply dropped when the queue is full.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15511 a95241bf-73f2-0310-859d-f6bbb57e9c96
It also fixed a bug in the old code - the handshake semaphores were created
acquirable, causing the BDirectWindow::DirectDaemonFunc() to call DirectConnected()
with an uninitialized buffer and way too early - this probably didn't show up
before since it called it before the BDirectWindow constructor ran through,
so that DirectConnected() would still point to the BDirectWindow version, and
not to the implemented one of its subclass...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15505 a95241bf-73f2-0310-859d-f6bbb57e9c96
app_server...
If you like to use it, define USE_DIRECT_WINDOW_TEST_MODE in the haiku_app_server
Jamfile.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15504 a95241bf-73f2-0310-859d-f6bbb57e9c96
using the clipping info from a BDirectWindow... I made it so that the window
used stays on top always, until I can think of something better. The other
problem is that you should not move the window, since Painter doesn't update
it's pointer into the frame buffer.
* Now the test environment is running at pretty much the same speed as it would
under Haiku, completely by-passing the BeOS app_server. It shows that Painter
needs to be optimized for writing to graphics memory, and also that we need to
figure out a way to distribute update sessions more equally. What happens is
this: The first invalidation of a window triggers an update on the client
side... the client cannot keep up with drawing, since it is pretty much
blocked all the time because the desktop thread moves a window and because
the clipping constantly changes. In the meantime, new update request are
added to the pending session because the client has still not finished with
the current session. Only when things settle a bit, the next update session
can be startet. On the bright side of things, the earlier problems with
scrolling seem to be fixed for good.
* some documentation updates on Painter
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15478 a95241bf-73f2-0310-859d-f6bbb57e9c96
inline. Commented undefined virtual methods. BBitmapBuffer is still used, so
is ViewHWInterface.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15472 a95241bf-73f2-0310-859d-f6bbb57e9c96
lock the Desktop itself, and sometimes not - that also fixes some potential deadlock
situations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15463 a95241bf-73f2-0310-859d-f6bbb57e9c96
* finally nailed that much hated bug where the
wrong background underneath the cursor was restored.
I always looked for this in the wrong place -
of course, you cannot blit regions on top
of the cursor and expect the backup of the
background to be magically valid still... ;-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15461 a95241bf-73f2-0310-859d-f6bbb57e9c96
to avoid any confusion with MarkContentDirty()
* hopyfully fixed all drawing defects that could be
observed with CopyBits()ing and ScrollTo()ing, the fix
is definitely valid, and I cannot see any more problems
in Tracker either... hopefully this is it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15458 a95241bf-73f2-0310-859d-f6bbb57e9c96
* When switching workspaces, usually the focus switches to the front window.
This no longer happens in case a floating window had focus and is still visible
in the new workspace - in that case, focus is kept with the floating window.
* SetFocusWindow() now chooses the topmost window in case the specified window
has either a modal or there is no front window.
Desktop::RemoveWindow() now makes sure the window is hidden before removing it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15447 a95241bf-73f2-0310-859d-f6bbb57e9c96
* when changing feel, the original flags are now restored.
* added B_SAME_POSITION_IN_ALL_WORKSPACES to valid flags, so that they can be
set by the user.
* fixed masking out invalid flags (actually all but the valid flags were kept...)
* everytime B_SAME_POSITION_IN_ALL_WORKSPACES can be set (either in SetFlags()
or in SetFeel() the position is propagated to all window lists.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15441 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Desktop::SetWindowFeel() is now working, but doesn't respect the window
position yet (ie. floating windows would have to be moved to front).
* WindowLayer::Workspaces() now always reflects exactly the lists it's in
(at least after Desktop::AddWindow() has been called). WindowList::AddWindow()
and RemoveWindow() now update this flag to be correct at all times.
* Fixed Desktop::_ChangeWindowWorkspaces() to not set the current workspace
for windows that are not on the current workspace, and vice versa.
It also would hide windows that were already hidden, and tried to show
windows that actually were hidden (did no other harm than triggering
a rebuild of the global clipping).
* Floating windows now work as expected.
* Desktop::SetFocusWindow() won't give a window focus that has a modal.
* Renamed OnWorkspace() to InWorkspace().
* ServerApp::InWorkspace() now works correctly, added ServerApp::Workspaces()
as well.
* WindowLayer::SubsetWorkspaces() returns the workspaces mask this modal or
floating window should be in.
* New window flag B_SAME_POSITION_IN_ALL_WORKSPACES should work as well.
* Floating and modal windows now have always set this flag.
* Added a WindowList::HasWindow() method.
* Desktop windows (windows with the desktop feel) can now have focus again
(I accidently broke that before).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15434 a95241bf-73f2-0310-859d-f6bbb57e9c96
Desktop::_ChangeWindowWorkspaces() and SetWorkspace() didn't lock the window list,
but should have.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15421 a95241bf-73f2-0310-859d-f6bbb57e9c96
* ShowWindow() and HideWindow() now also work correctly for windows not
on the current workspace.
* Reverted WindowList::RemoveWindow() - if it is used wrongly, it should
better crash the server for now, so that we can iron out the bugs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15420 a95241bf-73f2-0310-859d-f6bbb57e9c96
is known by the server, anyway.
* B_MODAL_SUBSET_WINDOW_FEEL now also works as expected.
* Renamed AS_REM_FROM_SUBSET to AS_REMOVE_FROM_SUBSET.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15285 a95241bf-73f2-0310-859d-f6bbb57e9c96
* introduced ServerApp::OnWorkspace().
* moved AS_CREATE_[OFFSCREEN_]WINDOW into its own method, ServerApp::_CreateWindow().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15283 a95241bf-73f2-0310-859d-f6bbb57e9c96
* B_{FLOATING|MODAL}_ALL_WINDOW_FEEL now works as expected
* reintroduced the concepts of subsets of modal/floating windows - does only
work correctly for subset "all" window feels.
* RootLayer::_SetFront() now deals correctly with modal windows
* renamed RootLayer *WindowLayer() methods to *Window()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15282 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Introduced methods WindowLayer::IsModal() and IsFloating().
* Invalid flags for the current feel are now filtered out, like B_AVOID_FOCUS for
modal windows.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15280 a95241bf-73f2-0310-859d-f6bbb57e9c96
* also followed Michael's suggestion (more or less) and moved the
look/feel/flags checks into separate methods.
* on construction, invalid look/feel/flags values are now corrected.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15269 a95241bf-73f2-0310-859d-f6bbb57e9c96
* renamed some Decorator functions like GetLook() to Look().
* renamed _look to fLook and _flags to fFlags.
* removed the feel from decorators - they don't need to know
or care about the feel.
* the DefaultDecorator didn't allow resizing of modal windows.
* DefaultDecorator::SetTitle() no longer clears the passed
in updateRegion, it just fills it (so that you can call
more than one of these methods after the other, and still
get a correct update region).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15266 a95241bf-73f2-0310-859d-f6bbb57e9c96
has to be udpated anyway.
* some work towards being able to set a window's look/feel/flags on-the-fly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15265 a95241bf-73f2-0310-859d-f6bbb57e9c96
* look/feel are now window_look/window_feel instead of int32.
* removed the level stuff, I don't think this is needed.
* some other minor stuff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15261 a95241bf-73f2-0310-859d-f6bbb57e9c96
it, as it slows down window moving noticeably.
To provide a good Workspaces window functionality, we should probably let
WindowLayer take care of the updates itself - that would simplify the whole
thing a lot.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15260 a95241bf-73f2-0310-859d-f6bbb57e9c96
up with something better though, when the window titles are drawn as well...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15259 a95241bf-73f2-0310-859d-f6bbb57e9c96
This also allows the workspaces layer for these actions, which is now done as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15258 a95241bf-73f2-0310-859d-f6bbb57e9c96
Workspace class is a simple accessor to this class that takes care about
locking (currently, it's just the desktop lock, maybe it'll stay that way).
* WorkspacesLayer now displays the window thumbs again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15250 a95241bf-73f2-0310-859d-f6bbb57e9c96
just another case of troublesome generic RootLayer locking in ServerWindow
(I'm looking forward to get rid of this).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15249 a95241bf-73f2-0310-859d-f6bbb57e9c96
show any windows, but everything else seems to work fine.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15241 a95241bf-73f2-0310-859d-f6bbb57e9c96
wait_for_thread() always returns B_BAD_ADDRESS when the second argument is NULL
(it works fine under Haiku).
Instead of enqueuing a B_QUIT_REQUESTED message, InputStream now directly quits
when the 'quit' code is read from the port (B_QUIT_REQUESTED was never handled
by the event loop either, it just didn't get noticed because of the wrong
wait_for_thread() usage).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15240 a95241bf-73f2-0310-859d-f6bbb57e9c96
directly under the mouse cursor.
* Added Desktop::ShowWindow() and HideWindow().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15238 a95241bf-73f2-0310-859d-f6bbb57e9c96
* didn't realize that mouse events always go to the view under the mouse, not
only if its the focus window (FFM can really do harm, after all :-)).
* removed a TODO from the list: EventDispatcher::Target is now a public
class EventTarget, and every ServerWindow has one.
* as a result, EventDispatcher no longer manages targets itself, it
just maintains a list of them. You no longer set messengers, you
only set targets.
* customization of the message filters, they no longer inherit from
BMessageFilter (but EventFilter).
* a message target is no longer set explicetly anywhere, it's only
changed in the message filters if needed.
* therefore, no more locking mess in the EventDispatcher needed.
* this also made the EventDispatcher::fLastFocus stuff superfluous.
* moved the RootLayer::MouseEventHandler() into the message filter.
* Replaced RootLayer::_ChildAt() with WindowAt().
* WindowLayer now has an idea if it has focus or not, it no longer needs
to query the RootLayer for this - maybe we should rename "focus" to
"active", though (as far as layers are concerned).
* the "_view_token" data is now added from the EventDispatcher, not
the (Window)Layer class anymore.
* removed Layer::MouseWheelChanged() as we currently don't need it
(if the need arises, we can add it back later again)
* there is still no mouse moved message sent when opening a window
under the cursor, though...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15228 a95241bf-73f2-0310-859d-f6bbb57e9c96
* workspace switch and subset windows functionality temporarily removed
(away with that mess!).
* no more RevealWMState() - we now have methods like ActivateWindow()
and SendWindowBehind() that do all the work - just a little cleaner
and with less overhead.
* Workspace is now a pretty passive class - it only stores configurations
of the windows and screens.
* added an evil work-around for a locking problem (in RootLayer::_SetFocus()).
* I'll plan to move pretty much all of the remaining root layer functionality
to Desktop - so that the all regions lock is only held in case clipping
regions are affected.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15207 a95241bf-73f2-0310-859d-f6bbb57e9c96
know what's going on, but this appears to fix it. And since we'll get a new glyph
layout backend sooner or later, I don't want to mess with that stuff again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15176 a95241bf-73f2-0310-859d-f6bbb57e9c96
graphics add-on if it can handle it.
This fixes setting the screen resolution natively. Unfortunately, that's not
all (the input_server still constraints the cursor position to the previous
resolution...). Also, there is apparently no B_SCREEN_CHANGED sent.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15164 a95241bf-73f2-0310-859d-f6bbb57e9c96
is not over them - this should be better integrated with the rest of the
code (later, when we don't rely on RootLayer for everything anymore).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15151 a95241bf-73f2-0310-859d-f6bbb57e9c96
processing (enabled when PROFILE_MESSAGE_LOOP is defined).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15150 a95241bf-73f2-0310-859d-f6bbb57e9c96
ServerApp now waits up to 3 seconds for windows before killing them - it now
waits on the death semaphore, and only kills a window if it didn't quit fast
enough.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15147 a95241bf-73f2-0310-859d-f6bbb57e9c96
The mouse filter needs to lock RootLayer, but the event dispatcher lock is held
during that time, too, so that the focus cannot change in the mean time.
On the other side, ServerWindow needs to lock the event dispatcher when adding
or removing a listener, or for AS_GET_MOUSE - but since it always helds the
root layer lock during message dispatching this easily resulted in a deadlock.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15146 a95241bf-73f2-0310-859d-f6bbb57e9c96
Layer no longer knows anything about its subclass WindowLayer.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15131 a95241bf-73f2-0310-859d-f6bbb57e9c96
a bit:
* listeners are now managed per target (ie. per messenger) (by the Target class)
* therefore, the fFocusTokens/fLastFocusTokens lists are no longer needed; every
Target knows its listeners already.
* this also fixes the obvious bug that the focus window's views would get both
keyboard and pointer events, no matter which of them they originally wanted.
* renamed event_target to event_listener (there was actually a mix up in naming
before - to the outside it was "listener", and internally, "target" was used)
* WinBorder::MouseMoved()/MouseUp() now also add the view token to the message;
the messages weren't received by the target before (unless the view used
tracking via BView::SetMouseEventMask()...) - maybe the client should only
update fLastMouseMoved on B_MOUSE_MOVED events, and direct B_MOUSE_UP/DOWN
(plus wheel changes) always to fLastMouseMoved...
* some cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15123 a95241bf-73f2-0310-859d-f6bbb57e9c96
client's token space.
* finding layers by token is now O(1) instead of O(n) (as they are looked
up in the token space).
* removed Layer::FindView() as it's no longer needed (or should be used).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15113 a95241bf-73f2-0310-859d-f6bbb57e9c96
NextChild() and PreviousChild() - the current WinBorder list is now rebuilt on every
change; this is not perfect, and only a temporary solution (but cleaner than the
previous one).
* Introduced Layer::PreviousLayer()/NextLayer() methods that return the previous resp.
the next sibling.
* Moved {show|hide}_winBorder() into {Show|Hide}WinBorder() and got rid of the former.
* Renamed Layer::fServerWin to fWindow.
* removed some unused stuff, minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15108 a95241bf-73f2-0310-859d-f6bbb57e9c96
and introduced a RootLayer::_ChildAt() that is used instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15097 a95241bf-73f2-0310-859d-f6bbb57e9c96
* RootLayer's mouse event processing is now at its minimum - the
EventDispatcher handles them now. As a result, a window will now
get only one message per event.
* RootLayer adds "_view_token" to mouse moved messages that specify
the view currently under the cursor.
* There is now a mouse event layer in RootLayer that gets preferred
when it's set - this is now used for the window moving instead of
the previous mechanism.
* changed the previous DistributeMessage() to an UnpackMessage()
method following Adi's suggestion.
* caveat: some things might be functionally broken in RootLayer now
because of removing the mouse notification stuff.
* "be:transit" handling is now done completely client side by
BWindow::_SanitizeMessage(() (similar to what the input_server does).
This should also make the mechanism pretty robust, since every
B_MOUSE_MOVED message can now trigger the view transit (in case a
message is lost). B_WINDOW_ACTIVATED messages should be generated
client side as well.
* renamed AS_LAYER_GET_MOUSE_COORDS to AS_GET_MOUSE as it's not a
layer specific command, and also gets the mouse buttons.
* B_MOUSE_* messages from the up server now contain only a "screen_where"
field; "where" (in window's coordinates) and "be:view_where" are
added in BMessage::_SanitizeMessage().
* messages that don't have a valid target in the looper are now
dropped instead of being sent to the looper - this should be done
in BLooper as well, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15087 a95241bf-73f2-0310-859d-f6bbb57e9c96
client side (or will be, with the next commit).
* added GetMouse() functionality.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15084 a95241bf-73f2-0310-859d-f6bbb57e9c96
a suspend focus field to the message, there is now a "feed focus" field in
case the message should be forwarded).
* added a comment to the BPoint version of _FindView() (since it's broken)
* _DistributeMessage() is now called after _DetermineTarget() - so that it
can prevent sending the message twice to the focus view.
* removed BWindow::DoUpdate() as it's no longer used.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15066 a95241bf-73f2-0310-859d-f6bbb57e9c96
way, we always send only one message per event, no matter how many targets
there are in the window (the focus event list was not always maintained
correctly before, too).
* the current mouse filter eats all B_MOUSE_UP events, and therefore, the
temporary event targets were never removed.
* changed the way BWindow::_DistributeMessage() recognizes if it should forward
the event - not yet final, though.
* naming is now more consistent (events -> event_mask).
* some minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15058 a95241bf-73f2-0310-859d-f6bbb57e9c96
task_looper() again.
* removed BMessenger::fPreferred - whenever you had to specify "usePreferred" separately,
you don't have to do that anymore - use B_PREFERRED_TOKEN instead.
* fixed BTokenSpace::GetToken() semantics: it will no longer touch the "object" argument
in case of failure.
* Introduced a BWindow::_DistributeMessage() that will be part of the event dispatcher
counterpart to the app_server (the other will be _DetermineTarget()).
* Made it easier to use Michael's Message4 implementation: just add the following line
to your UserBuildConfig:
AppendToConfigVar DEFINES : HAIKU_TOP src : USING_MESSAGE4 : global ;
* Introduced ServerWindow::HandlerMessenger() and FocusMessenger() - the first will
target the client handler, while the other will target the preferred handler of the
client looper (usually the view having focus).
* Fixed dano message unflattening in the Message4 code.
* Changed BMessage::PrintToStream() to no longer use macros in the Message4 implementation.
* I hope that's all - it's a huge change, but it's all connected.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15046 a95241bf-73f2-0310-859d-f6bbb57e9c96
Note, I temporarily kept the Utils.h in, because I have other local changes to be
committed soon (sorry for this, but it shouldn't harm).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15043 a95241bf-73f2-0310-859d-f6bbb57e9c96
update the options in case the specified eventMask was zero.
* Added missing EventDispatcher::RemoveTemporaryTarget().
* Layers setting their event mask are now added to the EventDispatcher.
* The RootLayer is no longer contacted for SetEventMask() - it still handles
SetMouseEventMask(), tough - as a result, SetEventMask() temporarily doesn't
work anymore.
* Added Layer::ViewToken() method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15023 a95241bf-73f2-0310-859d-f6bbb57e9c96
into a Desktop keyboard filter.
* Removed keyboard handling code from RootLayer and Layer.
* Renamed Desktop::ActiveRootLayer() to RootLayer() as there is only one
root layer per desktop.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15018 a95241bf-73f2-0310-859d-f6bbb57e9c96
work yet, though, as the dispatcher is not yet notified about those.
* no more mouse cursor jumping - the cursor will now start in the middle of the screen;
this should be part of the initial input_server handshake, though.
* ServerWindow can now return a BMessenger of its client window.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15017 a95241bf-73f2-0310-859d-f6bbb57e9c96
* RootLayer still set the mouse cursor...
* mixed up "x" and "y" in the cursor thread
* but that didn't get noticed, as B_RELEASE_ALL doesn't seem to work
(will look into that next)!
The cursor finally works as good as expected in Qemu :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15013 a95241bf-73f2-0310-859d-f6bbb57e9c96
distribute any messages to the clients yet.
* removed the working thread from RootLayer - for now, its event handlers are
still called using input filters in the new event dispatcher, though (to
get things started).
* ServerApp is now using a BMessenger to identify its client, and no longer
stores the port/token separately.
* the input_server handshake is a bit simpler now, as it can now just reply
to the app_server message, removed unused code from ServerProtocol.h
* calmed down the MultiLocker (it always printed thread statistics on startup,
because it's compiled in debug mode).
* removed the cursor thread stuff from AppServer.cpp
* the new event dispatcher now uses a cursor thread when supported (only in
native mode, not in the test environment), although it improves cursor
movement under Qemu, the effect is not as good as expected - this might
need some more investigations (might just be a thread priority problem).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15012 a95241bf-73f2-0310-859d-f6bbb57e9c96
Also supports the B_SUSPEND_VIEW_FOCUS options, B_NO_POINTER_HISTORY is not yet there,
and B_LOCK_WINDOW_FOCUS has to be implemented somewhere else (its outside of the
scope of this class).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15007 a95241bf-73f2-0310-859d-f6bbb57e9c96
* no longer allocates focus messengers on the heap but keeps them around.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14992 a95241bf-73f2-0310-859d-f6bbb57e9c96
neither used nor tested. It's not even complete yet (support for Set[Mouse]EventMask()
is missing), but it will get there :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14990 a95241bf-73f2-0310-859d-f6bbb57e9c96
Axel, I think you didn't realise that _CursorFrame() gave and
invalid BRect for fCursorVisible=false, but that rect was used
to create the backup area, so it was buggy at that place. I removed
your checks for fCursorVisible in SetCursor() for cleaner code, but
left it in MoveCursor() because it might save a few cycles.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14954 a95241bf-73f2-0310-859d-f6bbb57e9c96
temporary handling code in the app_server.
* RootLayer no longer creates the input_server messaging port - this is now
the responsibility of the input_server.
* Moved AS_CREATE_[OFFSCREEN_]WINDOW from ServerApp::_MessageLooper() to
_DispatchMessage().
* The RootLayer thread is now started as soon as the input_server is there.
* removed or disabled any input_server stuff in the AppServer class.
* removed old message commmands to the app_server.
* Removed the R5_CURSOR_COMM and HAIKU_APPSERVER_COMM definitions: the
input_server is now automatically built correctly depending on the target.
* InputServer::EventLoop() plays now safe and checks for error conditions.
* InputServer::EnqueueDeviceMessage() seems to leak memory, added TODO about
this.
* InputServer event loop messaging uses ports for inner-app communication - why?
* The InputServer event loop thread is no longer killed on exit, it just quits
when its port is gone.
* Minor cleanup in input_server.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14949 a95241bf-73f2-0310-859d-f6bbb57e9c96
have different token spaces depending on the scope of its objects.
* removed TokenHandler - we're now using BTokenSpace instead.
* removed unused IPoint.cpp - if we ever need it again, it can still easily be
resurrected from the dead.
* some cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14925 a95241bf-73f2-0310-859d-f6bbb57e9c96
it must now fill the updateRegion parameter of SetTitle().
* WinBorder::SetName() is now greatly simplified and achieves better results
due to that.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14923 a95241bf-73f2-0310-859d-f6bbb57e9c96
* the Layer destructor now deletes all of the layer's children
* WinBorder no longer has to delete its top layer, as it's also its child.
* minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14919 a95241bf-73f2-0310-859d-f6bbb57e9c96
* BPrivateScreen now buffers its frame for 0.1 seconds (so that calling it several
times in a row is both consistent and cheap).
* Added GetFrameBufferConfig() call to the HW interface (and implemented it).
* Added server commands AS_VALID_SCREEN_ID, AS_GET_NEXT_SCREEN_ID, and
AS_GET_FRAME_BUFFER_CONFIG.
* BPrivateScreen::BaseAddress() and BPrivateScreen::BytesPerRow() are now working.
* minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14915 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Introduced and implemented AS_GET_SCREEN_ID_FROM_WINDOW - it only returns B_MAIN_SCREEN_ID,
though.
* renamed ServerWindow::fHandlerToken to fClientToken.
* The BScreen(BWindow *) constructor now really asks the server for the screen ID.
* ServerApp::fWindowList is now a BObjectList.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14910 a95241bf-73f2-0310-859d-f6bbb57e9c96
it works in the test environment, but I haven't yet tested it on real hardware.
* moved PrivateScreen.h to src/kits/interface/ - it's not used outside of that one.
* moved reading the color map from the BPrivateScreen constructor to the ColorMap()
method.
* improved/cleaned server/client communication for the screen stuff a tiny bit.
* fixed the GetBitmap() method I implemented yesterday.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14908 a95241bf-73f2-0310-859d-f6bbb57e9c96
* no more libappserver.so - this breaks the "Appearance" application, but that
has to be fixed some day later.
* the drawing stuff is now built in its own directory as libasdrawing.a.
* TEST_MODE defaults to "0" if not defined yet - it's overridden in the test
build now, not in the main build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14896 a95241bf-73f2-0310-859d-f6bbb57e9c96
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
Otherwise the an inner class with that name is considered as friend.
gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96
my brain by trying to understand code using gotos. People, learn
structured programming!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14870 a95241bf-73f2-0310-859d-f6bbb57e9c96
Right now, only the updates are disabled as a start. I am not sure what else
we can do here, but there probably is something :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14855 a95241bf-73f2-0310-859d-f6bbb57e9c96
that's probably not wanted, as a window without a title is perfectly okay.
* AS_CREATE_WINDOW will now return a proper error code on failure.
* The title read from the link is no longer adopted by the ServerWindow constructor,
but copied - while the previous version was a bit faster, this is a lot cleaner.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14851 a95241bf-73f2-0310-859d-f6bbb57e9c96
handling client defined clipping. The client clipping stays in local coords,
which greatly simplyfies things. We ought to find a way to reduce the number
of regions needed per Layer. I just added another one...
* renamed a few "lay"s to "child".
* used the new client added clipping in ServerWindow
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14847 a95241bf-73f2-0310-859d-f6bbb57e9c96
not even be a valid condition, but seems to happen.
* style cleanup...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14841 a95241bf-73f2-0310-859d-f6bbb57e9c96
the other day, I discovered, not a bug, but how to invalidate only the area that requires it when
changing window order (selecting or moving to back a window). Stuppid me, that stuff didn't worked
because I forgot how windows were arranged in the list returned by Workspace::GetWMState(). I was
iterating the wrong way! :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14839 a95241bf-73f2-0310-859d-f6bbb57e9c96
will no longer quit the haiku_app_server, but the application running in the server.
"Print Key" now also works as expected.
Only switching workspaces continues to use "Control-Fx" in the test environment. Under
Haiku, it now uses "Command-Fx" as on BeOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14834 a95241bf-73f2-0310-859d-f6bbb57e9c96
* removing a font family or style now always goes through the font manager.
* removed FreeType "cache" remains (it wasn't used, anyway, and won't be used
by us).
* renamed SharedObject to ReferenceCounting as that's what it does.
* the default fonts weren't deleted on shutdown.
* added temporary work-around for waiting until a newly created entry is complete
(just waits a moment...) - this will be fixed once Haiku supports this in a
better way.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14833 a95241bf-73f2-0310-859d-f6bbb57e9c96
the order, regular fonts come first, then bold, and then italics.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14828 a95241bf-73f2-0310-859d-f6bbb57e9c96
this also allows binary searching the families (which is now done, too).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14826 a95241bf-73f2-0310-859d-f6bbb57e9c96
* the node monitor is now working - fonts can only be added yet, though
* deleting a FontFamily did not work before, as the last style to be
removed tried to delete the family again.
* "luckily", FontFamilies and FontStyles were not deleted at all before.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14824 a95241bf-73f2-0310-859d-f6bbb57e9c96
problem we're seeing (at least I couldn't reproduce the problem anymore).
* SaveToPNG() now returns an error code.
* cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14813 a95241bf-73f2-0310-859d-f6bbb57e9c96
construction.
* ServerFont::SetStyle() now adopts the style's face and direction, too.
* Started a more sane handling of ServerFont::SetFace() (at least there's
a to-do comment :-)).
* Minor cleanup (GetStyle() -> Style(), GetFamily() -> Family(),
GetPath() -> Path()).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14809 a95241bf-73f2-0310-859d-f6bbb57e9c96
in the DesktopSettings as defaults, too (but can be changed there).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14804 a95241bf-73f2-0310-859d-f6bbb57e9c96
the default fonts of the app_server.
Moved some font command implementations around to group them a bit better.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14800 a95241bf-73f2-0310-859d-f6bbb57e9c96
* removed old Convert{To|From}{Parent|Top} methods. They were replaced by
Convert{To|From}{Parent|Screen}(type *data)
* removed some unused methods from Layer class.
* re-aranged Layer's class declaration - grouped methods
* made all Layer's members private.
* renamed a few private methods from method_name _MethodName
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14778 a95241bf-73f2-0310-859d-f6bbb57e9c96
Also fixed a drop into the debugger when starting Tracker: fRootLayer is now NULL
in the constructor of WinBorder - which is not fatal, as we only wanted to get
the screen size (which was formerly managed by RootLayer).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14772 a95241bf-73f2-0310-859d-f6bbb57e9c96
use the origin from the previous state as a start
* this fixes scrolling again (minus redrawing too much stuff,
this is left for Adi :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14770 a95241bf-73f2-0310-859d-f6bbb57e9c96
This file should probably still removed one day, or at least most of its functions
should either go away or somewhere else.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14754 a95241bf-73f2-0310-859d-f6bbb57e9c96
updates.
* Optimized retrieving the font list from the server.
* This greatly simplifies the app_server communication for getting the font
list as well - there are now only 2 commands instead of 6.
* Moved extra font flags creation from ServerApp to FontStyle::Flags().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14751 a95241bf-73f2-0310-859d-f6bbb57e9c96
Library names are now mapped for all targets but "host" (not only for
"haiku") -- added one more level of indirection to achieve that.
(TARGET_LIBRARY_NAME_MAP -> *_LIBRARY_NAME_MAP_*).
* Renamed build/HaikuBuildCompatibility.h to BeOSBuildCompatibility.h
(auto-included when compiling something that uses the Be API for platform
"host" on anon-BeOS platform), and introduced build/HaikuBuildCompatibility.h,
which can be included when compiling something that can be built for both,
Haiku and BeOS compatible platforms.
* Introduced libhaikucompat.a, a library that adds a few functions existing
under Haiku, but not under BeOS.
* New rule AddSubDirSupportedPlatforms.
* Renamed libopenbeos.so to libbe_haiku.so.
* Introduced new target platform "libbe_test", which is basically equivalent
to a BeOS compatible host platform target, with the exception, that instead
of the host platform's libbe.so a special build of Haiku's libbe.so
(libbe_haiku.so (formerly known as libopenbeos.so)) is used. Furthermore
Haiku's public app, interface, storage, and support kit headers are used
when compiling. This replaces the less nice way in which the test app server
and applications for this test environment were built.
When building for platform "libbe_test", the library name "be" is
autotranslated to "libbe_haiku.so". Thus most applications don't need
special fiddling when them building them for the app server test environment;
usually an "AddSubDirSupportedPlatforms libbe_test ;" will suffice.
* Reduced the dependencies of <syscalls.h> and fixed problems caused by this
(e.g. source files not including the needed headers directly).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14749 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Simplified server communication a bit: instead of separate queries for font
direction, "is fixed", ... there is now a private extra flags field that is
filled on demand.
* The server command names now describe what the command does, and are not simply
named after the BFont method (AS_SET_FAMILY_AND_STYLE vs. AS_GET_FAMILY_AND_STYLE_IDS).
* Replaced B_SET_SYSFONT_{PLAIN|BOLD|FIXED} with a single B_GET_SYSTEM_FONTS.
* Rewrote Font.h and added our license.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14741 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Painter implements DrawShape for stroking and filling BShape data
* Painter uses clipping to avoid problems with huge coordinates, the R5 app_server can be crashed by this.
-> this should be added to more places as well like text rendering
* DrawingEngine uses the Painter to draw BShape data
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14735 a95241bf-73f2-0310-859d-f6bbb57e9c96