There is one thread (BLooper) to handle new commands and one watcher thread which is just listening at the server port for updates. The race condition occurred for example when a sync/watching and a fetch body message are send to the looper. The sync message just triggered the IDLE command in the watcher thread. In the meantime the fetch body command send a DONE command, because the IDLE command has not be send at this time the watcher keeps watching.
- fix int32 -> ssize_t thanks Axel and Stippi
- clean up
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40919 a95241bf-73f2-0310-859d-f6bbb57e9c96
no default font at all, in which case we have more serious worries. CID 1559.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40884 a95241bf-73f2-0310-859d-f6bbb57e9c96
PS: Yes, I'm not brave enough to change the character case in the signature for
one of the most significant servers in the system ;-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40733 a95241bf-73f2-0310-859d-f6bbb57e9c96
virtual but only static methods, it is not so likely that binary compatibility issues may arrise
from using it in new apps. Adjusted all the Jamfiles that included the private libicon headers. Note
that it was never necessary to link against libicon.a, since it's part of libbe anyway. There was one
instance where that was done. Hopefully it does not break the build, but I did this change a while ago,
tested it and then the harddrive began failing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40679 a95241bf-73f2-0310-859d-f6bbb57e9c96
use in derived classes without enforced code paths... (CID 10252).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40639 a95241bf-73f2-0310-859d-f6bbb57e9c96
- The deskbar status query is looking for MAIL:read values equal to B_UNREAD now. This has the effect that in manual mark as read mode also unseen messages are counted as read messages. In this way the deskbar shows the full mailbox icon only for really new messages.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40596 a95241bf-73f2-0310-859d-f6bbb57e9c96
Add some more info to the self made query, not perfect yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40572 a95241bf-73f2-0310-859d-f6bbb57e9c96
in_addr_t is now in network endian again. Thanks, Philippe!
* Made SetToLoopback(), and SetToLocal() a bit more useful (although the latter
isn't implemented yet).
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40552 a95241bf-73f2-0310-859d-f6bbb57e9c96
Fixes#7005. Thanks.
Exclusions:
- localization of "usage" field of BPropertyInfo rejected - looks like
it is not displayed to user;
- localization of Sound Event names discarded. The situation is at least
questionable and should be discussed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40543 a95241bf-73f2-0310-859d-f6bbb57e9c96
was not up-to-date, which leads to a broken fix. Sorry about that.
* Move the details logs to LOG_DEBUG to keep LOG_INFO small.
* Rollback to OPTION_SERVER_ADDRESS, too. Either all options should be
renamed after RFC option names or, as said by axel,
they're named to be understandable, which it was already.
Now, a coffee, please.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40519 a95241bf-73f2-0310-859d-f6bbb57e9c96
revert r40492.
* For semantic sake, use ntoh*() macros to convert data coming from network,
not the hton*() variants, even if the end result is the same.
* Clean and add more details to DHCP syslog messages.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40516 a95241bf-73f2-0310-859d-f6bbb57e9c96
Work in progress: fetch next partial downloaded message.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40504 a95241bf-73f2-0310-859d-f6bbb57e9c96
Accounts are now stored in a separate file. Previously they where somehow magically assembled from the chain ids. Now its possible to remove a account temporary by removing the account file form the account folder.
Each account could have an inbound protocol, an outbound protocol and some filters.
Mails are now associated with an account and not with a chain. This required to replace the chain id attribute by an account attribute.
Replace BMailFilter and BMailChain by a less general approach. Basically the chain had a list of filters and call the ProcessMailMessage for each filter. This made it sometime difficult to understand what is going on, e.g. sometimes a filter used information gathered by another filters. The new MailProtocol and MailFilter classes are calling more dedicated hook functions, e.g. HeaderFetched or MessageReadyToSend.
As before all MailProtocol's (plus their filters) are running in their own thread.
Cleaned up the error and status window a bit. Abstracted the interface to these windows. Should be easy to write a BNotification api back-end now.
Parsing of mail headers is much faster now. Fetching the headers of a large mailbox takes ~min and not ~hour now! Initial checkout time is in the same order like Opera. The problem was the massive use of fgets in parse_header (mail_util.cpp) now the complete header is read in one go. Furthermore, only interesting fields are extracted.
Remove some unused files, BeOS relicts... Feel free to translate the mail server and remove the own language system (headers/private/mail/MDRLanguage.h).
Sorry for the remaining old (and new) coding style issues, sometime just ignore them, to many :(
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40397 a95241bf-73f2-0310-859d-f6bbb57e9c96
related to gradients. This was for example very noticeable when running
MediaPlayer which redraws the slider a lot. With three movies running,
app_server would leak at about 100KiB per second.
Might be related to #7071 or even fix it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40364 a95241bf-73f2-0310-859d-f6bbb57e9c96
In ServerWindow::_DispatchViewDrawingMessage(), for AS_DRAW_STRING_WITH_OFFSETS,
the string length rather than the number of UTF8 glyphs is used, thus leading
to an app_server crash.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40310 a95241bf-73f2-0310-859d-f6bbb57e9c96
* cleaned up ObjectList.h
* switched several uses of new() to new(std::nothrow)
* moved ugly AsBList() hack into BObjectList<>::Private class and
adjusted all callers accordingly
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40252 a95241bf-73f2-0310-859d-f6bbb57e9c96
This was making net_server listening wrong service port. Telnet & FTP
works again in non stand-alone mode.
This close#7108.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40241 a95241bf-73f2-0310-859d-f6bbb57e9c96
This safes a HasGlyphs() call which would convert the whole string to glyph
codes and look each of the glyphs up in the cache entry, just to do the same
again during the loop where they are actually used. Instead we now simply switch
to the write lock and look up the fallback entry when hitting the first uncached
glyph. This benefits the normal case of having all glyphs cached without any
drawbacks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40186 a95241bf-73f2-0310-859d-f6bbb57e9c96
1. If the glyph is cached, return it, as before.
2. Try to find a glyph in the fallback font, as before.
3. Check for ignorable characters as per Unicode and cache and return a zero
width glyph (rendering as completely invisible).
4. Reset to the original font.
5. Check for whitespace as per Unicode and cache and return the normal space
glyph.
6. If there still is no valid glyphIndex, continue with index 0 which caches
and returns the usual "missing glyph box".
This implements the Unicode suggestions on how to handle missing glyphs and
closes#7077.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40174 a95241bf-73f2-0310-859d-f6bbb57e9c96
* The code used continue to restart the loop when encountering a missing glyph,
but in that case the index wouldn't be incremented, meaning the consumers
would received the same index for ConsumeEmptyGlphy() and ConsumeGlyph() and
at the end there was not necessarily a call for every index, resulting in
uninitialized array elements for GetHasGlyphs, GetEdges, GetEscapements and
GetBoundingBoxes.
* Since the advance values were not reset in case of a missing glyph but still
added for the next char, the coordinates the consumers would get were advanced
by the advance values of the glyph preceeding the missing glyph(s). This made
StringWidth return wrong widths.
* The loop end condition was skipped by the continue as well, which would have
resulted in overruns when there were problematic chars at the end of a string.
Fixes#7075 where the uninitialized array elements caused random truncation
errors. The problematic character in this case is a tab, that has no glyph as
it is a dynamic spacer. Previously this was resolved to the "missing glyph"
(the box) which had a width.
I find it highly problematic not to fall back to such a glyph, because there is
no real way to see that you're using a font that has missing glyphs. Instead
those are simply collapsed to nothing with this change (instead of being
random). This whole problem is only brought up by not guaranteeing that there
always is a glyph as was the case before where a missing glyph was replaced by
the box.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40172 a95241bf-73f2-0310-859d-f6bbb57e9c96
window with the mouse, and as such didn't take it along to the new workspace
as the cmd+F# shortcuts do. Fixes#7057.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40070 a95241bf-73f2-0310-859d-f6bbb57e9c96
back scrollbar icons and menu markers for example after they got broken when
the offset was introduced.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40019 a95241bf-73f2-0310-859d-f6bbb57e9c96
relevant parts (i.e. removes clipped or out of bounds parts) and does local
scaling in case the view rect is smaller than the bitmap rect. This avoids
sending the full blown bitmaps across when they are in the end scaled to a much
smaller representation. It's nowhere near perfect yet, but it's useable and
improves the network traffic heaviness quite a bit depending on the application.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40014 a95241bf-73f2-0310-859d-f6bbb57e9c96
support some 7 years ago...
CID 10246, 10245, 10244, 9471, 9454 and 9453 all concerning that (in the
different constructors / assignements).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39983 a95241bf-73f2-0310-859d-f6bbb57e9c96
though it's used only in the special case of running as BApplication.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39977 a95241bf-73f2-0310-859d-f6bbb57e9c96
variable names, added TODO, variable declaration on first use, simplify some
code, add missing sanity checks...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39972 a95241bf-73f2-0310-859d-f6bbb57e9c96
* CID 2500 and 2501: Check the BMessage::FindData() returns.
* Defensive programming: Take the bitmap/cursor BitsLength() into account when
copying the data back.
* Some style cleanup, automatic whitespace cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39971 a95241bf-73f2-0310-859d-f6bbb57e9c96
on a set view bitmap and are set when setting one.
* We can safe that resize_frame() call in case no view bitmap is set.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39931 a95241bf-73f2-0310-859d-f6bbb57e9c96
the data was never correctly attached.
* CID 5886 and 5887: escapements and offsets were not freed in the error case.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39930 a95241bf-73f2-0310-859d-f6bbb57e9c96
"empty glyph index" as per freetype (which is eventually called) actually is 0,
so a != 0 comparison should be correct. Untested though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39929 a95241bf-73f2-0310-859d-f6bbb57e9c96
the detected defaults with your own values.
* Implemented joining open and WEP networks - this is pretty much untested,
though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39794 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Make the S&T groups navigateable by pressing the S&T key + arrow down/up. Arrow down means to send the active S&T group to the bottom. Arrow up means to rise the bottom S&T group to the front. If no S&T group is selected, in both cases the front-most S&T group is activated.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39751 a95241bf-73f2-0310-859d-f6bbb57e9c96
thread. After fixing the internal locking of AddOnMonitorHandler in
r38235, running the AddOnManager before scanning add-ons could lead
to a dead-lock in case devices appeared while the input_server was
still initializing. This hopefully fixes#6760 and possibly also
#6819. I've tested in both qemu and on real hardware (quad-core with
3 mice, one tablet and 3 keyboards connected). I've also tested
hot-plugging devices, which still works as expected. The problem may
have already been fixed in the preceding changeset, by elliminating
an extra involved looper. Since node monitor messages were actually
received on the wrong looper, using the looper lock in AddOnManager
did not have the intended effects.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39742 a95241bf-73f2-0310-859d-f6bbb57e9c96
from AddOnMonitor. This solves a concurrency problem in the AddOnMonitorHandler
implementation which called into AddOnManager private methods on the wrong
looper thread without locking. Would have corrupted memory when unplugging
input devices during input_server initialization (so normally not encountered).
The code paths for adding devices were locking already, since those can be
called from other threads as well and this was anticipated.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39741 a95241bf-73f2-0310-859d-f6bbb57e9c96
- If the event window was set the window was moved also if the moveFocusWindow flag was not set.
- Use ProcessDirtyRegion to redraw the dirty region.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39707 a95241bf-73f2-0310-859d-f6bbb57e9c96
Now, borders that can be resize are not highlight anymore,
and it's no more possible to resize a non-resizable
(vertical/horizontal/all directions) window with the third button + CMD + ALT.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39705 a95241bf-73f2-0310-859d-f6bbb57e9c96
the normal cursor set with SetCursor(). Intended for window management
interactions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39653 a95241bf-73f2-0310-859d-f6bbb57e9c96
discriminate between the different borders and corners, there wasn't much
difference between it and Decorator::Region anymore and we can as well use
the latter.
* Added new state ManageWindowState which is entered when the mouse is over the
window and the window management modifiers are held down. When being in this
state the borders that will be resized when pressing the right mouse button
are highlighted.
* Added State::ExitState() hook for cleanup work.
* _NextState() does now call Desktop::SetMouseEventWindow() for our window when
entering a new state, respectively resets it when going stateless.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39652 a95241bf-73f2-0310-859d-f6bbb57e9c96
corners. Make sure they are added as well.
* GetComponentColors(): Added support for HIGHLIGHT_RESIZE_BORDER. We simply
shift the standard colors towards blue. Improvements welcome.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39651 a95241bf-73f2-0310-859d-f6bbb57e9c96
* dhcp_message::NextOption() now set cookie.next to NULL on exit if there is no space left
* dhcp_message::Size() now handle OPTION_OVERLOAD case
* Renamed _ToString() to _AddressToString()
* Any error message send by DHCP server will show up in syslog now
* Reorganize DHCPClient::_PrepareMessage() to make more easy to see which
option is added per message type.
* OPTION_SERVER_ADDRESS was always added to DHCP_REQUEST, which MUST NOT
in renewal and rebinding state according RFC 2131.
* add device name to resolver configuration: WIP for #6915...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39650 a95241bf-73f2-0310-859d-f6bbb57e9c96
changes. Fixes that the buttons were not drawn with the right color when the
S&T tab highlight was active.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39648 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Added ExtendDirtyRegion(), given a decorator region it extends the given
dirty region. Implemented only in DefaultDecorator yet.
- Added [Set]RegionHighlight() which allows to set/get a highlight for a
decorator region. The visual representation of the set highlight value
is up to the derived classes. The only globally defined value is
HIGHLIGHT_RESIZE_BORDER, though it's not implemented anywhere yet.
* DefaultDecorator: Added the highlight for the component as a parameter to
GetComponentColors(). Added a wrapper _GetComponentColors() with the old
interface, fetching the highlight from the base class.
* SATDecorator: Defines and interprets its own highlight value
HIGHLIGHT_STACK_AND_TILE.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39640 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Use a separate color array for the buttons, instead of using that for the
tab.
* _DrawBlendedRect(): No longer gets the focus flag, but gets a color array
instead.
* _GetBitmapForButton(): Made non-static and removed the "focus" and "object"
parameters.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39637 a95241bf-73f2-0310-859d-f6bbb57e9c96
default decorator and used it instead of Decorator::Region where appropriate
(GetComponentColors(), _GetBitmapForButton()).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39636 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Introduced a virtual GetComponentColors(), that returns an array with the
current colors for the specified component.
- Removed all rgb_color members. Replaced the ones that were actually
constant by const (or static const) ones and made use of
GetComponentColors() where the non-constant ones were used.
* SATDecorator:
- Turned rgb_color members into constants and added an overriding version
of GetComponentColors().
- HighlightBorders(): Invalidate the tab, too, as we use the border
colors for drawing the outer lines of the tab (was this intented?).
Fixes artifacts when breaking apart titled windows.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39630 a95241bf-73f2-0310-859d-f6bbb57e9c96
virtual DrawButtons().
* SATDecorator: Override DrawButtons() instead of _DrawTab(), thus saving a
good deal of code duplication.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39627 a95241bf-73f2-0310-859d-f6bbb57e9c96
field. It does that when the modifiers, the pressed buttons, or the click
target changes between the clicks, or when the distance between the click
points is >= four pixels.
* Adjusted the Window::MouseDown() and WindowBehavior::MouseDown() interfaces
and implementation accordingly (we now also pass and return click count and
click targets).
* Removed the no longer need multi-click handling from DefaultWindowBehaviour.
Fixes#6841 and #6867.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39623 a95241bf-73f2-0310-859d-f6bbb57e9c96
checking the mouse button in every case, use separate switches for the
buttons. Makes things easier to read.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39616 a95241bf-73f2-0310-859d-f6bbb57e9c96
or Cmd-Ctrl-right-click anywhere. Introduces the following behavioral changes:
* The send-to-back effect is triggered on mouse-up now. It expires after a
short time of holding the button or moving the mouse, just like the
activation effect on left-click in FFM mode.
* Depending on where the mouse was pressed, moving it will move the closest
border or corner with it, thus resizing the window. The algorithm choosing
the border/corner needs refinement. Currently the window is divided into 8
equally sized sectors corresponding to the borders/corners.
Work in progress...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39615 a95241bf-73f2-0310-859d-f6bbb57e9c96
DefaultWindowBehavior instead. DefaultDecorator uses the more appropriate
Decorator::Region.
* DefaultWindowBehavior::MouseTrackingState: Generalized the fActivateOnMouseUp
handling. It is now named fWindowActionOnMouseUp and the virtual method
MouseUpWindowAction() is called.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39614 a95241bf-73f2-0310-859d-f6bbb57e9c96
last click and reset the click count, if so. Fixes a regression introduced in
r39602 (left-click after right-click was recognized as double-click).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39609 a95241bf-73f2-0310-859d-f6bbb57e9c96
into newly introduced state classes.
* Fixed the right-click-while dragging behavior, I broke in r39602.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39608 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Implement OPTION_OVERLOAD support in dhcp_message::NextOption(). Untested.
* Comment out an ASSERT which don't compile in DEBUG mode (and make no sense for me, BTW)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39607 a95241bf-73f2-0310-859d-f6bbb57e9c96
RegionAt() just gets a point and returns which region was hit. This is in
order to move behavioral code to [Default]WindowBehaviour. I'm not happy
with this solution either, but to do it properly one would have to break the
Decorator interface into separate look and feel interfaces and reorganize the
interaction with WindowBehaviour. A task for the so-inclined reader. :-)
* Adjusted the Decorators implementations, but really tested only the default
one.
* DefaultWindowBehaviour:
- Replaced _ActionFor() method by a _RegionFor() which interprets the region
returned by Decorator::RegionAt() and converts it to a "functional" region,
i.e. combines cases we handle the same way.
- MouseDown():
- Handle the click region cases more in detail, disentangling the mouse
button cases. With the following effects:
- The middle mouse button has no effect anymore.
- Left and right mouse buttons no longer share common behavior. A right
click on a decorator button will send the window to the back.
- The window key window management modifier combo does now have precedence,
i.e. Cmd-Ctrl-click on the decorator buttons will have the same effect as
clicking anywhere in the window.
- When modifiers change between the clicks, reset the click count. Prevents
a standard click in the window followed by a Cmd-Ctrl-click from being
recognized as a double-click.
- Mouse*(): Introduced a fMinimizeCheckOnMouseUp which works similar to
fActivateOnMouseUp, just for double-clicks. The decision whether a
double-click minimizes the window is postponed until releasing the mouse
button. After moving the mouse sufficiently far or waiting half a second
without moving the mouse the window will no longer be minimized. Fixes
#6868.
- MouseUp(): Moved the primary mouse button check without the
"decorator != NULL" block. I suppose this fixes issues with the Cmd-Ctrl
actions and decoratorless windows (if those actually exist).
I can't wait to hear what things I've broken. :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39602 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Extended app_server_debug command to be able to send it, too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39599 a95241bf-73f2-0310-859d-f6bbb57e9c96
This makes the code much cleaner and simpler.
* Completely untested, though (will do that next).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39595 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Add communication part to restore and save S&T groups.
- Fix call of GetDecoratorSettings listener hook.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39534 a95241bf-73f2-0310-859d-f6bbb57e9c96
the syslog/serial output.
* Added app_server_debug command that currently just sends this command to the
specified teams.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39441 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Only use min size constraints now. If there is a clash between a window with a max size and another window with a min size the max size is ignored and the size is enlarged if needed. When removing this window from a S&T group the old size limit is restored.
Same is done for none resizeable windows.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39432 a95241bf-73f2-0310-859d-f6bbb57e9c96
in Deskbar (registrar is a background application). Fixes ticket
#6809.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39385 a95241bf-73f2-0310-859d-f6bbb57e9c96
and moved it from folder bin to servers.
The print_server uses print_addon_server now to
execute printer driver add-ons.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39357 a95241bf-73f2-0310-859d-f6bbb57e9c96
by the print_server to run a printer driver add-on.
This makes the print_server
1) resistant to add-on crashes
2) and memory leaks in add-ons
3) license of an add-on cannot influence the
license of the print_server since it does not
directly load the add-on anymore; might be
an issue with GPL printer drivers like Gutenprint
Transport add-ons directly loaded by the print_server
should be moved outside the print_server too.
Right now I am not aware that the transport add-ons
in the repository have any of the issues.
The Gutenprint driver has 2 + 3 that was the main
motivation to implement that now.
Disabled for now until the launch issue is resolved.
BRoster does not find the application by its
signature until it is opened in Tracker once.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39346 a95241bf-73f2-0310-859d-f6bbb57e9c96
invocation code from class Printer into new class
PrinterDriverAddOn.
Refactored code a little bit.
* Removed duplicate code from class PrintServerApp
and use methods from class Printer instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39319 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Use BAutolock class.
- Write the correct sync time in micro seconds.
- Fix the event dispatching in the worker thread.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39171 a95241bf-73f2-0310-859d-f6bbb57e9c96
which triggers waiting on the retrace semaphore in app_server
just before drawing the bitmap. This potentially removes any
additional delay when doing this client side. Completely untested.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39097 a95241bf-73f2-0310-859d-f6bbb57e9c96
recognizes a double click as double click if the action didn't change.
* This fixes bug #6699.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39064 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Use layout API in preview printer add-on.
* Use layout API in some dialogs in PDF Writer.
* Removed unused class PrinterSetupWindow from PDF Writer.
* Improved layout in print_server configuration dialog.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38986 a95241bf-73f2-0310-859d-f6bbb57e9c96
passed to the pixel format methods. Don't use a dummy color
for drawing dots. (Untested, but should fix Clockwerk time
line objects drawing)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38955 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Make sure that turning off anti-aliased font rendering
also works when subpixel-anti-aliasing is used.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38831 a95241bf-73f2-0310-859d-f6bbb57e9c96
the ServerPicture calls those itself from SetOwner().
Since there are asserts in ServerPicture about fOwner,
it was easiest to fix the code by using *only* SetOwner()
from within ServerApp to add or remove pictures.
* SetOwner() was broken, since it called a method which
potentially removed the last reference and then still
accessed memory of the now free'd ServerPicture instance.
The easiest fix is to just increase the reference count
temporarily.
* SetOwner() wrongly returned false when the new owner was NULL.
* NestPicture() should simply add it's own reference. There
are two places where it is called, and only one of them
added the extra reference. The other one only acquired the
implicit reference that the ServerApp owns, but pictures
that remove nested children remove a reference from them.
This could leave stale pointers around of course.
* Added more asserts about fOwner.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38484 a95241bf-73f2-0310-859d-f6bbb57e9c96
to avoid someone drawing into it at the same time. In a debug
build, this avoids hitting an ASSERT.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38478 a95241bf-73f2-0310-859d-f6bbb57e9c96
message loop more clear, both in the code and also via
comments. I get the occasional drop into the debugger
because MultiLocker says the Readlock has been acquired
twice. I don't see how it is possible from the code and
it could be another bug in the MultiLocker debugging
facilities, but the code should be clearer now anyway.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38477 a95241bf-73f2-0310-859d-f6bbb57e9c96
the same mechanism needs to be applied as for Decoders,
so that user add-ons are always found before system
add-ons.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38360 a95241bf-73f2-0310-859d-f6bbb57e9c96
to return false. This happened when searching decoders in
/boot/common/add-ons/media/plugins, which does not exist on a default image
and thus broke finding *any* decoder, it only worked when you had some in
/boot/home/config/add-ons/media/plugins... sorry and thanks Alex Wilson
for the heads up!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38347 a95241bf-73f2-0310-859d-f6bbb57e9c96
we need to remove its globally registered formats
from the FormatManager.
* When searching decoders for a given format, we need
to search by add-on directory, since the decoder
list will not stay sorted once some have been removed
or added after the initial add-on scan.
These fixes make it finally possible to rebuild media
plugins and have the media_server pick up the changes
without needing a restart.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38338 a95241bf-73f2-0310-859d-f6bbb57e9c96
missing any way to remove previously registered formats.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38337 a95241bf-73f2-0310-859d-f6bbb57e9c96
The fWriterThread and fWriterStackBase were reset in WriteUnlock()
without holding any lock. While running a DEBUG compile of app_server,
I ran repeatedly into an assertion in the mouse event thread, that
it was not the write lock holder anymore when calling WriteUnlock().
My theory (also discussed with Axel, thanks!) is as this: Some random
thread holds the write-lock. The mouse event thread is allowed to run
when that thread releases the write-lock, but the thread is rescheduled
before it resets the write-lock-holder values (B_DO_NOT_RESCHEDULE only
means rescheduling is not forced, but it may happen anyway). Then the
mouse thread runs, acquires the write-lock, sometime later the original
thread continues to run, and completes WriteUnlock() with resetting the
holder values. When the mouse thread continues to run and eventually
calls WriteUnlock(), the holder values do not match anymore. The theory
is further confirmed by the fact, that fWriterThread was always -1 in the
assert and not some random other thread.
As mentioned, only affected DEBUG builds of app_server, in release builds,
another lock protects the holder values.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38331 a95241bf-73f2-0310-859d-f6bbb57e9c96
to BEntry and back to entry_ref. This ommits a check to
BEntry::InitCheck(), but AddOnMonitor should pass us only valid
entry_refs.
* Removed no longer valid TODO.
TODO: There is still some problem with reloading add-ons, once they have
been reloaded, they fail to instantiate properly, as if the entry_ref
is pointing to the wrong node.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38328 a95241bf-73f2-0310-859d-f6bbb57e9c96
It unloads any media_format mappings when an add-on
becomes unavailable, and consequently reloads the
supported formats and similar when the same add-on
becomes available again. Previously it would only
load previously unkown add-ons by node-monitor
events (unkown name). What also works is that user
add-ons shadow/hide system add-ons when installed,
and the system add-on will become effective immediately
when removing the user add-on again. One thing to
note is that certain IDs will not stay consistent.
I am not aware of an application for which it could
be a problem, most should rememeber codecs by name.
In any case, I only tested add-on events a lot, and
not so much the effects of unstable media_file_format
IDs, so it's possible there are regressions, though
only when installing new versions of add-ons, which
previously mostly required a media_server restart
anyway.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38282 a95241bf-73f2-0310-859d-f6bbb57e9c96
* make BDADDR_* macros refer to value types instead of addresses
* adjust all interfaces using bdaddr_t* to use (mostly const) refs instead,
which IMHO makes the interface & code clearer
* that got rid of a couple of const incorrectness casts
* some cleanup along the way
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38265 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Don't acquire the read-lock in WindowForClientLooperPort,
since MultiLocker does not support nested read-locks.
Use an assert instead, however the method does not appear
to be used anywhere at the moment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38224 a95241bf-73f2-0310-859d-f6bbb57e9c96
had several problems: First of all it duplicated the FontCacheEntry
retrieval and locking code. Second it was really slow to do the whole
lookup for every single glyph. Third is used the FontManager without
locking, which could result to app_server crashes, mostly at startup,
while the FontManager thread was scanning the fonts and the glyph
layout was already using it. Forth it dereferenced a FontStyle
pointer without checking it against NULL. And lastly it didn't use
the font size of the original font for the fallback font.
The new algorithm addresses not only these, but also puts the glyphs
which are unsupported by a font and retrieved from the alternative
font, into the FontCacheEntry of the original font, so that the
HasGlyphs() check succeeds the next time around and does not need to
use the fallback algorithm anymore. There is also less manual management
of locking and FontCacheEntry recycling, this is now taking care of by
FontCacheReference objects on the stack.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38154 a95241bf-73f2-0310-859d-f6bbb57e9c96
which can do an alternative lookup of the glyphCode to glyphIndex
and who's FontEngine is used to retrieve the GlyphCache object.
The glyph however is inserted into the Cache of the original entry.
* GlyphCache objects are no longer looked up by index, but by charCode,
which should not be a functional change, but allows to lookup glyphs
from the cache for which the underlying FontEngine does not have
a code to index mapping.
* Fixed an operator precedence bug in the signature generation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38153 a95241bf-73f2-0310-859d-f6bbb57e9c96
- First unregister listener reload decorators and then register new listener.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38070 a95241bf-73f2-0310-859d-f6bbb57e9c96
the window. This closes ticket #6429.
* Got rid of useless _Extract*() methods. Also removed the _ActionFor() variant
that only took a message.
* Removed unused "invalidate" variable in MouseUp().
* Coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37998 a95241bf-73f2-0310-859d-f6bbb57e9c96
"clicks" field of the mouse message as everywhere else.
* Renamed Decorator::Clicked() to MouseAction().
* Minor style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37996 a95241bf-73f2-0310-859d-f6bbb57e9c96
from ticket #6415: the drawing offset of a BPicture
becomes the new drawing origin.
* This should also close ticket #6008.
* Also the Preview printer does the clipping now correctly
outside the "printable rectangle".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37939 a95241bf-73f2-0310-859d-f6bbb57e9c96
a second click on the right mouse button will raise the window again.
* Desktop::SendWindowBehind() now locks a bit earlier, as some of the things
it did shouln't really be done without holding a lock (depending from where
it was called).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37922 a95241bf-73f2-0310-859d-f6bbb57e9c96
- First reload decorators and then the listeners. (my SAT listener caches the decorator when it is registered so the new one should already be loaded)
- Make the Desktop all window list accessible, help full when a listener is registered and want to iterate over the existing windows.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37912 a95241bf-73f2-0310-859d-f6bbb57e9c96
* It feels much better, but maybe raising the window should only happen on the
second click instead?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37894 a95241bf-73f2-0310-859d-f6bbb57e9c96
desktop setting, following bug #6420.
* Now, only windows with the flag set have to implement their activate behaviour
itself (as Tracker does), the desktop setting no longer has an influence on
this.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37885 a95241bf-73f2-0310-859d-f6bbb57e9c96
(using ConvertToScreenForDrawing()) before drawing a BPicture, both directly
and inside another BPicture. Restore the drawing origin when drawing a nested
BPicture (like we already do when drawing it directly).
Fixes#6008.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37824 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Reload all decorators when the decorator has changed in the DecorManager.
- Update copyrights.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37801 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Add a minimize method to desktop.
- Make _CurrentWindows public.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37800 a95241bf-73f2-0310-859d-f6bbb57e9c96
interface - this caused quite a number of changes.
* Network interfaces, and its addresses are now reference counted (not yet
complete, though, InterfaceAddresses need to hold references to their
interface as well).
* There are two known regressions of this commit that I will fix later:
- you cannot remove interfaces anymore
- IPv4 multicast was broken anyway, but now it's disabled, too.
* Moved a device_interfaces.cpp|h out of interfaces.cpp.
* The datalink layer chain is now instantiated per domain per interface,
not just per interface anymore.
* When a buffer reaches the network layer, it has no known interface yet, ie.
the ipv4|6|whatever modules need to set this manually.
* Added more debug output, and some new debugger commands, the control option
is now printed in clear text.
* Added hash_address() function to the address modules. Added "const" to
set_to_defaults() where needed.
* Fixed net_buffer's restore header functions offset use as reported by Atis.
* Improved buffer dump output, use the domain module to print the address if
available.
* Moved net_buffer::type into the union, as it's not needed by the upper layers
anymore.
* Moved IPv6 specific code from {add|remove}_default_route() to where it
belongs, but disabled it for the time being.
* Completely discarded useless ipv4_datagram module.
* Added ping6 to the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37794 a95241bf-73f2-0310-859d-f6bbb57e9c96
userland code to take this into account (the kernel would just cut off the
name).
* This closes ticket #6280.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37689 a95241bf-73f2-0310-859d-f6bbb57e9c96
* dstcheck : the generated catalog is now 'dstcheck.catkeys' instead of 'en.catkeys', so that it does not conflict with
other localized apps in the bin/ folder.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37617 a95241bf-73f2-0310-859d-f6bbb57e9c96
This has to be taken into account when fixing the other Decorators!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37529 a95241bf-73f2-0310-859d-f6bbb57e9c96
* FontCacheEntry will not use the "empty" glyph from fonts anymore, so squares are not drawn anymore
* GlyphLayoutEngine will try the VL Gothic font, if the requested font doesn't have any glyph fo the requested character. The
caching for the fallback is suboptimal, and the font choice quite limited, but this allows at least japanese text to display
properly on haiku out of the box.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37413 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Remove the old one from the locale librairy, with some cleanup
Known regressions :
* readonlybootprompt will no longer update the locale settings : the
method used messed with internal undocumented things
* external localized apps (webpositive for example) will not run
anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37336 a95241bf-73f2-0310-859d-f6bbb57e9c96