History log of /haiku/src/servers/app/ServerApp.cpp
Revision Date Author Comments
# 0b850880 12-Apr-2024 Máximo Castañeda <antiswen@yahoo.es>

app_server: keep pinned fonts accessible by ID after removal

On font removal styles may still be referenced by views, pictures or
whatever else. In that case, what we were doing had the following
effects:
- The style is still available through the family. So it is still
returned when listing fonts.
- The style is not available by ID. So a few app server messages will
fail, including those for string width or character escapements.
Moreover, if the removal was due to an update, adding the style again
fails because we already have one by that name. If all the old
references are finally dropped, we end up without the old nor the
updated style.

We now do the opposite: until all references are dropped, a style can
still be fetched by ID (that is, by an object that loaded it before
being removed), but it is not listed anymore (so it won't be given to an
app loading a font by name or by changing the style of a font of the
same family).

Fixes: #18868
Change-Id: Ia64744afeb9297fd446e437d08636733b6dc0aec
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7633
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# a31ade72 01-Mar-2024 Máximo Castañeda <antiswen@yahoo.es>

BFont: remove default values from ambiguous method

Noticed by Joachim Mairböck after I hastily merged change 7402.

Also add named variation instance selection for fonts loaded from memory
areas like there already is for files.

Change-Id: I76de22181dc39559956c25987165be2f8a8c4a37
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7493
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# d0f06357 14-Feb-2024 Jérôme Duval <jerome.duval@gmail.com>

app_server FontManager: load all fonts and named-variants from a file

BFont::LoadFont can now use an index (0-based) and an optional named-instance (1-based)
to select the font variant from a file.
BFont::LoadFont can also use an index when loading from memory.

Change-Id: I0ce3eb6cc77d32cf43847416561eafe3063ca693
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7402
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Máximo Castañeda <antiswen@yahoo.es>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# e70df3f7 14-Feb-2023 Máximo Castañeda <antiswen@yahoo.es>

app_server: AppFontManager does not need a BLooper

Saves at least a thread and a few semaphores per app.

Change-Id: Ied43e5944471918b34b897722346a25d159090df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6073
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 6ae6a38e 11-Feb-2023 Máximo Castañeda <antiswen@yahoo.es>

app_server: refactor font managers

Move common add/remove code to the base class and improve encapsulation.
Loading FreeType is the responsibility of the global font manager.
Rename FontManagerBase back to FontManager.

Change-Id: I9396112f01583e19d03011106fd1fa1e37958ee8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6072
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 88b5bdf7 10-Feb-2023 Máximo Castañeda <antiswen@yahoo.es>

app_server: fix dangling references in user fonts

Change-Id: I213959b407245c6c0eb1208ebea7145f699366fa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6061
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# a34c877f 07-Feb-2023 Máximo Castañeda <antiswen@yahoo.es>

app_server: FontStyle lifecycle

FontFamily is babysitted by the FontManager. It doesn't own FontStyle
references, there's no place in it to release them.

FontManager owns a reference to the FontStyle, and it is in
fStyleHashTable. Putting a style there acquires a new reference, so we
can release the one from the new style. Removing a style from the map
releases the reference. We need to clear the map before shutting down
FreeType to get rid of our last references and let the styles die now
instead of afterwards to avoid double freeing the faces.

These solve the new crash from the previous patch. It didn't crash
before because even after the map was destroyed there were still
dangling references to the styles.

On removing a user font, the style will remove itself from the family
through the manager if that was the last reference, and the manager will
remove and delete the family if it has no more styles.

Change-Id: I460ff830fa8a8a5adb90dc8ea12120e1e50a5912
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6052
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 4f52a155 16-Jan-2023 Dale Cieslak <dcieslak@yahoo.com>

BFont: Minor code cleanup and autolocking for AppFontManager

* changed explicit locking to use Autolocker for gFontManager/fAppFontManager
in ServerApp, per comments in https://review.haiku-os.org/c/haiku/+/4790
* changed BFont::LoadFont (memory version) to use size_t for size and offset
* no functional changes

Change-Id: I438a4975d5bb1b2fa17bc54e9e171c31dadfeec5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6003
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 85b82f85 19-Jul-2022 Dale Cieslak <dcieslak@yahoo.com>

BFont: allow loading of user fonts from disk or memory

This patch adds an API call to BFont, called LoadFont, that
takes a string path to a font file. The user fonts are managed
via a new class called AppFontManager that inherits from the base
class FontManagerBase but adds the methods to add and remove user
fonts from disk or memory. There is also a new method called UnloadFont
to remove a user font, but on exit of an app all user fonts should be
automatically cleaned up.

Global/system fonts are managed by the GlobalFontManager, which is
a new class that also inherits from the base class FontManagerBase,
replacing the old "FontManager" class.

A maximum of 128 user fonts may be loaded, and memory fonts
may not exceed 20MB.

There's also an overloaded version of LoadFont that accepts
an area_id and loads the font from memory. A size and offset may
optionally be provided to allow for an area that contains more
than just a font.

Change-Id: I6add42bdf0c0cefc0e2e2a4984fd848c3e7269e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4790
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 12ae5308 23-Jul-2022 John Scipione <jscipione@gmail.com>

App Server: Style fixes related to font updates

Reorder font defines to plain, fallback, bold, fallback, fixed, fallback.

Minor functional changes: No BeOS font fallbacks for Haiku apps.

Use FALLBACK_BOLD_FONT_STYLE instead of DEFAULT.

Change-Id: Id053fd9434e8d34290cf68af89cf58fe7811f786
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5497
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 094079b8 04-Jul-2022 Dale Cieslak <dcieslak@yahoo.com>

BFont: Implement BFont::BoundingBox

Extracted as separate patch from CR 4790; implement BFont::BoundingBox
as it was in BeOS. Returns a BRect that encloses any character in a
font, scaled by the font size.

Since the FreeType bbox is only valid for vector outlines, for bitmap
fonts, return a BRect with the dimensions of the bitmap font that is
closest to the font size.

Tested with CharacterMap. Will update CharacterMap to use the bounding
box once this change is landed.

Note that bitmap font rendering doesn't appear to work at all.

Change-ID: I8fc42ca0ddc0c77e04e0216001cd17e086ec7495
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5431
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 0cdb3238 11-Dec-2021 Augustin Cavalier <waddlesplash@gmail.com>

app_server & Application Kit: Fix bitmap cursor handling.

Using a memcpy here is supremely dangerous, because we are writing to
an app_server buffer that we chose the length for, but using a size
that came from the client. And, indeed, because the buffer can contain
padding if the BBitmap was allocated with a non-standard BytesPerRow,
we will overflow the buffer and corrupt memory, causing app_server to crash.

So, instead, reorganize parameters a bit, and pass BytesPerRow along
with the other data needed to instantiate the bitmap, and then use
ImportBits.

Fixes an app_server crash I triggered with the experimental libX11
compatibility layer.


# 60d30785 27-Aug-2020 X512 <danger_mail@list.ru>

app_server memory management fixes: use BReference

Use BReference for more automated reference counting in app_server,
fixing some use-after-free and other problems.

Extracted from https://review.haiku-os.org/c/haiku/+/2695

Change-Id: I141bb248229405896b29feff3338447f7257b0b4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3175
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 06ed32b8 05-Oct-2020 Jérôme Duval <jerome.duval@gmail.com>

BCursor: add a constructor with bitmap and point

* enhancement #15169
* get_mouse_bitmap(): also reads the colorspace from app_server.
* docs and tests

Change-Id: Iba63f8a2789530ae596c30b92f14828f31761d98
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3292
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 8b2b3010 18-Jul-2020 Adrien Destugues <adrien.destugues@opensource.viveris.fr>

app_server: save/restore screen brightness settings

The brightness is saved in the screen configurations of the first
workspace. For now, all screens get the same brightness (I can't get
screen IDs to work today). Since we only support setting the brightness
for laptop displays for now, this shouldn't matter. It can be fixed when
app_server gets actual multiple display support.

Fixes #14254

Change-Id: Ib33aa65a73407a65bd469d0efa8542210fec02d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/362
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# b78a83eb 29-Jul-2020 Adrien Destugues <pulkomandy@pulkomandy.tk>

app_server: Style fix


# 638f8647 07-Jun-2020 X512 <danger_mail@list.ru>

app_server: fix crash caused by missing locking

Change-Id: Ib9b0c2282f947c0c6ac61fc3e97f9eca7af8dda4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2891
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>


# 565155af 27-Jul-2019 Augustin Cavalier <waddlesplash@gmail.com>

Remove unnecessary usages of BLocker::Sem().

Most of these should have been BLocker::InitCheck() anyway.
The one that was actually using the sem (MessageLooper)
should just store the name parameter, which simplifies
things anyway.

Done as a result of a branch where I'm experimenting
with making BLocker not even create a semaphore in
"benaphore" mode.


# 629397f2 01-May-2019 François Revol <revol@free.fr>

Add basic support for loading ControlLook add-ons

app_server just passes the add-on path around.

Maybe we should make sure the add-on can be loaded when setting it.

Change-Id: I3acd3299782a22c1666bd5435dbf3d8053e359fa
Reviewed-on: https://review.haiku-os.org/c/1430
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 37523090 28-Dec-2018 Michael Lotz <mmlr@mlotz.ch>

app_server: Cleanup error check logic to be more consistent.

Some of these only returned generic errors.


# 8071db32 28-Dec-2018 Michael Lotz <mmlr@mlotz.ch>

app_server: Add char limit to GlyphLayoutEngine::LayoutGlyphs().

Many of the consumers fill in data into preallocated arrays. Some of
them already ignored values past the array size manually, some didn't.

Add a maxChar argument and set it from the incoming array sizes for
the various consumer cases.


# 64a11edb 28-Dec-2018 Michael Lotz <mmlr@mlotz.ch>

app_server: Make more use of BStackOrHeapArray.

Variable length arrays on the stack are always risky when the length
is indeterminate as they can easily overflow the stack. Replace their
use by BStackOrHeapArray, fixes #6354.

Also replace most other dynamic allocations by BStackOrHeapArray as
it is more convenient and may avoid unnecessary dynamic allocations.

Add allocation checks and early returns to all places while at it.


# 22ce5525 28-Dec-2018 Michael Lotz <mmlr@mlotz.ch>

app_server: Fix invalid cast of int32 to size_t array.

Make ServerFont::GetBoundingBoxesForStrings() use size_t.


# 9dad3fb4 28-Dec-2018 Michael Lotz <mmlr@mlotz.ch>

app_server: Style and comment cleanup, no functional change.


# 3a2b67b5 21-Nov-2017 Adrien Destugues <pulkomandy@pulkomandy.tk>

Support for configuring screen backlight

Accelerant interface:
Introduce new hooks B_SET_BRIGHTNESS and B_GET_BRIGHTNESS. Brightness is
a float in the 0..1 range.

App_server:
Forward brightness things between BScreen and the accelerant.

intel_extreme:
Implement the hooks. Note that this only works for laptop panels, but
the driver will pretend to support it in other cases as well.

Screen preferences:
If the accelerant supports the B_GET_BRIGHTNESS hook, allow to set
brightness with a slider. Otherwise, the slidere is hidden and these
changes aren't visible.


# 9b6b158b 10-Mar-2016 dsizzle <dcieslak@yahoo.com>

Implementation of BFont::Blocks

BFont::Blocks is now implemented in ServerFont, via a call through the
app_server. It uses fontconfig to iterate through a charset of a font
and stores the defined blocks in a bitmap.

A new API was added, BFont::IncludesBlock, that will allow for arbitrary
testing of a given Unicode block. Since nothing is cached, searching
through an entire charset for a series of Unicode blocks can be quite
slow. In a given block there may be only 1 or 2 characters actually
defined so every character within a block needs to be checked until one
is found, which in a degenerate case will mean the entire block is
checked.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>


# f744935b 04-Aug-2016 Axel Dörfler <axeld@pinc-software.de>

app_server: Fixed broken ServerApp allocation.

* Did not use std::nothrow, but exceptions were not catched.
* MessageLooper::Run() now returns a status code.
* There are a lot more cases of a new without nothrow that need to
be investigated.


# 6331a6bd 08-Mar-2013 Axel Dörfler <axeld@pinc-software.de>

app_server: The client memory allocator is now reference counted.

* Not sure if cursors could also have triggered this, but the memory
allocator can now outlive its ServerApp.
* However, this may also reveal cases of memory that is not freed
correctly.


# 7f9368ca 09-Dec-2015 looncraz <looncraz@looncraz.net>

Set*UIColor, etc.

The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.

BView gains:

HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()

BWindow gains a simple helper method:
IsOffscreenWindow()

BMessage gains:

AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()

Previous private ColorTools methods are made public and moved into GraphicsDefs:

mix_color, blend_color, disable_color

These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.

In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR

These changes are documented in their proper user documentation files.

In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.

On the app_server side, the following has changed:

Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.

Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.

In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.

Decorator changes are live now, which required some reworking.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>


# 35d6e0fe 28-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Add new classes required for picture clipping

* agg_clipped_alpha_mask is a modified version of agg alpha mask class,
allowing us to offset the mask bitmap to follow the view position, and
also allows "inverse" clipping, where everything outside the bitmap is
considered inside the clipping region.
* AlphaMask is a container class keeping the ServerPicture, it's bitmap
rendering, and other relevant information. It will be used to save and
restore the clipping picture as part of the view state.
* Because these classes introduce more coupling within app_server, it's
not possible anymore to split out tst_app_server from
libtestappserver.so. Instead, move everything to libtestappserver.so,
except the things that actually need to not be there (to avoid
interferences with the host API). As a result, the previously introduced
stub cpp file to work around this problem isn't needed anymore.

The design for all this (and the previous commit) is Stippi's work.
Thanks for the advice and implementation hints!


# c2dcc4d5 22-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Get test_app_server to run again

* We should have the buildbots compile this to make sure it still works
* I had to split two ServerApp methods to a searate C++ file to link
them in libtestappserver.so
* some fixes related to the switch to PM and better hybrid support in
jam rules; moving of MIME stuff from registrar to storage kit, merge of
Locale Kit and ICU in libbe, and a few more.
* Modified the test_app_server hwinterface and rdef file so it is not a
background app, and the window isn't floating. Otherwise, hiding the
window would leave you without a way to recover it.


# f4c2f7eb 10-Jan-2014 Jonathan Schleifer <js@webkeks.org>

Remove variable length arrays of non-PODs.

Variable length arrays of non-PODs are not part of the C++ standard, but
a GNU extension that never worked correctly. Instead, BStackOrHeap array
is used now, which makes sure that it's not too big for the stack, calls
all constructors and is valid C++.


# 4f96ace6 02-Apr-2013 Axel Dörfler <axeld@pinc-software.de>

app_server: detach client allocator on quit.

* This prevents sending out notification to applications that are already
gone, and should thus fix #9116 according to John.


# 3fed1a15 05-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Get app_server working on x86_64.

With this commit, app_server now compiles and runs at boot! Nothing
particularly interesting happens, just the blue background and a mouse
pointer. Remote backends are broken and not compiled in, see #8834.
Note that it won't be possible to build this quite yet, need to get
the FreeType package uploaded.


# 8e2140fa 29-Apr-2012 Axel Dörfler <axeld@pinc-software.de>

Fixed a large client side memory leak for app_server memory.

* The areas allocated for BBitmaps were never deleted, even though the
app_server deleted its part when the memory got freed.
* This resulted in a constant memory increase if the application in question
would operate on many changing large bitmaps, like photos.
* Since the bitmaps are reference counted, we don't actually know when to delete
the areas, so that the app_server now notifies the client whenever that is
possible.
* This might fix #6824.


# a0e9f8e2 04-Mar-2012 Stephan Aßmus <superstippi@gmx.de>

Fixed wrong assert and locking when using Workspace objects.

* The assert in the Workspace constructor was definitely for the
wrong lock. One should be holding the all window lock either
in read or write mode. The Desktop message loop lock should be
unrelated.
* Added boolean to the constructor which controls the assert.
* Added documentation to Workspace class, since it's not at
all obvious how this is intended to be used.
* Fixed ServerApp to lock the Desktop correctly when using
Workspace desktop colors.


# 6c40fc5d 21-Jan-2012 czeidler <haiku@clemens-zeidler.de>

Reconnect BApplication and trigger reconnect of all BWindows in an application.
* handle bitmap reconnect request in the app server


# b46615c5 19-May-2011 Stephan Aßmus <superstippi@gmx.de>

Applied patch by Joseph "looncraz" Groover from ticket #7445.
This changes how Decorators are managed and applied. The app_server
no longer scans and maintains the available ones himself, but is
simply asked to load a Decorator add-on from a provided path.
The Decorator scanning is moved into DecorInfo and DecorInfoUtil,
private classes in the InterfaceKit. The bin command 'setdecor'
uses those.
I cleaned up all the coding style violations that I could find,
removed chunks of code which didn't make sense (if you never put
a NULL pointer into a list, you don't need to check for this and
so on) and also cleaned up other passages for improved clarity
and simplicity.
I also tested the functionality and it works fine. Would even be
Ok to include in Alpha 3, IMHO. Thanks for the patch!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41581 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3b1679f9 23-Dec-2010 Michael Lotz <mmlr@mlotz.ch>

* CID 8120: The size supplied to the attach call was the one of the pointer, so
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


# e3feb1f8 23-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* Added a new AS_DUMP_BITMAPS command.
* 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


# 1d219b3a 15-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* Added AS_DUMP_ALLOCATOR command that dumps an applications memory allocator to
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


# 128f46a0 15-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* Automatic whitespace cleanup, no functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39440 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4177bfe6 31-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

* AppendPicture() and RemovePicture() are weird, since
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


# 5911196b 31-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

Reading the contents of the screen requires the exclusive lock
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


# bb86786a 28-Jul-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

- Make _Windows public.
- 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


# e4c638f6 15-Jul-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

ServerApp::Quit() was hiding MessageLooper::Quit() due to the default
paramenter, causing warnings when compiling with gcc4.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37526 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33394b85 16-May-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Wim van der Meer: Added get_mouse_bitmap() global method to
InterfaceDefs.h and corresponding implementation in the app_server. Thanks a
bunch! Closes ticket #5978.

A note to those using "update-all" with hybrid builds - the alternative GCC
system libs will not be updated this way, and this and Wim's last patch
change the libbe <-> app_server interface. You need to manually update the
respective libbe.so, or do a clean build, otherwise apps for the other GCC will
not start anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36830 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c73ffa1 14-May-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Wim van der Meer: Implemented global Interface Kit function to retrieve
the current mouse position and pressed buttons. I've changed the return code
to status_t and added anal error checking, most of the rest of the file is not
doing it, though... :-) Thanks, Wim!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36811 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0a51dbde 02-May-2010 Axel Dörfler <axeld@pinc-software.de>

* Unified the Desktop and ServerApp AS_ACTIVATE_WORKSPACE to work in the same
way.
* Use that newly exposed feature of taking the focus window to the new workspace
when using the Ctrl-Alt-Shift-Arrow shortcut.
* This fixes #5675.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36585 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b13b0b0f 11-Apr-2010 Ithamar R. Adema <ithamar.adema@team-embedded.nl>

* Make sure LinkSender knows team ID of receiving team; this fixes the >64k ServerLink transfers.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36154 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8b56f14a 12-Mar-2010 Stephan Aßmus <superstippi@gmx.de>

Fixed debug build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35820 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 87e7b978 15-Feb-2010 Axel Dörfler <axeld@pinc-software.de>

* Fixed race conditions in the server's bitmap/picture handling: the objects
are now removed from the maps as soon as the client deletes them. This also
makes the "client reference" mechanism superfluous I introduced earlier.
* ServerApp::SetCurrentCursor() must always call Desktop::SetCursor(), since it
is also called whenever the current application changes. This fixes the cursor
almost never changing.
* Renamed ServerPicture::Usurp()/StepDown() to PushPicture(), and PopPicture().
* Also, they now acquire a reference to the picture in question (ie. the picture
you get from PopPicture() also owns a reference you need to free).
* ServerApp::CreatePicture() may fail, too. This case is now handled in the code
that calls it.
* Previously, the ServerWindow tried to process up to 70 messages in one go.
That obviously caused bug #4709. Now, we have the additional requirement to
not hold the desktop lock for longer than 25 ms. I haven't tested it with
Kaleidoscope yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35472 a95241bf-73f2-0310-859d-f6bbb57e9c96


# afad65b2 19-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Bitmaps and pictures now maintain their client reference independently;
clients can no longer release more references than they own.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34130 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4b0459b2 04-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Refactored ServerBitmap a bit: it now inherits from Referenceable instead of
roling its own solution.
* Also removed BitmapManager::DeleteBitmap() - you only call
ServerBitmap::RemoveReference(), and that one will notify the manager if
needed.
* Some more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 85a7877f 04-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* ServerApp's bitmap and picture handling was completely broken, as it ignored
concurrency as well as reference counting, causing occasional crashes and
memory corruption.
* ServerPicture now subclasses Referenceable, and will notify its owner when
it's going to be deleted. This might bring some regressions, although I
couldn't spot anything wrong yet.
* ServerBitmap will now also notify its owner when it's going to be deleted as
well.
* Switched from the former picture/bitmap lists to a std::map. This also solves
the issue of not checking whether or not the bitmap/picture actually belongs
to the ServerApp (before, all apps could access and delete all
pictures/bitmaps)
* Introduced a new fMapLocker that guards the new maps.
* ServerWindow now uses GetBitmap()/GetPicture(), and gives up its reference
after use.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33876 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3d2dfb86 04-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* More cleanup, improved error return codes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33872 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 926e63c8 22-Oct-2009 Brecht Machiels <brecht@mos6581.org>

* added click to focus mouse mode; right-click for bring-to-front and send-to-back
(might cause some regressions in FFM)
* made accept first click user configurable
* updated the Mouse preflet to use the layout kit
* removed the warp and instant warp modes from the Mouse preflet
* changed internal representation of mouse modes (warp modes moved)
* coding style fixes



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33732 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9fe35223 26-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* BWindowScreens had no sychronization mechanism whatsoever - since the
workspace activation message was asynchronous, whether or not the
BWindowScreen stopped drawing in time was pure luck (this also caused crashes
with the VESA driver, as that one unmaps its frame buffer during mode switch).
Introduced a new AS_DIRECT_SCREEN_LOCK protocol for this.
* In the long term, we should let BWindowScreen use the same mechanism as
BDirectWindows, though.
* Removed superfluous locking in BDirectWindow::_InitData().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32746 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8bca36b1 27-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed locking order reversion as spotted by Stefano.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32744 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 78ca6157 27-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Changed AS_GET_SCREEN_ID_FROM_WINDOW as well as AS_SCREEN_GET_MODE to no
longer hold the window lock. There is now a lock that guards screen changes
in particular. This fixes the deadlocks seen in apps using BDirectWindow.
* All direct window handling now sits in the Desktop class -
ServerWindow::HandleDirectConnection() is never called from anywhere else
anymore. Furthermore, it's now only called when actually needed.
* Resize/move actions now always send a B_CLIPPING_MODIFIED flag, too.
* When the screen changed, the driver state is supposed to be B_MODE_CHANGED,
not B_SCREEN_CHANGED (which is a message constant).
* Direct windows are no longer suspended too late on screen changes.
* Removed unused members of DirectWindowData, and cleaned it up a bit.
* Made MultiLocker's default, and copy constructors private - I accidently
used them, causing the ASSERT_MULTI_*LOCKED() macros to fail.
* Added Unlock() to AutoWriteLocker as well.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32742 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fe9c291b 24-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Since ServerWindow::Window() can also be NULL in case the window hadn't been
added to the Desktop yet, we better make sure in AS_GET_SCREEN_ID_FROM_WINDOW
that this is not the case.
* Removed the now superfluous ServerWindow::IsOffscreen() again.
+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32653 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f277acc9 22-Aug-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Don't crash the app server if the user calls BScreen(BWindow *) supplying
an offscreen window (Magnify does that, and that's the cause of ticket #4304).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32611 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 91d5822a 21-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* The code to handle AS_GET_SCREEN_ID_FROM_WINDOW did not lock the desktop,
which got unnoticed since the former Desktop::ActiveScreen() never changed.
This fixes bug #4301.
* Also fixed a possible deadlock on application crash with a kWindowScreenFeel
window; the locking order of the Desktop's and the ServerApp's window lock was
reversed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32578 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fe7f167d 21-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Resolved a TODO and got rid of Desktop::ActiveScreen().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32566 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5e3f4c41 20-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* ServerApp now maintains a mask of workspaces with temporary mode settings,
and reverts the modes if the app goes away (ie. if it crashes).
* Desktop::SetScreenMode() also set the mode on the current screen, even if
it should have been set on another screen.
* Cleaned up the Desktop.h header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32564 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e18224cd 21-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a new AS_GET_SCREEN_FRAME function, as getting the frame via
AS_SCREEN_GET_MODE won't work with multi-screen support anymore, and is also
more overhead than needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32559 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0eed9183 20-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Rewrote screen configuration management: VirtualScreen doesn't have anything
to do with the configurations now, instead, there is a separated
ScreenConfigurations class that maintains all known screen_configurations
per workspace (and the Workspace::Private class has two of them, one for the
current modes, one for the stored modes).
* Added Desktop::{Get|Set}ScreenMode() methods, ServerApp now only calls those.
* Getting and setting of anything else than the current screen is now supported.
* This change also fixes that a temporarily set screen mode was not being
restored on workspace switch.
* Also, the Deskbar now seems to have the wrong location a lot, which is
something that should be easily fixable therefore. I will look into this next.
* Got rid of the unhandy screen_id structure server side, and in BPrivateScreen;
we now just use an int32 - the next API break should definitely replace the
screen_id with a simple typedef.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32541 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e4ea54bd 15-Aug-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Getting the screen mode should be protected, at least by a read lock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32420 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1592b6fb 11-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Made the comment a bit more useful.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32245 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6c364068 11-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleanup, no functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32244 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 69f9a367 29-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* The app_server no longer uses workspace counts internally, but only columns,
and rows.
* set_workspace_count() now uses the logic formerly found in
WorkspacesView::_GetGrid() to determine the layout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31958 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 55feb44e 28-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

BScreen uses ~0 to denote the current workspace *index*. This should fix
ticket #4144. Untested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31864 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 47d9ed62 27-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Added AS_GET_WORKSPACE_LAYOUT to get the number of columns/rows of the
workspaces.
* Added shortcuts Ctrl-Alt-{Left|Right|Up|Down} to switch to adjacent
workspaces.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31824 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5c5195ee 20-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

Fixed regression in SetViewCursor(). It wasn't possible anymore to switch
back to the system default cursor. For that cursor token, the global cursor
manager returns NULL.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31138 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 19e179ca 19-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

* Moved the implementation of SetViewCursor from the thread of the
window of the view into the application thread. This solves the
race condition with asynchronous SetViewCursor and deleting the
cursor immediately afterwards for real.
* The ServerApp now requires a reference to the current cursor,
just in case...
* Added TODOs for caching the BView token, it's currently resolved
for every single BView call that talks to the server... not good!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31133 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5d62f8e0 20-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

Make it possible to properly use operator= on BCursors by making sure the
reference counting is maintained correctly in the app_server. While reviewing
this code, I have my doubts that my previous solution for handling pending
SetViewCursor() calls is always working as it is intended.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31131 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c65cf0ae 01-May-2009 Stephan Aßmus <superstippi@gmx.de>

Fixed warning.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30563 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fc235d55 20-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

Patch based in large on work done by Philippe Saint-Pierre:
* When a BApplication is created, the interface kit globals for this team
are initialized, including be_plain_font, be_bold_font and be_fixed_font.
The plain font specifically is assumed the default font for all BViews.
A BView is not required to every set the font, it will then just be the
plain font, because the app_server already assigned it when the view is
created. Here is where the problem starts. When the system fonts change,
they change on the app_server and are picked up by new applications. Old
applications will run with the old fonts, because the values remain the
same and are stored in the already initialized be_*_font globals. So this
was never a problem. What was a problem is that the app_server would use
the current plain font for applications which were already initialized
before the font was changed, so the values in their be_plain_font would not
match the values in the server side font used when creating new views.
* This patch already prepares for the situation in which client applications
want to update their be_*_font globals. This needs to be a manual act of
the client applications, otherwise we would break existing apps. Maybe we
could automate this for BWindows with the B_AUTO_UPDATE_SIZE_LIMITS flag
and any child views with B_SUPPORTS_LAYOUT.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30282 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4fba3522 11-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed src/kits/tracker/OpenHashTable.h. The shared version in
headers/private/shared is newer, though with small interface changes.
* Removed the unnecessary Debug.h include in
headers/private/shared/ObjectList.h.
* Adjusted sources using these headers, mostly by adding missing includes.
* Lots of automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30123 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e4737a92 31-Dec-2008 Axel Dörfler <axeld@pinc-software.de>

* Added a third hinting mode: monospaced fonts only. This is especially helpful
with low resolution devices like the EeePC - small fonts can look pretty bad
when hinting is turned on, and you still have the advantage of hinting for
text editors and the terminal.
* Added a ServerFont::Hinting() method (that currently only evaluates the
global hinting setting).
* Added a TODO comment on why having global settings is not what we aim for.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28837 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 27c43a2d 08-Dec-2008 Rene Gollent <anevilyak@gmail.com>

Implement the missing pieces to handle per workspace display mode support.
Adjust Workspace view to correctly scale each workspace based on the
resolution of that workspace. This exposes one or two anomalies in other
places in the app_server code though which I wasn't able to track down.
This fixes ticket #693.




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28785 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33309cb5 05-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* BWindowScreen::_InitClone() was broken, it called the "get clone info" method
on uninitialized accelerant, but that's what AS_GET_DRIVER_PATH is for.
* This should fix #2847.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28534 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5f8c1a02 09-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Remove unused RamLinkMsgReader. Its functionality was integrated inside LinkMsgReader/Sender by Julun.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27387 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 345d8c9f 12-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26962 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ae0606be 12-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Added two more private InterfaceDefs functions: get_application_order(), and
get_window_order() will retrieve the application respectively window order
on the selected workspace.
* Moved private BeOS compatible functions (as used by the Deskbar) into the
private WindowInfo.h header.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26951 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 59e13a3f 03-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

Patch by Andrej Spielmann (GSoC):
* Simplified the subpixel related methods for the AGG "pixel format" template
interface, the ones for the solid cover simply pass through the existing
methods, so only one subpixel blending function is left which does the actual
work (this removes a lot of the previously added code)
* Implemented a new rasterizer based on the original AGG rasterizer which
implements subpixel anti-aliasing for any generic AGG vector pipelines. It
is now optionally used in Painter and AGGTextRenderer (for vector fonts, ie
rotated, sheared or big enough fonts) depending on the global subpixel
setting.
* Put all subpixel variables into the new GlobalSubpixelSettings.h|cpp
* Simplified DesktopSettings related classes a bit and renamed previous
FontSubpixelAntialiasing to just SubpixelAntialiasing.
* The private libbe functions for subpixel related settings moved from Font.cpp
to InterfaceDefs.cpp where other such functions live. They are not related
to fonts only anymore.
* Removed the subpixel related settings again from the Fonts preflet and added
them to the Appearance preflet instead.

All of the above implements subpixel anti-aliasing on a global scale, which
to my knowledge no other OS is doing at the moment. Any vector rendering
can optionally use subpixel anti-aliasing in Haiku now. The bitmap cached fonts
are still affected by the Freetype complile time #define to enable the patented
subpixel rasterization (three times wide glyphs). Vector fonts and shapes are
not affected though at the moment.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26755 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dcd70f0e 26-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

* Introduced new BBitmap flag B_BITMAP_SCALE_BILINEAR.
* When drawing BBitmaps with scaling in the app_server, use a bilinear
filter when a bitmap has this flag set. (Hope nobody objects, otherwise
I can revert or improve this. Performance can certainly be improved, since
the AGG implementation is too generic. But that goes for the nearest
neighbor implementation as well.)
* Flags are uint32, fix app_server side code to declare them correctly. Use
appropriate link methods in BBitmap and ServerApp.
* Enable the BeOS compatibility mode for B_RGB32 (works just like B_RGBA32
in B_OP_ALPHA mode).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26649 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b09e2f6f 10-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Patch by Andrej Spielmann (GSOC):
* Extend the app_server protocol by configuration options to turn
subpixel font rendering on/off and also make the glyph hinting optional
(aligning of glyph shapes to the pixel grid).
* Implement the setting in the app_server and also handle the persistency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26362 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f592fcef 01-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

stippi + bonefish:
Fixed race conditions when a ServerApp or ServerWindow is created. The
reply to the client that the object has been created successfully was
sent in the thread creating it. Preempted at the wrong time (right after
writing the message to the port) could lead to the object's thread using
the link at the same time, which would screw up all subsequent
communication via that link.
This fixes the problem that mimeset would sometimes fail when building
Haiku in Haiku (can't find the ticket). It probably also fixes #2331,
and the bug that sometimes when a window is opened (Terminal, crash
alert, shutdown window, etc.) it would come up with huge width/height
and tiny other dimension (can't find the ticket).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26192 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6ec21b4a 03-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* Implemented retrieving additional bitmap support flags by the app_server.
* Added B_BITMAPS_SUPPORT_OVERLAY flag to indicate overlay support for the
color space.
* Rewrote GraphicsDefs.h - the previous one was obvious a copy of the Be header,
including typos and strange white space. I was a bit lazy with respect to
the color space details, and mostly trusted the information provided by the
Be header else.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25793 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8a2dad71 18-Apr-2008 Karsten Heimrich <host.haiku@gmx.de>

* no need to reply, as set_ui_color won't read it anyway
Fixes some strage behavior (moving/disappearing text) in
Appearance preflet while moving a color control chooser.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25035 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ace2d5ee 02-Apr-2008 Stephan Aßmus <superstippi@gmx.de>

HWInterface::Cursor() and therefor Desktop::Cursor() accessed the
current cursor without locking, and did not add a reference while
using the cursor. I have tried to solve both problems by introducing
a simple ServerCursorReference class, which makes sure that the
reference count is properly maintained. There are only two places
where this code was even used, from within ServerApp and when taking
screenshots. Axel, you mentioned in #837 that the code is unsafe, is
this what you meant? This hopefully fixes #837, but it is very hard
to reproduce in the first place, I will close the ticket, but it should
just be reopened if ever encountered again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24741 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9dbce7a4 28-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* AS_CURRENT_WORKSPACE now holds a single window lock before retrieving
the current workspace.
* This should fix bug #1765 as far as the app_server is concerned.
* Cleanup, removed extraneous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24632 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 437b1927 08-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Removed severly outdated DebugInfoManager.
* More "layer" cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24305 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 953d895e 07-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Got rid of the "Layer" part of WindowLayer, ViewLayer, WorkspacesLayer
(now WorkspacesView), OffscreenWindowLayer.
* Renamed ServerScreen.cpp/h to Screen.cpp/h (the class was already called
Screen).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24303 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a4de7fa0 27-Feb-2008 Axel Dörfler <axeld@pinc-software.de>

* Do not trust the client! ServerFont::GetEscapements() now takes a
parameter for the length of the arrays, so that even if the char/byte
counts do not match, no memory is overwritten anymore.
This fixes bug #1862; .canna obviously contains invalid UTF-8
characters, or there is a bug in StyledEdit (or deeper) and it doesn't
call BFont::GetEscapements() correctly.
* Fixed some cases of unchecked allocations in the font handling methods
of ServerApp, added TODOs to all other ones.
* Improved error code when creating a window fails.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24160 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2e3233d7 29-Nov-2007 François Revol <revol@free.fr>

Propagate set_ui_color() up to the DesktopSettingsPrivate class.
Still needs code to save the values.
Also needs a way to access them from Decorator::UIColor(), but the DesktopSettings passed to the ctor can't be cached.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23024 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6ae06ef8 29-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

Implemented AS_IDLE_TIME, this closes bug #1593.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22758 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c2784486 15-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* Introduced a monitor_info structure and means to let it be filled by the
accelerant (or the app_server via EDID info). It's still experimental
API, and opinions are welcome.
* Moved BPrivateScreen into the BPrivate namespace.
* Rewrote Screen.h.
* Introduced a BScreen::GetMonitorInfo() method, and implemented it in the
app server as well (ie. AS_GET_MONITOR_INFO).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22563 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e2693621 30-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

Correctly implemented the missing BBitmap::GetOverlayRestrictions() on the
client and the server. This should fix bug #1490, but I haven't tested it yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22388 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f7e1df75 16-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* get rid of RGBColor usage where it is not needed, this simplified many things,
possibly making them a little faster too
* mess with decorator button size calculation to make the whole layout scale
more agreeable with the font size (no more fixed offsets/insets), but it
is work in progress
* DefaultDecorator no longer allocated the border color array, it is part of
the object now
* small memory footprint optimizations in ViewLayer, Decorator and WindowLayer


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22003 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38daa5cd 13-Aug-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Also upload/download subpictures


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21926 a95241bf-73f2-0310-859d-f6bbb57e9c96


# edac8f06 13-Aug-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented drawing of pictures inside pictures. Thanks to Marc
Flerackers for clarifying some things.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21920 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aadc09c6 11-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* fix the mixup of charCount (glyphs) versus bytes. The new font cache
implementation takes the byte count, even though it looks like this is
less efficient when the glyph count is already known (I tested to
optimize it away but it was not faster)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21891 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25a70616 02-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* moved AGGTextRenderer alongside it's pal, Painter, it felt lonely,
removed font_support folder
* ServerApp can use ServerFont::StringWidth() directly again
* more ServerFont functions implemented via GlyphLayoutEngine and
custom consumer
* extended GlyphCache data structure to hole the left/right insets
of the glyph shape between its advance width, took it from the earlier
ServerFont implementation, have not tested if that gives same result
as R5
* TODO: implement GetGylphShapes via GlyphCache, although it might not
look as clean as it does now


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21805 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1a6914c5 02-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* fixes the build, forgot to include in r21797


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21800 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38287e02 22-Jul-2007 Stephan Aßmus <superstippi@gmx.de>

* completed my changes to DrawState handling, the current DrawingState
of the active ViewLayer is now always mirrored in the Painter instance
of a ServerWindow, so that it doesn't need to be synced on every drawing
command, this was previously incomplete for font handling
* removed the DrawState parameter from all the DrawingEngine functions
* adjusted ServerWindow and ServerPicture accordingly
* made sure that string related functions used by non-drawing related
parts (ServerApp, Decorator) don't interfere with the current drawing
state
* moved AS_SYNC handling from _DispatchViewMessage to _DispatchMessage,
it is actually a window message and doesn't require fCurrentLayer to
be valid
* fixed bug #1300, fCurrentLayer was not updated when a ViewLayer was
deleted by client request which happened to be fCurrentLayer (I am now
handling it so that the parent becomes the current layer, could be
wrong)
* AGGTextRenderer is no longer using it's own scanline, which should save
a few bytes RAM, the Painter already had such an object
* StringWidth() in AGGTextRenderer is now taking the escapement_delta into
account
* Painter::StrokeLine() doesn't need to check the clipping as much, since
that is already done in DrawingEngine
* if a ServerWindow message is not handled because fCurrentLayer is NULL,
a reply is sent in case the messages needs it (client window could
freeze otherwise, waiting for the reply for ever)
* removed unused AS_SET_FONT and AS_SET_FONT_SIZE
* added automatic RGBColor -> rgb_color conversion to RGBColor.h
* minor cleanup for 80 char/line limit



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21685 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5f43b49b 18-Jul-2007 Ryan Leavengood <leavengood@gmail.com>

When I added my BuyNow screen saver to the image and ran it, the app_server
crashed. Turns out a call I use, BFont.GetBoundingBoxesForStrings was not
implemented, and worse, there was bug in how the ServerApp read the parameters
from the link. This was easy to fix to stop app_server from crashing, but it
took me a while to figure out how to implement GetBoundingBoxesForStrings.

Anyhow I implemented an initial version which works fairly well for now. I
don't think the width is quite right, but it seems to match StringWidth(), so
I guess it is good enough for now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21652 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 117b384e 27-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

* Implemented the overlay suspend/resume protocol on mode changes; not really tested
yet. Also, BBitmap::LockBits() should probably fail when the Bits() are NULL.
* The downside is that many more classes now know of each other.
* Cleaned up the work divided between the BitmapManager and the Overlay class.
* Fixed a memory leak in AS_CREATE_BITMAP in case the bitmap could not be added to
the ServerApp's bitmap list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21512 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ff32e515 03-May-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

ServerPicture now uses a BPositionIO object as internal storage instead
of BMallocIO. Added an additional constructor to handle a file. This is
in preparation of implementing BView::SetDiskMode().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20996 a95241bf-73f2-0310-859d-f6bbb57e9c96


# caae1184 01-Mar-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

When creating a picture with data, the app_server was writing beyond the
allocated memory, without telling anyone. That was causing bad things to
happen. Flattening and unflattening BPictures now works, and
consequently, printing works too. Bug #1014 is fixed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20285 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cf2aeb20 21-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

* Implemented BDragger::{Show|Hide}AllDraggers() and its backend in the app_server.
This fixes bug #242. The value is currently stored in a separate file.
* Removed some unused codes from ServerProtocol.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20188 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 89eb4cd6 02-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

Now checks the screen mode to be set if it is already the active one (and do nothing if
that's the case).
Accidently this also fixes bug #1010.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20049 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e30afed4 19-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

As per Ingo's request, I moved calling BRoster::Private::UpdateActiveApp() into
the app_server (and updated all comments that said otherwise).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19865 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 10f6ed94 17-Dec-2006 Stephan Aßmus <superstippi@gmx.de>

* implemented "false bold" for text rendering. It is a new property
of BFont. You can BFont::SetFalseBoldWidth(float) a width on a
BFont object, and it will cause the glyph shapes to be run through
an AGG "contour converter" so that they become thicker or thinner.
IIRC, this is commonly referred to as "false bold". The "width" value
is the distance in pixels that the new glyph outline will be offset
from the original outline.

It would be nice if someone could look at my change to View.h with
regards to the B_FONT_ALL flag.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19547 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7dfa0452 17-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19074 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6edab601 11-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

We must not have the font manager locked when locking the desktop (no matter
if read or write); there are some methods that cause a locking of the font
manager (like ServerFont::SetFamilyAndStyle()).
This fixes bug #885.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19051 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c585b1f4 03-Oct-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

GetEscapements() didnt' take the font spacing into account. Looks like the spacing is ignored by the font backend, though, am I correct?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18990 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a17c3a48 26-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Changed the way DesktopSettings work:
* Removed the DesktopSettings lock itself - it's not really needed at all,
and causes some trouble with a clean locking design. This may even have
fixed bug #757, at least I couldn't reproduce it anymore.
* There is now a class for read-only access that requires you to have locked
the desktop (either read or write).
* There is now another class LockedDesktopSettings that allows you to set
settings (and only that) - when you're changing the settings, you must not
have read locked the desktop (ie. hold the single window lock). The class
will obtain a write lock, but write locks can be nested.
* Moved SetWorkspacesCount() into the Desktop class.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18646 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3a44e6e3 19-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed a big race condition in the server code:
* ServerApp was accessing ServerWindow::Window() (while having the app window
lock held), but in fact, there was no guarantee it already existed, or was
added to the Desktop.
* Therefore, the Window() semantics have changed to only return a window in
case the window exists *and* has been added to the desktop (the latter
constraint might be lifted again, though). Therefore, it doesn't work
for offscreen windows, and should not be used within ServerWindow code
anymore.
* This fixes bug #686 and maybe others as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 82584ab9 09-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented AS_DIRECT_WINDOW_SET_FULLSCREEN so that it sets kWindowScreenFeel
when enabled, and B_NORMAL_WINDOW_FEEL when disabled. IOW when enabled, no
other windows can interfere.
* Therefore, it's no longer necessary to have the screen_blanker window
use kWindowScreenFeel - it will set its window to full screen as long
as the blanker runs.
* Added a AS_APP_CRASHED notification in the app_server that will remove
all kWindowScreenFeels from the windows of the crashed app.
* This is now used by the debugger to ensure that the debugger alert will
be visible.
* Factored out a DesktopLink class out of the BRoster::_ActivateApp()
method. This class is now also used in the new BRoster::_ApplicationCrashed()
method as used in the debug_server (via BRoster::Private).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17785 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4f403556 02-May-2006 Axel Dörfler <axeld@pinc-software.de>

Hacked AccelerantHWInterface::GetDriverPath() to call the accelerants
B_GET_ACCELERANT_CLONE_INFO (as that's what the caller actually wants).
Unfortunately, it's currently hard-coded to path names, that is, if there
is a driver out there that doesn't follow this quasi standard, it will
break this mechanism.
We should either change the driver interface to explicetly use path
names, or change the mechanism we're using (in BWindowScreen upwards to
the app_server) to the one as thought by Be.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17299 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5ec797a7 29-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

* improved getting the retrace semaphore, now the PrivateScreen
will not try to retrieve the retrace semaphore again and again
if the graphics cards doesn't support it for some reason
* disabled BScreen::WaitForRetarce() for now, since it will just
hang on ATI Radeon at least


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17266 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 23ae77aa 26-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* Removed ColorSet, it's no longer needed or used.
* The Decorator are temporarily using ui_color() - this needs to be changed
to use the DesktopSettings (when the decorator stuff gets refactored); right
now, the colors are fixed.
* Added B_WINDOW_TEXT_COLOR, B_WINDOW_INACTIVE_TAB_COLOR, and
B_WINDOW_INACTIVE_TEXT_COLOR to the UI colors, B_WINDOW_TAB_COLOR is no
longer deprecated. Note, however, that not every decorator may use these
colors.
* Removed unused and wrong (ie. hard-coded paths) stuff from ServerConfig.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17236 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6d5488e1 25-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* There is now a server_read_only_memory structure that is placed in a (surprise!)
read-only area shared between the Desktop and all applications.
* Right now, this area only contains the desktop colors, ie. B_PANEL_BACKGROUND_COLOR
etc.; ui_color() no longer needs to ask the server for these colors.
* The ui_colors are now maintained by DesktopSettings, though ColorSet is still there.
* The default colors are now hardcoded once and for everyone in InterfaceDefs.h, ie.
the app_server uses them as well.
* Desktop::Init() can now also return an error (but that is not yet accounted for).
* Cleaned up InterfaceDefs.h.
* Fixed wrong include in moreUTF8.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17232 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f7c7883b 23-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* We now have working video overlay - even though the overlay_token handling
is currently broken, mode switches probably fail or result in sudden death
(didn't try) it's good enough for Radeon cards and VLC (might work with
others as well).
* Implemented follow modes for view bitmaps (wasn't taken into account at
all before).
* Switched to a darker overlay color for now (dunno what exactly makes a
good candidate there, but this one is good enough for now).
* Added TODO about a race condition in AS_LAYER_SET_VIEW_BITMAP.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17208 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 21c8c925 22-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* With Rudolf's information about relocating overlays, I changed the way memory
is managed for those bitmaps:
- the shared client memory mechanism is used to allocate a small overlay_client_data
structure that contains the actual buffer and a semaphore that you have acquire in
order to access it.
- LockBits()/UnlockBits() now have a function: you need to call them before accessing
the overlay buffer, and you need to keep that lock until you're done with it.
* The overlay cookie is now an extra member of the ServerBitmap class.
* Removed fInitialized from ServerBitmap - IsValid() now just checks the buffer associated
with the bitmap.
* ViewLayer::Draw() will now handle overlay bitmaps specially and will draw the overlay
color instead of any contents (this is currently in ugly pink, but will become some
dark color later on).
* All what's missing from actually being able to use overlays now is to configure
them so that they are shown on screen. VLC will now show an empty pink window when
overlay video is enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17201 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f33610f8 21-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed number 1 (or the only one? ;-)) crashing bug #306 in the app_server:
Since ServerWindow removed itself from its ServerApp in _PrepareQuit(), it could
happen quite easily that the ServerApp was deleted before the ServerWindow - and
since deleting WindowLayer as part of that referenced the ServerApp, it crashed.
Now, adding/removing is both done by the ServerWindow in Init() respectively
the destructor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17198 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 37b502f2 21-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Implemented some more overlay support - the overlay bitmap is now allocated
via the graphics driver (but not yet shown on screen).
I probably got the meaning of the "overlay count" wrong - I guess that you
can allocate any number of overlay bitmaps, but can only see "overlay count"
on screen at a time (right now, I only allow to create "overlay count" bitmaps).
Stephan?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17193 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e520b288 06-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed compilation with tracing turned on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17030 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c0a72677 03-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Minor cleanup: removed some unused commands.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16980 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 600fbd78 01-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

* BView::FillRegion() sends the BRegion data instead of decomposing
it and rebuilding it on the server side (that causes a huge speed
up for regions containing many rects)
* There is a method in ServerLink that could have been used, but I
actually needed to add the direct BRegion support to LinkReceiver
* added LinkReceiver as a friend to BRegion class
* ServerApp and ServerWindow keep the CursorManager locked after they
have retrieved a cursor until they have called Acquire() on the
cursor. (Axel: what good is using atomic* stuff in Acquire() and
Release() if we have to protect this by a lock anyways?)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16957 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16ed1e1d 18-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Removed headers/private/servers/app - everything is in src/servers/app now.
* Removed DisplaySupport.h, wasn't needed anymore.
* Removed private color set functions from InterfaceDefs.cpp - we might want
something similar, but definitely not like that.
* Minor cleanup, added some missing licenses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38a6ea1d 18-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Removed the old AS_AREA_MESSAGE stuff - it's currently not used at all, and
even though we might need something similar, we can't use it (since it was
based on BGet++).
* Removed BGet++, it's not used anymore.
* Removed ServerMemIO class, was never used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16830 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9a44fdc9 18-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented a new client allocation method: instead of having all bitmaps of
all teams in serveral server areas, and instead of having to eventually clone
them all several times in BBitmap, we now have one or more areas per team,
and BBitmap will only clone areas once if needed. As a side effect, this
method should be magnitudes faster than the previous version.
* This method is also much more secure: instead of putting the allocation
maintenance structures into those everyone-read-write areas, they are now
separated, so that faulty applications cannot crash the app_server this
way anymore. This should fix bug #172.
* Freeing memory is not yet implemented though! (although all memory will
be freed upon app exit)
* There are now 3 different bitmap allocation strategies: per ClientMemoryAllocator
(ie. via ServerApp), per area (for overlays, not yet implemented), and using
malloc()/free() for server-only bitmaps.
* ServerBitmap now deletes its buffers itself.
* Cleaned up BBitmap and BApplication a bit.
* The test environment currently doesn't build anymore, will fix it next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16826 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a587720a 11-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

print something to stderr when window creation fails

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16718 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1e766d46 10-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Moved the ViewUnderMouse() functionality from the EventDispatcher to the Desktop;
this saves us some locking headaches and solves a possible deadlock in
ServerApp::Activate().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16688 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 87b1f40c 09-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed misbehaviour of AS_SET_CURSOR: it will no longer set the mouse cursor
when it's not over a view of the application.
* The application cursor is no longer applied when the mouse cursor is over
the border (or tab) of a window.
* Gave up and imitate BeOS behaviour: the mouse cursor now always get the
shape the view below dictates, ie. it will no longer fall back to the
default cursor outside the focus window.
* The window is now set to the default in case there is no window under it
at all (ie. if Tracker isn't running).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16685 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9ce4e5b4 09-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* The ServerApp now has the concept of a current cursor: this is either the cursor
of the view currently under the mouse, or the application cursor, if the view doesn't
have its own cursor (ie. it will no longer set the wrong cursor in certain situations).
* AS_DELETE_CURSOR has no longer an influence on the application cursor, as this grabs
a ref for its own use - this fixes bug #275.
* AS_SET_CURSOR no longer sets the cursor when the application is not active.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16678 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ed45b665 09-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Cleaned up AS_SET_CURSOR a bit: it now just calls Desktop::SetCursor(), and no longer
HWInterface::SetCursor() directly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16677 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 52b3e056 09-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

AS_SET_CURSOR now grabs a reference to the current app cursor, so that it won't be
deleted when the local BCursor object is gone. This should fix bug #275 (ScummVM
should no longer have two cursors), not tested yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16676 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3e2ee695 02-Mar-2006 Michael Lotz <mmlr@mlotz.ch>

Started implementing the server side of BScreen()->ReadBitmap().
Colorspace conversion is not done yet so that it only works correct in 32bit modes.
Also drawCursor is not respected yet. Partially fixes bug 197.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16573 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f19839c2 01-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Some groundwork for overlay support. If someone wants to finish this, feel
free to continue (it would be nice to be notified before, though, in case
I get to it again in the next weeks).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16561 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bfe69873 28-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented private do_window_action() function, used by the Deskbar to bring
windows to front (or minimize them).
* Desktop::ActivateWindow() no longer crashes in case the window to be activated
is not on the current workspace - instead, it doesn't do anything at this
point. IOW it doesn't handle workspace activation at all, yet.
* Renamed ServerWindow::GetWindowLayer() to ServerWindow::Window().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16550 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2ed942c1 27-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* Added LinkReceiver methods that return the length of the string.
* AS_GET_STRING_WIDTHS now uses this method to send the strings to the app_server;
ie. it no longer sends the whole strings, and it saves sending the string length
separately.
* BFont::StringWidth() will now always return 0.0f in case of an error (instead of
some random value)
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16525 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 588259b6 26-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

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


# f877af82 09-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented private functions do_minimize_team(), and do_bring_to_front_team()
used by the Deskbar (for "Hide All" and "Show All"). The latter doesn't work
correctly yet, though, it just maximizes all windows of that application.
* Added a TODO to ServerWindow AS_MINIMIZE_WINDOW on how to make it work correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16315 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8527f8ff 06-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

The display resolution is now saved and restored. Probably doesn't handle non-default
modes right yet.
The settings are stored in B_USER_SETTINGS_DIRECTORY/system/app_server/workspaces.
They are currently saved as a flattened BMessage - we might want to switch to the
driver_settings format, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16249 a95241bf-73f2-0310-859d-f6bbb57e9c96


# db5734a4 05-Feb-2006 Michael Lotz <mmlr@mlotz.ch>

More work on the BFont special functions.

* Reworked functions like GetEscapements(), GetBoundingBoxesAsString() and GetGlyphShapes() completely
* Made the ServerFont functions uniform in their prototypes and cleaned out unnecessary arguments
* Added new UTF8 handling functions to moreUTF8.h that are now used by ServerFont
* Put the common transformations of the FT_Face into an own GetTransformedFace() to lessen code duplication

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

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16241 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 195e980e 05-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* Cursors are now reference counted, so it shouldn't be possible anymore
to delete them accidently :)
* You should no longer call HWInterface::SetCursor(), but the new Desktop::SetCursor()
if you need to change the cursor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16238 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aa1f5437 05-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Some work on cursors:
* Fixed a myriad of bugs all over the place, ranging from locking errors to
deleting objects that don't belong to the one deleting them (hello HWInterface!)
* Almost all ServerWindow cursor stuff was broken; I've replaced all commands
to set a cursor with a single one AS_SET_CURSOR.
* Renamed some cursor commands.
* Changed the (broken) way ServerApp::fAppCursor was maintained - the application
cursor is now NULL as long as possible.
* Removed superfluous ServerCursor app signature stuff.
* The BApplication will no longer duplicate the default/I-beam cursors, it will
just reuse the default ones which now have fixed tokens.
* As a result, changing the cursor is now working as expected, closing bug #102.
* Rewrote Cursor.h, renamed private members to match our style guide.
* Minor cleanup.

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


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16237 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bb96bd0a 04-Feb-2006 Michael Lotz <mmlr@mlotz.ch>

* Fixed GetGlyphShapes(). The BShapes that are outputted are correct now but the app_server still cannot draw them correctly.
* Changed the allocation to new for GetGlyphShapes() and GetEscapements() as the data is deleted in ServerApp.cpp
* Minor cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16231 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ff3abf4d 02-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* 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


# df190823 12-Jan-2006 Stephan Aßmus <superstippi@gmx.de>

* cleaned up ServerApp header a bit
* added support for nested cursor showing/hiding


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15926 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cf6fe303 12-Jan-2006 Stephan Aßmus <superstippi@gmx.de>

* I decided having the cursor obscuring feature in the HWInterface class
was not such a bad idea after all.
* Reenabled obscuring the cursor in ServerApp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15925 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b073091a 11-Jan-2006 Stephan Aßmus <superstippi@gmx.de>

* small cleanups
* reworded Activate and commented out all code
that actually tries to change the cusor shape


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15917 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7898383a 05-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented AS_CREATE_PICTURE, started cleaning up Picture.cpp

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15843 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9c0c899e 04-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a copy constructor to ServerPicture. ServerPicture's constructors are private now, and can be called only from ServerApp (friend). Changed BList to a stl::stack which is better suited as a stack... Changed ServerApp::CreatePicture() to accept a picture to clone, instead of passing back a token which was never used anyway.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15840 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b4135600 03-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implement AS_CLONE_PICTURE handler, needed to copy bpictures server side. Not tested yet

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15826 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c33148d 02-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented handlers needed for Begin/EndPicture, and a handler for DrawPicture().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15816 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 843bc3cd 03-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

* Introduced an initial application workspace - should be retrieved differently,
though (ideally when launched).
* B_MODAL_APP_WINDOW_FEEL windows are now visible on the initial app workspace
in case it has no other window visible. This fixes the missing BAlerts in
the debug_server or just the "alert" command. Thanks to Stephan for pointing
this out.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15811 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 20c2f672 03-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added Create/DeletePicture to ServerApp

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15802 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fc6ec917 29-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented AS_SET_DESKTOP_COLOR - the desktop is not redrawn yet, but freshly exposed
areas will be filled with the new color.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15724 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 55fd3336 29-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

* 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


# 51a523b1 24-Dec-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

implemented AS_GET_ACCELERANT/DRIVER_PATH and renamed the relative constants

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15666 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1f0a4ee8 20-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

removed unused stuff from Painter and DrawingEngine, fixed the deadlock when trying to use the (20 times faster) DrawingEngine version of StringWidth, the font is now usually ignored when taking on a DrawState in Painter... should add a little speed overall

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15628 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4fbc3f58 12-Dec-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Researched and implemented BDirectWindow::SupportsWindowMode() more
correctly, both for r5 and haiku


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15523 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1eed15a2 12-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

ServerApp no longer kills ServerWindows when they don't respond, but drops into
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


# 61fed21b 12-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed Write[Un]lockWindows() to [Un]lockAllWindows(), and Read[Un]lockWindows() to
[Un]lockSingleWindow().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15509 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bff84e78 11-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

This enables BDirectWindow support again.
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


# 34227d2c 09-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

A couple of changes related to modal and floating windows:
* 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


# e83820ed 07-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

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


# 4c0269b9 02-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

* WindowLayer::OnWorkspace() should now work correctly for all window feels.
* 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


# 85096c8a 30-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Some cleanup:
* 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


# a8b49ab3 30-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented AS_COUNT_WORKSPACES and AS_SET_WORKSPACE_COUNT server side.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15253 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5ca8477e 30-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* the Workspace class is now hidden and put into Workspace::Private; the new
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


# 27adb969 28-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Massive RootLayer & Workspace tearing:
* 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


# ae0a90ce 28-Nov-2005 Jérôme Duval <korli@users.berlios.de>

SetAppCursor also sets cursor status


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15205 a95241bf-73f2-0310-859d-f6bbb57e9c96


# df362433 26-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Now sends B_SCREEN_CHANGED messages to all windows when the screen resolution changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15167 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 26b02ddc 26-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

The input_server is now notified when the screen resolution is changed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15165 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 67e79bf4 25-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

A message looper can now have a death semaphore, ServerWindow now uses them.
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


# 4b813bf2 24-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed WinBorder to WindowLayer, and OffscreenWinBorder to OffscreenWindowLayer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15128 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4ceb1e51 20-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* reverted Adi's premature changes to BWindow and restored _DetermineTarget() and
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


# 63ea9a28 18-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Missing "using std::nothrow".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15021 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fa26723b 18-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Moved workspace keyboard switch and dump screen capability from RootLayer
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


# 8d8f5950 17-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Some cleanup, mostly GetHWInterface() to HWInterface().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15016 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f7598223 18-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* the new input event dispatcher is now actually used, although it doesn't
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


# 6c17d025 15-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Introduced a new handshake between input_server and app_server, and some
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


# be05d56c 14-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* the app_server now uses a global token space - this should later be changed to
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


# b66d7537 14-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Prepared the BScreen and BPrivateScreen class to be used with multiple monitors.
* 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


# d9525baa 13-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Forgot to update Screen.h with the last commit...
* 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


# a817d6ad 14-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* (tried to) implemented RootLayer::ResizeBy() and activated AS_SET_SCREEN_MODE again;
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


# dfd5b499 11-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* last change set window title to "Unnamed Window" if the title was empty - but
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


# 90dfa707 09-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* ServerFont now also adopts the FontStyle's face and direction on
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


# 2fe84ae9 09-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Now AS_GET_DEFAULT_SYSTEM_FONT actually returns the default font as used
by the app_server (ie. also if it's a fallback font).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14805 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16f782cc 09-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented AS_SET_SYSTEM_FONT.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14803 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d0a688ee 09-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Introduced and implemented new font command AS_GET_DEFAULT_SYSTEM_FONT that returns
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


# e37155c6 07-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* The font list is now cached client-side. The app_server is only queried for
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


# b2cc3454 07-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

More font work:
* 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


# 86ad4b9c 06-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

First steps into on-demand font scanning. When you've installed lots of fonts, this
will speed up launching the app_server considerably (once it's done).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14720 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6ed89418 04-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

renamed DisplayDriverPainter.* to DrawingEngine.*

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14695 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aca4f50d 04-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Merged DrawData and LayerData to one class DrawState.
Removed that ambiguous second copy constructor and moved push state functionality
into a separate PushState() method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14679 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 05bd1efe 03-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* the FontManager is now a looper (but doesn't do anything useful yet).
* moved the system default font functionality into the DesktopSettings class.
* ServerFont::SetStyle() is now a public method.
* Improved font fallback routines: they will never end up without a font if
there is at least one font installed.
* fixed some minor bugs in the DecorManager.
* Decorator now get a DesktopSettings object passed - dunno if that's a good
idea (since we'll have to open the DesktopSettings header), but it works
for now (and something like this is probably needed anyway).
* a clean ServerFont is now set to the system default font - and not to the
(user chosen) desktop default font anymore (since the font manager doesn't
know about that one).
* Improved font directory scanning in the font manager a bit, it's now using
find_directory() instead of hard-coded paths.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14666 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8365d9ec 03-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* A ServerFont is now always valid, bye-bye ServerFont::InitCheck().
* The FontFamily is no longer reference counting itself.
* SharedObject is now more useful and destructs itself when unused.
* Fixed FontStyle::GetHeight()/ServerFont::GetHeight() semantics.
* Simplified ServerFont constructors.
* Removed wrong function descriptions.
* FontStyleHeight is no longer used: the FontStyle is calculating the
base font height on construction - this reduces the resolution a bit,
but it's hopefully not causing any troubles (doesn't look like it,
at least).
* A FontStyle now removes itself from its family on destruction.
* More cleanup, removed unused stuff like FontStyleHeight.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14657 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c9ff9a39 02-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

ServerFont::StringWidth() did not set the size of the face, and could therefore
return wrong results. Activated it again to work-around the possible font deadlock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14654 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f1d36281 02-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Apparently, ServerFont::StringWidth() doesn't work for fixed width fonts...
Will look into this later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14648 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cf550035 02-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

This works around a deadlock that frequently happened when working with menus (font stuff).
I should start investigate this one more deeply some time...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14646 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bdd34c02 02-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed the FontServer class to FontManager.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14642 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 26a2be8b 02-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

less overhead when byte count of string is already known

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14639 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5d1bd031 02-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed some communication mismatches I introduced earlier: we are no longer sending
whole font_family/style strings (each 64 bytes), but only strings, because they
are usually shorter than 64 bytes.
This should fix the StyleEdit problems Stefano were seeing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14628 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fb2d4d51 02-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Removed unused variable (copy&paste remains...).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14626 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6f121769 01-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Added and implemented AS_GET_FONT_FILE_FORMAT - currently, it returns always
B_TRUETYPE_WINDOWS, though.
* possibly returned an uninitialized error code in some BFont methods.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14622 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b8cde449 01-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

More font work:
* simplified BFont::SetFamily*() server communication - there is now only
AS_SET_FAMILY_AND_STYLE left, but at least that one works correctly.
* BFont::fFace is now always updated correctly.
* Moved the fFace masking to the server - BFont doesn't know enough to do
this correctly, anyway.
* Only one version of get_font_style() worked correctly.
* Font family/style ID and index were used completely mixed up - this
would have become an issue as soon as the font list changes during
runtime.
* Enabled AS_GET_FONT_DIRECTION again - missing functionality should only
be taken into account on lowest level as long as it can be emulated.
* Made FontServer a bit clearer to use (more to come).
* fixed several allocation leaks in the font server communication.
* New FontStyle::Direction() method, that currently only returns
B_FONT_LEFT_TO_RIGHT, though.
* more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14618 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1334ab47 31-Oct-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

just some work, made sure to preserve app_server coding style


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14608 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d317ba74 31-Oct-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

real men don't do any error checking


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14607 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9b1ad6f4 31-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed a bunch of bugs in the font sub-system:
* BFont::Face() was almost always wrong - also on the server side,
_TranslateStyleToFace() was broken.
* a clean font was not correctly initialized to be_plain_font
* BFont::GetFamilyAndStyle() did not work correctly if either family
or style was NULL - which is allowed, and shouldn't have let it abort
its task.
* FontServer::GetStyle() by ID did not work reliably under certain
circumstances (but those were not reached with the current server)
* BFont::SetFamilyAndStyle() did not work when family was NULL, and
it also never set fFace correctly.
* Introduced a FontFamily::GetStyleWithFace()
* Renamed some FontFamily/FontStyle methods from ie. GetID() to ID()
to match the style used everywhere else in BeOS.
* Removed AS_SET_FAMILY_NAME as its no longer in use.
* Lots of cleanup and simplification.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14602 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 959a5a68 31-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Removed global gDesktop variable - there is now an sDesktop variable in AppServer.cpp, but
that will go away, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14590 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cf5a0149 13-Oct-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Merged two case blocks, thus removing some duplicated code.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14374 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f2fd1298 30-Aug-2005 Jérôme Duval <korli@users.berlios.de>

now uses delta escapement
improved GetBoundingBoxesAsString (just for fun, keep in mind we'll use AGGTextRenderer in the end :) )


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14091 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 29926b97 26-Aug-2005 Jérôme Duval <korli@users.berlios.de>

completes previous commit


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14076 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3cf915cb 26-Aug-2005 Jérôme Duval <korli@users.berlios.de>

spacing is needed for GetBoundingBoxes too (string case)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14072 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 697085a5 26-Aug-2005 Jérôme Duval <korli@users.berlios.de>

shear is needed for GetBoundingBoxes
now uses _GetBoundingBoxes_ for GetBoundingBoxesAsGlyphs and GetBoundingBoxesAsString


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14071 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2f23ef90 25-Aug-2005 Jérôme Duval <korli@users.berlios.de>

added GetBoundingBoxesAsGlyph, GetBoundingBoxesAsString, GetBoundingBoxesAsStrings
real implementation with freetype still missing


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14062 a95241bf-73f2-0310-859d-f6bbb57e9c96


# af86ce75 24-Aug-2005 Jérôme Duval <korli@users.berlios.de>

copyright update


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14058 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2b1263be 24-Aug-2005 Jérôme Duval <korli@users.berlios.de>

reworked BFont::GetStringWidths and BFont::StringWidth
implemented BFont::GetEdges


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14057 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2185eed6 23-Aug-2005 Jérôme Duval <korli@users.berlios.de>

implemented GetHasGlyphs for real


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14056 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3ddebe7e 21-Aug-2005 Michael Lotz <mmlr@mlotz.ch>

Moved the CursorManager over to the Desktop too.
Maybe the CursorManager should be used to set the cursors directly instead of using
fDesktop->GetCursorManager.FindCursor() and then fDesktop->GetHWInterface()->SetCursor()
in ServerApp.cpp.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14033 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d863d4bf 12-Aug-2005 DarkWyrm <darkwyrm@gmail.com>

Made scanning of all font folders a compile-time option
Moved the scanning of individual font folders to FontServer
Implemented server-side code for update_font_families
Removed ClientFontList from the build


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13938 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 770c05d6 25-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

The Desktop class now gets its own message processing loop: moved application
creation/deletion (and management) over to that class.
ServerApp now gets a desktop pointer, and no longer uses gDesktop.
Converted private MessageLooper::_MessagePort() to a public method MessagePort()
so that the looper can be addressed from elsewhere without using PostMessage().
Added a real basic message loop to MessageLooper::_MessageLoop().
BApplication now only asks the app_server to get its desktop object which should
now be used for everything that's not in the realm of the application.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13824 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 89ab121e 23-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Factored a MessageLooper class out of ServerWindow and ServerApp. Could still
be improved a bit (Quit() and _MessageLooper() are empty right now).
Removed ServerApp::PingTarget().
Hopefully cleared some confusion about ServerApp::fClientLooperPort and fClientToken
(previously fHandlerToken), even if it's currently unused.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13807 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 599be434 19-Jul-2005 Jérôme Duval <korli@users.berlios.de>

Implemented GetHasGlyphs support somehow (FT support is lacking)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13766 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 22137825 17-Jul-2005 Michael Lotz <mmlr@mlotz.ch>

All cursor related changes:

* Moved setting the default cursor from ServerScreen to Desktop
* Getting the default cursor is now done using the CursorManager
* Removed outdated setcursor from SysCursor.cpp (we have a new implementation by now)
* Renamed SysCursor.cpp to CursorSet.cpp as that's what it is
* Moved headers/private/app/SysCursor.h to headers/private/servers/app/CursorSet.h
* Removed some unneeded header includes along the way

There remains {set|get}_syscursor now in CursorSet.cpp. Serverside for these are not implemented
and they are obvious hacks. Do we need to keep them?
Also this commit _would_ break Appearance, but 1) all the related code is currently commented out
with the comment "cursor set management belongs in another app" and 2) it is already broken
because of ColorSet.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13726 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ef8810f2 17-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Extracted the settings stuff from the Desktop class. If you now need to access
the desktop's settings, you have to do something like this:
DesktopSettings settings(desktop);
settings.SetMouseMode(mode);
The advantage of this is that this object is fully locked, and cannot lead to
corrupted settings anymore. Also, the settings will stay the same until you
delete the object again.
Updated all accesses to use this new API.
Removed no longer used FFM messages.
Implemented AS_{GET|SET}_MENU_INFO for future use.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13719 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16046321 13-Jul-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented BPrivateScreen::ReadBitmap(), but the guts are still missing

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13665 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3f319b33 10-Jul-2005 Michael Lotz <mmlr@mlotz.ch>

Some cleanup, some removed typos, some unification, some fixes and some added todos. Most of it related to client-server communication. Apps that rely on BFont stuff should work now (StyledEdit, Fonts, Keymap, Menu, ...). Or should not hang/quit at startup at least.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13625 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16e93888 06-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Some more debug output, so that you know which window is killed this way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13512 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6a0a0a80 05-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented AS_GET_WINDOW_LIST and AS_GET_WINDOW_INFO.
Renamed Desktop::FindWinBorderByServerWindowTokenAndTeamID() to FindWinBorderByClientToken().
Every ServerWindow now gets a server token.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13455 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 359c905c 05-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

offscreen bitmaps work, tested on Haiku as well, supports all colorspaces that BBitmap::ImportBits() supports. It uses a fallback for non-B_RGB(A)32 bitmaps. Added support for B_SUB_PIXEL_PRECISION view flags, though it is a bit hacky, since I had to add it to LayerData, even though it is not a true part of stack data. Added Layer::SetFlags() to enforce code path and update fLayerData. Cleaned up DisplayDriverPainter and DisplayDriver API (changed some const BRect& rect to simply BRect rect in order to be able to reuse it in the code), moved Painter.h, the test environment only draws the changed part of the frame buffer again - this causes a lot less CPU overhead, Painter special cases stroke width of 1.0 to use square caps, which is similar to R5 implementation and removes a lot of problems with non-straight line drawing, ServerWindow uses the DisplayDriver from it's WinBorder instead of the one from the Desktop (needed for offscreen windows, which have their own DisplayDriverPainter), it also checks for GetRootLayer() == NULL, because offscreen layers are not attached to a RootLayer, there was a fix for scrolling which worked at least in the test environment, it is now defunced, because Adi moved _CopyBits to Layer... I need to reenable it later, LayerData has no more fEscapementDelta, also fixed fFontAliasing (which was thought to overriding the font flags, and now works as such again), Desktop initialises the menu_info and scroll_bar_info stuff, which makes ScrollBars work actually... hope I didn't forget something.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13448 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c030c6fa 01-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

As the comment says, deleting the cursor is not necessary.
But since every single cursor is owned by a team - why the cursor manager?
I must overlook something...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13385 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3870c9f1 01-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Improved quit mechanism (for the last time): if an application had open
windows that wouldn't quit on demand, the app_server would have gotten
the kShutdownServer message anyway already (as the last app was quit).
Since that one removed things like gDesktop/gBitmapManager, it liked
crashing.
Now, there is a semaphore that will be send to each app on quit. Only
when this semaphore can be acquired, the shutdown message will be sent.
Removed unused semaphores (decorator, active app).
Replaced fAppListLock with a BLocker (just calling acquire_sem() without
error checking is very unsafe in userland, and should never be done).

BTW the bug was triggered by broken menu code that only sometimes
really quit the window; it leaves a whole lot of zombies around - Stefano,
any quick idea? :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13384 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1e1b96cd 01-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Rather than a "case message: /* unimplemented */ break;", we should not
handle the case at all to give the server the possibility to send a
failure response - ifdef'd some code out.
Added comment to ServerApp::PingTarget(), because what it currently does
does not make any sense.
Minor cleanup (replaced fSignature.String() with Signature()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13381 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 17867066 01-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

You're not supposed to delete bitmaps yourself; you have to let the
bitmap manager do the job.
This fixes a possible crashing bug on quit, a giant memory hole, and
probably also a possible crash during runtime.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13380 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9f5ffc2c 27-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed BFont's GetTunedCount() and IsFixed()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13293 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 08d9a6e3 26-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Some minor work on minimum window sizes. A WinBorder now makes sure it has
a valid size on construction; DefaultDecorator should do that as well.
ServerApp AS_CREATE_WINDOW now makes sure it passes a valid rectangle to
ServerWindow's constructor.
Smaller default size for Layers that have been created with an invalid frame.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13291 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 89d0b3cd 25-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Safer code

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13275 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 55b222b0 25-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Stephan already implemented the needed support for dpms stuff too, so why not implementing the client methods too?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13274 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 75de27f8 25-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

more BScreen related stuff

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13270 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 583f6c3e 24-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added server side support for BScreen::ProposeMode(), fixed client side too.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13269 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c6418981 24-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

implemented client/server side support for BScreen::GetDeviceInfo() and WaitForRetrace(), and (only client side) support for Bscreen::ProposeMode()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13266 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0ec4af22 23-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Improved AreaPool to have an initial size as well as well as a name that is
used for new area.
MemPool::AddToPool() now gracefully deals with NULL pointers (or a size of 0).
BitmapManager was deleting the area it transferred to AreaPool before - it
no longer needs an extra area, though.
Minor other cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13260 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b5436616 23-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed some style related functions and other oddities in FontServer.
Also applied our style guide on that class.
Renamed some public globals to match our style guide.
Made BitmapManager inherit from BLocker instead of duplicating its
functionality (incorrectly, did not check for B_INTERRUPTED) locally.
Some more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13259 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2949ed1d 23-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

Thou shalt compile before thou commitst.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13253 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3dcb3b07 23-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

Added some root layer locking in ServerWindow.cpp when accessing the layer tree. Moved HWInterface management out of DisplayDriverPainter and into Desktop. Removed all the directly hardware related functions from DisplayDriver API. They just called the same HWInterface functions. Now DisplayDriver is much cleaner and ready for being attached to a yet to be written BitmapHWInterface. Clean up of the display mode stuff in Screen and the View-/AccelerantHWInterface. Frequency is now regarded on Haiku. AccelerantHWInterface::GetModeList now works before SetMode has been called. Added MultiLocker from the sample code. HWInterface uses it now in preparation to being used from multiple instances of DisplayDriver.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13252 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1b53e8af 23-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

The app_server now cleans up better after a team crashed; not only the
application and bitmaps are removed, the team's windows are now removed
as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13251 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ce1639b2 23-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Some more cleanup:
- replaced fMsgSender/Receiver with a BPortLink fLink
- moved message loop into non-static method _MessageLooper()
- renamed Zoom()/Minimize()/Quit()/ScreenModeChanged() to Notify*(), and
Quit() to NotfiyQuitRequested() to make more clear what they do (they
don't operate on ServerWindow, they just notify its client)
- less insane way to init a window: there is no longer the constructor
and a separate method Init(); now there is the constructor (which
fully sets up the window), InitCheck(), and Run() which runs the
window's message loop
- moved the quitting stuff into a separate method Quit() and made
it callable from other threads.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13247 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a38e46a0 23-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

ServerApp now maintains a list of all windows, ServerWindow's AS_DELETE_WINDOW
will update it automatically.
Renamed ServerWindow::fName to fTitle, made it a pointer - it will now just
adopt the title pointer that came from AS_CREATE_WINDOW.
Just another cleanup round: renamed Layer::GetName() to Name(), no
more layer->fName->String() accesses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13239 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fcb006dc 23-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Rewrote how the app_server and ServerApp's quit. As a side effect, the server
can now quit instantly.
AppServer must no longer call ServerApp's destructor once it's running - it now
has to call Quit() in this case. The ServerApp is now destructed in its own thread.
Some cleanup (like renaming ServerApp::MonitorThreadID() to Thread()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13238 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2e86adec 22-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented AS_GET_MODE_LIST server side.
Fixed broken ViewHWInterface::GetModeList() - it did not correctly write into
the allocated memory. Also extended it to be more flexible, has better timing
values, and more resolutions.
ViewHWInterface::SetMode() will now check if the requested mode is in its
list of supported modes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13226 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 550d6a53 17-Jun-2005 DarkWyrm <darkwyrm@gmail.com>

Cleanup for decorator management code
Updated a couple headers
Moved all decorator code to ServerApp where it belongs
Modified AppServer::Broadcast to allow ServerApps send messages to all apps without having to have a global AppServer instance


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13204 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 54cc0f1b 16-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

reverted some unintentional changes

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13179 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 99b9d5ac 15-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

a new state begins life as a copy from the previous state, fixed Scale(). Note that BoundsOrigin() (and therefor Scale()) is called _a lot_ so we should cache the value! I started to work on this, but our lack of encapsulation strikes again... Layer::fLayerData is used directly all over the place.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13172 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dd10337f 14-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed BAppServerLink to AppServerLink, BPortLink to PortLink, LinkMsgReader
to LinkReceiver, LinkMsgSender to LinkSender, and put everything into the
BPrivate namespace.
Made AppServerLink a cheap object - it will use the applications receiver/sender
and not create its own buffers.
Fixed broken communication stuff here and there (mostly Font.cpp).
Put the newly introduced set|get_system_colors() into the BPrivate namespace -
please don't introduce private functions into the public namespace!!!
Also fixed their broken communication use, as Darkwyrm obviously forgot about
it again: the sequence Flush(); GetNextMessage() without error checking is
purely wrong and can make the app hang and/or crash! :-)
Other minor cleanup.
The input_server used some test mode with the haiku build target which is
probably wrong.
Hopefully I did not forget anything this time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13128 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 57bbc539 14-Jun-2005 DarkWyrm <darkwyrm@gmail.com>

Moved some system colors code to be monitored by a client's ServerApp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13123 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3a27ae79 13-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added server support for activate_workspace(). Looks like it's not doing anything, though SetActiveWorkspace() returns true....

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13103 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eef16dda 13-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

implemented server support for current_workspace(), just because I had enough of the 'blablah got unknown reply' message

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13102 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f1496739 10-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

removed AS_SET_SCREEN_MODE handler

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13040 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2ed35bc8 08-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Thanks to Axel's change, now we can pass the app_server's colormap to libbe. Methods like BScreen::ColorMap() and BScreen::ColorForIndex() work.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13023 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3ba7d6f3 08-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Added AS_{GET|SET}_DESKTOP_COLOR.
(Incorrectly) implemented AS_GET_DESKTOP_COLOR - works for now.
Minor cleanup.
Is AS_SET_SCREEN_MODE used at all?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13010 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd28b3c7 07-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

BAppServerLink is now using BApplication::fServerTo/From for its messaging.
Added LinkMsgReader::NeedsReply() method.
Completely redone ServerApp messaging: no more "replyport" from BAppServerLink; instead,
the registered client reply port is used. Fixed some more weak messaging stuff.
ServerApp now recognizes if an unknown message needs a reply, and sends it - for example,
the "Screen" preferences app no longer hangs, but crashes on start :)
Made LinkMsgReader::Read() virtual again, since it's needed by RAMLinkMsgReader.cpp.
Renamed BPortLink::GetNextReply() to GetNextMessage().
Some more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13004 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 75936a02 07-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

BPortLink now has a FlushWithReply() method itself.
BPortLink::AttachString() now accepts a length argument, and will no longer
send a terminating null byte; LinkMsgReader::ReadString(), however, will
make sure the string read is null terminated.
Changed client communication code to use FlushWithReply() instead of Flush()
and GetNextReply() - there were many bugs and shortcomings in the code, I
hope I've fixed them all.
Converted ClientFontList.cpp to our coding style (but not completely, the
class members are missing).
Some more cleanup - I hope Adi will adopt our coding style one day!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12998 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7475dcdf 07-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added an app server command to retrieve the color map. Made some adjustments to SystemPalette.cpp, implemented support for it in BPrivateScreen. Moved get_scs() a bit down to avoid a deadlock. Note that getting the colormap doesn't work due to port capacity limit (?)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12996 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f9e3895b 04-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

added tracing to some messages

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12952 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 59345e26 03-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

huge cleanup, support for SetSizeLimits, support for truncating strings, numerous decorator bug fixes, Layer does not draw when view color is B_TRANSPARENT_COLOR, cleaner dispatching of mouse events to the WinBorder in RootLayer, commented the char map selection in the font server, as it seems glyph lookup by unicode index works much better with the default map

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12945 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 19e47292 28-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Uncommented SendMessageToClient, as it's used in test mode.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12869 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8380e999 28-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

better error checking in Run()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12866 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6390df8e 28-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Made app_server a static, renamed desktop to gDesktop as it's a global, RootLayer now uses its own fDesktop internal member instead of the global one. Fixed a typo in some commented code (thanks Axel)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12864 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7f2831b5 28-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Removed a couple of friendships, commented/removed unused stuff

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12863 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2724858b 27-May-2005 Axel Dörfler <axeld@pinc-software.de>

Added global app_server port, so that other parts of the server don't have
to search for it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12859 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d7c08b7d 26-May-2005 Axel Dörfler <axeld@pinc-software.de>

Tried to make the ServerApp aware when a client dies: the main communication
port is now transferred to the client, so that it goes away automatically.
Unfortunately, this doesn't seem to work. This code is truly a big mess :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12846 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e5b4782b 26-May-2005 Axel Dörfler <axeld@pinc-software.de>

Made some necessary enhancements to class Screen; the app_server also
has to care about refresh rates. Also changed Screen::GetMode() (formerly
Resolution()) to return all interesting values, so that hopefully no one
will call it anymore like RootLayer::SetScreens() did.
Greatly improved the horrible RootLayer::SetScreens().
The app_server is now able to deal with failing HWInterface::SetMode() calls;
in this case, it will fall back to the hardware's current mode. This now
also works correctly in combination with the vesa driver, so that you don't
have to compile the app_server with the same resolution you boot in anymore.
SetMode() now always returns if it succeeded or not.
Renamed RootLayer::fScreenXYResolution to fScreenWidth/Height respectively.
Removed the useless DisplayDriver::DisplayMode() method.
Added B_GET_DISPLAY_MODE to the required accelerant hooks.
Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2762b0ce 20-May-2005 Stephan Aßmus <superstippi@gmx.de>

Work in progress... improvements on font stuff, reverted to using Painter to get the string width. Since it actually uses glyph caching, it is about 20 times faster than the implementation in ServerFont (and a about twice the time as R5). I added a StringWidth method to Painter and AGGTextRenderer which works as correct as ServerFont::StringWidth, which btw was broken, because I mixed up glyph count and byte count...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12745 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38c5a7b7 20-May-2005 Stephan Aßmus <superstippi@gmx.de>

Implemented StringWidth in ServerFont, updated ServerApp to use it, and removed a -1 from TextView in the char location calculation, which I didn't understand and without which the cursor location and related stuff now finally work.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12744 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cb80e15b 14-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

ServerWindow is no more a ServerApp's friend. Some cleanups.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12663 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9bdb0522 12-May-2005 Stephan Aßmus <superstippi@gmx.de>

Implemented BFont::GetEscapments() float version. It is pretty rough yet, but appears to handle UTF8 correctly. The optional escapement_delta is currently ignored. I didn't touch other functionality too much, until I know more about it.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12645 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b3d3da70 12-May-2005 Stephan Aßmus <superstippi@gmx.de>

more cleanup, fixed a bug in AS_GET_ESCAPEMENTS_AS_FLOATS that caused a lockup. DarkWyrm - I'm looking at you. :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12640 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f3a544e8 08-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Putting this handler in once again, as it looks it's used in InterfaceDefs.cpp, even if it's not working

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12595 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 80581303 08-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Cleanup of the ServerApp parts I looked at. Removed reduntant comments

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12594 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fb52610b 07-May-2005 DarkWyrm <darkwyrm@gmail.com>

Added a handler for GET_ESCAPEMENTS_AS_FLOATS so that there are no deadlocks in the BFont call until the server-side code can be implemented


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12590 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 04efb239 07-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

AppServer is no longer a friend of ServerApp. Small cleanups.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12586 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 78f09a05 06-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

app_server doesn't hang anymore when an application exits in an unclean way. Got rid of the kill_thread in ServerApp's destructor. Small refactoring. Added a TODO item.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12578 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61d296c9 05-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed a crashing bug

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12574 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5e6d7d52 04-May-2005 DarkWyrm <darkwyrm@gmail.com>

Fixed a TODO - added a method for calling StringWidth with a ServerFont instead of DrawData


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12568 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f812bf8b 01-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented server side support for BScreen::SetMode(). Note that setting the mode works, but rootlayer crashes afterwards. I guess I'll need to lock something. Adi ? Stephan ?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12523 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6e927d6e 30-Apr-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

BScreens methods didn't work for a number of reasons: fixed.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12517 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e742e3e1 18-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

refactoring and cleanup in LayerData and friends, it shows what I mean by "forced code paths" for example in coupled font size and view scale, added a couple TODOs, disabled decoupled frame buffer transfers, it is buggy and deadlocks for some reason...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12441 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3dea4bb6 18-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

cleanup the defines, move old DisplayDriver implementations out because they are currently unused and won't build

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12438 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d7c2c050 16-Apr-2005 Adi Oanca <adioanca@nowhere.fake>

Big cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12424 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7d5778de 01-Apr-2005 Michael Lotz <mmlr@mlotz.ch>

Added support for GetEscapements() too. Still unfinished. Maybe this should be moved elsewhere?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12216 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c2da902f 01-Apr-2005 Michael Lotz <mmlr@mlotz.ch>

Implemented BPortLink::AttachShape and BPortLink::ReadShape and used them for passing the shapes in AS_GET_GLYPH_SHAPES.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12215 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ebf8af66 01-Apr-2005 Michael Lotz <mmlr@mlotz.ch>

Added support for BFont::GetGlyphShapes. Not finished yet and untested, delivery method as to be changed.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12214 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b2b5acff 29-Mar-2005 Axel Dörfler <axeld@pinc-software.de>

Made DISPLAYDRIVER a true compile time option.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12119 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 256c1b15 28-Mar-2005 Adi Oanca <adioanca@nowhere.fake>

Insignifican change. Read uint32 instead of int32.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12108 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33bbe223 24-Mar-2005 Axel Dörfler <axeld@pinc-software.de>

Moved app_server files to app/.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11972 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 35d6e0fe81106637c46f5c3130c421df88f66be0 28-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Add new classes required for picture clipping

* agg_clipped_alpha_mask is a modified version of agg alpha mask class,
allowing us to offset the mask bitmap to follow the view position, and
also allows "inverse" clipping, where everything outside the bitmap is
considered inside the clipping region.
* AlphaMask is a container class keeping the ServerPicture, it's bitmap
rendering, and other relevant information. It will be used to save and
restore the clipping picture as part of the view state.
* Because these classes introduce more coupling within app_server, it's
not possible anymore to split out tst_app_server from
libtestappserver.so. Instead, move everything to libtestappserver.so,
except the things that actually need to not be there (to avoid
interferences with the host API). As a result, the previously introduced
stub cpp file to work around this problem isn't needed anymore.

The design for all this (and the previous commit) is Stippi's work.
Thanks for the advice and implementation hints!


# c2dcc4d500f4f71e9ff117ec221b93bd29d0631e 22-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Get test_app_server to run again

* We should have the buildbots compile this to make sure it still works
* I had to split two ServerApp methods to a searate C++ file to link
them in libtestappserver.so
* some fixes related to the switch to PM and better hybrid support in
jam rules; moving of MIME stuff from registrar to storage kit, merge of
Locale Kit and ICU in libbe, and a few more.
* Modified the test_app_server hwinterface and rdef file so it is not a
background app, and the window isn't floating. Otherwise, hiding the
window would leave you without a way to recover it.


# f4c2f7ebdb11576420c00fc4ecb23b32c3ce3137 10-Jan-2014 Jonathan Schleifer <js@webkeks.org>

Remove variable length arrays of non-PODs.

Variable length arrays of non-PODs are not part of the C++ standard, but
a GNU extension that never worked correctly. Instead, BStackOrHeap array
is used now, which makes sure that it's not too big for the stack, calls
all constructors and is valid C++.


# 4f96ace6d567f266b7ce7f13eed7ed6f0a594f05 02-Apr-2013 Axel Dörfler <axeld@pinc-software.de>

app_server: detach client allocator on quit.

* This prevents sending out notification to applications that are already
gone, and should thus fix #9116 according to John.


# 3fed1a15f58e8d6fe6b492f3b94bb3625ffeddbd 05-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Get app_server working on x86_64.

With this commit, app_server now compiles and runs at boot! Nothing
particularly interesting happens, just the blue background and a mouse
pointer. Remote backends are broken and not compiled in, see #8834.
Note that it won't be possible to build this quite yet, need to get
the FreeType package uploaded.


# 8e2140fa5eb8a019a5134ce041499d14b7ced7a3 29-Apr-2012 Axel Dörfler <axeld@pinc-software.de>

Fixed a large client side memory leak for app_server memory.

* The areas allocated for BBitmaps were never deleted, even though the
app_server deleted its part when the memory got freed.
* This resulted in a constant memory increase if the application in question
would operate on many changing large bitmaps, like photos.
* Since the bitmaps are reference counted, we don't actually know when to delete
the areas, so that the app_server now notifies the client whenever that is
possible.
* This might fix #6824.


# a0e9f8e205d081b64afe5ef9f30230ed9c16d011 04-Mar-2012 Stephan Aßmus <superstippi@gmx.de>

Fixed wrong assert and locking when using Workspace objects.

* The assert in the Workspace constructor was definitely for the
wrong lock. One should be holding the all window lock either
in read or write mode. The Desktop message loop lock should be
unrelated.
* Added boolean to the constructor which controls the assert.
* Added documentation to Workspace class, since it's not at
all obvious how this is intended to be used.
* Fixed ServerApp to lock the Desktop correctly when using
Workspace desktop colors.


# 6c40fc5dfcd03d69d585754505e6b17287a42082 21-Jan-2012 czeidler <haiku@clemens-zeidler.de>

Reconnect BApplication and trigger reconnect of all BWindows in an application.
* handle bitmap reconnect request in the app server


# b46615c55ad2c8fe6de54412055a0713da3d610a 19-May-2011 Stephan Aßmus <superstippi@gmx.de>

Applied patch by Joseph "looncraz" Groover from ticket #7445.
This changes how Decorators are managed and applied. The app_server
no longer scans and maintains the available ones himself, but is
simply asked to load a Decorator add-on from a provided path.
The Decorator scanning is moved into DecorInfo and DecorInfoUtil,
private classes in the InterfaceKit. The bin command 'setdecor'
uses those.
I cleaned up all the coding style violations that I could find,
removed chunks of code which didn't make sense (if you never put
a NULL pointer into a list, you don't need to check for this and
so on) and also cleaned up other passages for improved clarity
and simplicity.
I also tested the functionality and it works fine. Would even be
Ok to include in Alpha 3, IMHO. Thanks for the patch!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41581 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3b1679f9c5fe19cbf2638791e2639ae460874cbc 23-Dec-2010 Michael Lotz <mmlr@mlotz.ch>

* CID 8120: The size supplied to the attach call was the one of the pointer, so
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


# e3feb1f8afc654158137c5aee869d8e22c892747 23-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* Added a new AS_DUMP_BITMAPS command.
* 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


# 1d219b3a253f44d73aa68cd42238d6fa451bb80e 15-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* Added AS_DUMP_ALLOCATOR command that dumps an applications memory allocator to
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


# 128f46a034969ccbcfcb3597ca27f5bbb968dd05 15-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* Automatic whitespace cleanup, no functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39440 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4177bfe69fb9f3fddefcf3776fa13744c4b0cf31 31-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

* AppendPicture() and RemovePicture() are weird, since
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


# 5911196b9cd5ce86a9fea422a277da7628e0fb4a 31-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

Reading the contents of the screen requires the exclusive lock
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


# bb86786a1bac06ffbb4baa03c4a9311283c835a2 28-Jul-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

- Make _Windows public.
- 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


# e4c638f650a4995728e20cc2eb5230cc6766c14f 15-Jul-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

ServerApp::Quit() was hiding MessageLooper::Quit() due to the default
paramenter, causing warnings when compiling with gcc4.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37526 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33394b856dfc5366693cc81b47885d0bd4facd99 16-May-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Wim van der Meer: Added get_mouse_bitmap() global method to
InterfaceDefs.h and corresponding implementation in the app_server. Thanks a
bunch! Closes ticket #5978.

A note to those using "update-all" with hybrid builds - the alternative GCC
system libs will not be updated this way, and this and Wim's last patch
change the libbe <-> app_server interface. You need to manually update the
respective libbe.so, or do a clean build, otherwise apps for the other GCC will
not start anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36830 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c73ffa1021c1426dbce9675256f4f8cdc22bb56 14-May-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Wim van der Meer: Implemented global Interface Kit function to retrieve
the current mouse position and pressed buttons. I've changed the return code
to status_t and added anal error checking, most of the rest of the file is not
doing it, though... :-) Thanks, Wim!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36811 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0a51dbde98d0d46c22e46a455ee04398e9781db7 02-May-2010 Axel Dörfler <axeld@pinc-software.de>

* Unified the Desktop and ServerApp AS_ACTIVATE_WORKSPACE to work in the same
way.
* Use that newly exposed feature of taking the focus window to the new workspace
when using the Ctrl-Alt-Shift-Arrow shortcut.
* This fixes #5675.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36585 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b13b0b0f4ef555bcf4467f76c069ad910d968cd4 11-Apr-2010 Ithamar R. Adema <ithamar.adema@team-embedded.nl>

* Make sure LinkSender knows team ID of receiving team; this fixes the >64k ServerLink transfers.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36154 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8b56f14aeba18bc3cea7e8f12708c7b155b374fa 12-Mar-2010 Stephan Aßmus <superstippi@gmx.de>

Fixed debug build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35820 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 87e7b978aacfb3de11892ccd71894acf675ab0b8 15-Feb-2010 Axel Dörfler <axeld@pinc-software.de>

* Fixed race conditions in the server's bitmap/picture handling: the objects
are now removed from the maps as soon as the client deletes them. This also
makes the "client reference" mechanism superfluous I introduced earlier.
* ServerApp::SetCurrentCursor() must always call Desktop::SetCursor(), since it
is also called whenever the current application changes. This fixes the cursor
almost never changing.
* Renamed ServerPicture::Usurp()/StepDown() to PushPicture(), and PopPicture().
* Also, they now acquire a reference to the picture in question (ie. the picture
you get from PopPicture() also owns a reference you need to free).
* ServerApp::CreatePicture() may fail, too. This case is now handled in the code
that calls it.
* Previously, the ServerWindow tried to process up to 70 messages in one go.
That obviously caused bug #4709. Now, we have the additional requirement to
not hold the desktop lock for longer than 25 ms. I haven't tested it with
Kaleidoscope yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35472 a95241bf-73f2-0310-859d-f6bbb57e9c96


# afad65b245eb0c70300cbef4929db0ff8ccbec00 19-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Bitmaps and pictures now maintain their client reference independently;
clients can no longer release more references than they own.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34130 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4b0459b2eef38f07b8c0c4426860dccb61a1134a 04-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Refactored ServerBitmap a bit: it now inherits from Referenceable instead of
roling its own solution.
* Also removed BitmapManager::DeleteBitmap() - you only call
ServerBitmap::RemoveReference(), and that one will notify the manager if
needed.
* Some more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 85a7877f80790d60e084ba8d7e6f1ae5f9a6fee1 04-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* ServerApp's bitmap and picture handling was completely broken, as it ignored
concurrency as well as reference counting, causing occasional crashes and
memory corruption.
* ServerPicture now subclasses Referenceable, and will notify its owner when
it's going to be deleted. This might bring some regressions, although I
couldn't spot anything wrong yet.
* ServerBitmap will now also notify its owner when it's going to be deleted as
well.
* Switched from the former picture/bitmap lists to a std::map. This also solves
the issue of not checking whether or not the bitmap/picture actually belongs
to the ServerApp (before, all apps could access and delete all
pictures/bitmaps)
* Introduced a new fMapLocker that guards the new maps.
* ServerWindow now uses GetBitmap()/GetPicture(), and gives up its reference
after use.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33876 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3d2dfb860d8d09d2a4fc0625f548480866e3216a 04-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* More cleanup, improved error return codes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33872 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 926e63c8851f8e1d085981e69ef03f8e9cda1e65 22-Oct-2009 Brecht Machiels <brecht@mos6581.org>

* added click to focus mouse mode; right-click for bring-to-front and send-to-back
(might cause some regressions in FFM)
* made accept first click user configurable
* updated the Mouse preflet to use the layout kit
* removed the warp and instant warp modes from the Mouse preflet
* changed internal representation of mouse modes (warp modes moved)
* coding style fixes



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33732 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9fe35223cf4eb9714865152d62e8efc36b327fef 26-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* BWindowScreens had no sychronization mechanism whatsoever - since the
workspace activation message was asynchronous, whether or not the
BWindowScreen stopped drawing in time was pure luck (this also caused crashes
with the VESA driver, as that one unmaps its frame buffer during mode switch).
Introduced a new AS_DIRECT_SCREEN_LOCK protocol for this.
* In the long term, we should let BWindowScreen use the same mechanism as
BDirectWindows, though.
* Removed superfluous locking in BDirectWindow::_InitData().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32746 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8bca36b1cdc0720ed8088baa3c9c3cb32648de0d 27-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed locking order reversion as spotted by Stefano.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32744 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 78ca6157b696f676eaa004e60d7d055f186df204 27-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Changed AS_GET_SCREEN_ID_FROM_WINDOW as well as AS_SCREEN_GET_MODE to no
longer hold the window lock. There is now a lock that guards screen changes
in particular. This fixes the deadlocks seen in apps using BDirectWindow.
* All direct window handling now sits in the Desktop class -
ServerWindow::HandleDirectConnection() is never called from anywhere else
anymore. Furthermore, it's now only called when actually needed.
* Resize/move actions now always send a B_CLIPPING_MODIFIED flag, too.
* When the screen changed, the driver state is supposed to be B_MODE_CHANGED,
not B_SCREEN_CHANGED (which is a message constant).
* Direct windows are no longer suspended too late on screen changes.
* Removed unused members of DirectWindowData, and cleaned it up a bit.
* Made MultiLocker's default, and copy constructors private - I accidently
used them, causing the ASSERT_MULTI_*LOCKED() macros to fail.
* Added Unlock() to AutoWriteLocker as well.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32742 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fe9c291b299b75ef0e1b2bb6f5ae31c3b03c4c67 24-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Since ServerWindow::Window() can also be NULL in case the window hadn't been
added to the Desktop yet, we better make sure in AS_GET_SCREEN_ID_FROM_WINDOW
that this is not the case.
* Removed the now superfluous ServerWindow::IsOffscreen() again.
+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32653 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f277acc9cd89243e00e3c63578abcb2be670040c 22-Aug-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Don't crash the app server if the user calls BScreen(BWindow *) supplying
an offscreen window (Magnify does that, and that's the cause of ticket #4304).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32611 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 91d5822a7c0a340c216fa9703cc568935366aa18 21-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* The code to handle AS_GET_SCREEN_ID_FROM_WINDOW did not lock the desktop,
which got unnoticed since the former Desktop::ActiveScreen() never changed.
This fixes bug #4301.
* Also fixed a possible deadlock on application crash with a kWindowScreenFeel
window; the locking order of the Desktop's and the ServerApp's window lock was
reversed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32578 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fe7f167df18f61d4974900e282f9f8c5720e36cb 21-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Resolved a TODO and got rid of Desktop::ActiveScreen().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32566 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5e3f4c41a64d68b93b88e66bb00d6d4d5092c0e4 20-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* ServerApp now maintains a mask of workspaces with temporary mode settings,
and reverts the modes if the app goes away (ie. if it crashes).
* Desktop::SetScreenMode() also set the mode on the current screen, even if
it should have been set on another screen.
* Cleaned up the Desktop.h header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32564 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e18224cdf4738dd04ea4f386aea2efa7bc5aa857 21-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a new AS_GET_SCREEN_FRAME function, as getting the frame via
AS_SCREEN_GET_MODE won't work with multi-screen support anymore, and is also
more overhead than needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32559 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0eed9183061a7763972bc2589f9c43489cd078ab 20-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Rewrote screen configuration management: VirtualScreen doesn't have anything
to do with the configurations now, instead, there is a separated
ScreenConfigurations class that maintains all known screen_configurations
per workspace (and the Workspace::Private class has two of them, one for the
current modes, one for the stored modes).
* Added Desktop::{Get|Set}ScreenMode() methods, ServerApp now only calls those.
* Getting and setting of anything else than the current screen is now supported.
* This change also fixes that a temporarily set screen mode was not being
restored on workspace switch.
* Also, the Deskbar now seems to have the wrong location a lot, which is
something that should be easily fixable therefore. I will look into this next.
* Got rid of the unhandy screen_id structure server side, and in BPrivateScreen;
we now just use an int32 - the next API break should definitely replace the
screen_id with a simple typedef.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32541 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e4ea54bdb7604cad577e2ecdbdf2f0e4c783eb84 15-Aug-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Getting the screen mode should be protected, at least by a read lock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32420 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1592b6fb4cb7460c1589065f49352607483dc96c 11-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Made the comment a bit more useful.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32245 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6c36406800aa725b2b3dbe03d689c4c7ec0aef8c 11-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleanup, no functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32244 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 69f9a367bc3ade44eaf73a5b1c51c079acf702cd 29-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* The app_server no longer uses workspace counts internally, but only columns,
and rows.
* set_workspace_count() now uses the logic formerly found in
WorkspacesView::_GetGrid() to determine the layout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31958 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 55feb44e8295438c82f88ace160d39b6ad7eb168 28-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

BScreen uses ~0 to denote the current workspace *index*. This should fix
ticket #4144. Untested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31864 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 47d9ed62d33e873f57fb672e288d0dde706ce354 27-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Added AS_GET_WORKSPACE_LAYOUT to get the number of columns/rows of the
workspaces.
* Added shortcuts Ctrl-Alt-{Left|Right|Up|Down} to switch to adjacent
workspaces.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31824 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5c5195ee7eef64a9b7b8dbb443a223e5272faf2d 20-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

Fixed regression in SetViewCursor(). It wasn't possible anymore to switch
back to the system default cursor. For that cursor token, the global cursor
manager returns NULL.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31138 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 19e179ca4ff838084b9abb0dd19932ac5fcd0051 19-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

* Moved the implementation of SetViewCursor from the thread of the
window of the view into the application thread. This solves the
race condition with asynchronous SetViewCursor and deleting the
cursor immediately afterwards for real.
* The ServerApp now requires a reference to the current cursor,
just in case...
* Added TODOs for caching the BView token, it's currently resolved
for every single BView call that talks to the server... not good!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31133 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5d62f8e0e50738a4274fbe53d73795809ac7d2c5 20-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

Make it possible to properly use operator= on BCursors by making sure the
reference counting is maintained correctly in the app_server. While reviewing
this code, I have my doubts that my previous solution for handling pending
SetViewCursor() calls is always working as it is intended.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31131 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c65cf0ae1ab1f65dc360ee195f4d418ec76b3ee9 01-May-2009 Stephan Aßmus <superstippi@gmx.de>

Fixed warning.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30563 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fc235d5599698adb8eb0236e87d0d3d070c53278 20-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

Patch based in large on work done by Philippe Saint-Pierre:
* When a BApplication is created, the interface kit globals for this team
are initialized, including be_plain_font, be_bold_font and be_fixed_font.
The plain font specifically is assumed the default font for all BViews.
A BView is not required to every set the font, it will then just be the
plain font, because the app_server already assigned it when the view is
created. Here is where the problem starts. When the system fonts change,
they change on the app_server and are picked up by new applications. Old
applications will run with the old fonts, because the values remain the
same and are stored in the already initialized be_*_font globals. So this
was never a problem. What was a problem is that the app_server would use
the current plain font for applications which were already initialized
before the font was changed, so the values in their be_plain_font would not
match the values in the server side font used when creating new views.
* This patch already prepares for the situation in which client applications
want to update their be_*_font globals. This needs to be a manual act of
the client applications, otherwise we would break existing apps. Maybe we
could automate this for BWindows with the B_AUTO_UPDATE_SIZE_LIMITS flag
and any child views with B_SUPPORTS_LAYOUT.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30282 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4fba3522e02906506b6c713ef5b57d72e9458fef 11-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed src/kits/tracker/OpenHashTable.h. The shared version in
headers/private/shared is newer, though with small interface changes.
* Removed the unnecessary Debug.h include in
headers/private/shared/ObjectList.h.
* Adjusted sources using these headers, mostly by adding missing includes.
* Lots of automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30123 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e4737a9260c764b22b6da57100199428e3bad24d 31-Dec-2008 Axel Dörfler <axeld@pinc-software.de>

* Added a third hinting mode: monospaced fonts only. This is especially helpful
with low resolution devices like the EeePC - small fonts can look pretty bad
when hinting is turned on, and you still have the advantage of hinting for
text editors and the terminal.
* Added a ServerFont::Hinting() method (that currently only evaluates the
global hinting setting).
* Added a TODO comment on why having global settings is not what we aim for.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28837 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 27c43a2d8f20fd98050c6acd9abac970b1d4d7c8 08-Dec-2008 Rene Gollent <anevilyak@gmail.com>

Implement the missing pieces to handle per workspace display mode support.
Adjust Workspace view to correctly scale each workspace based on the
resolution of that workspace. This exposes one or two anomalies in other
places in the app_server code though which I wasn't able to track down.
This fixes ticket #693.




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28785 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33309cb5fceef4141aefe77c63262f4cc53e5855 05-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* BWindowScreen::_InitClone() was broken, it called the "get clone info" method
on uninitialized accelerant, but that's what AS_GET_DRIVER_PATH is for.
* This should fix #2847.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28534 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5f8c1a02449cf804ff7c4e0ba591cfc3534c2ffd 09-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Remove unused RamLinkMsgReader. Its functionality was integrated inside LinkMsgReader/Sender by Julun.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27387 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 345d8c9ff0384490f68e5771bfd935eecd3259f4 12-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26962 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ae0606be749b5b16f3ec706c24bcb488d7f5ac96 12-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Added two more private InterfaceDefs functions: get_application_order(), and
get_window_order() will retrieve the application respectively window order
on the selected workspace.
* Moved private BeOS compatible functions (as used by the Deskbar) into the
private WindowInfo.h header.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26951 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 59e13a3f06eedbc797f797da71c6810634b22cd4 03-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

Patch by Andrej Spielmann (GSoC):
* Simplified the subpixel related methods for the AGG "pixel format" template
interface, the ones for the solid cover simply pass through the existing
methods, so only one subpixel blending function is left which does the actual
work (this removes a lot of the previously added code)
* Implemented a new rasterizer based on the original AGG rasterizer which
implements subpixel anti-aliasing for any generic AGG vector pipelines. It
is now optionally used in Painter and AGGTextRenderer (for vector fonts, ie
rotated, sheared or big enough fonts) depending on the global subpixel
setting.
* Put all subpixel variables into the new GlobalSubpixelSettings.h|cpp
* Simplified DesktopSettings related classes a bit and renamed previous
FontSubpixelAntialiasing to just SubpixelAntialiasing.
* The private libbe functions for subpixel related settings moved from Font.cpp
to InterfaceDefs.cpp where other such functions live. They are not related
to fonts only anymore.
* Removed the subpixel related settings again from the Fonts preflet and added
them to the Appearance preflet instead.

All of the above implements subpixel anti-aliasing on a global scale, which
to my knowledge no other OS is doing at the moment. Any vector rendering
can optionally use subpixel anti-aliasing in Haiku now. The bitmap cached fonts
are still affected by the Freetype complile time #define to enable the patented
subpixel rasterization (three times wide glyphs). Vector fonts and shapes are
not affected though at the moment.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26755 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dcd70f0e3967582a60a8012431246a3632bf65de 26-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

* Introduced new BBitmap flag B_BITMAP_SCALE_BILINEAR.
* When drawing BBitmaps with scaling in the app_server, use a bilinear
filter when a bitmap has this flag set. (Hope nobody objects, otherwise
I can revert or improve this. Performance can certainly be improved, since
the AGG implementation is too generic. But that goes for the nearest
neighbor implementation as well.)
* Flags are uint32, fix app_server side code to declare them correctly. Use
appropriate link methods in BBitmap and ServerApp.
* Enable the BeOS compatibility mode for B_RGB32 (works just like B_RGBA32
in B_OP_ALPHA mode).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26649 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b09e2f6f4bcda91da778d565b7a814841bad05a6 10-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Patch by Andrej Spielmann (GSOC):
* Extend the app_server protocol by configuration options to turn
subpixel font rendering on/off and also make the glyph hinting optional
(aligning of glyph shapes to the pixel grid).
* Implement the setting in the app_server and also handle the persistency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26362 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f592fcef43a871aaa0e89bf306e14ec71500d7df 01-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

stippi + bonefish:
Fixed race conditions when a ServerApp or ServerWindow is created. The
reply to the client that the object has been created successfully was
sent in the thread creating it. Preempted at the wrong time (right after
writing the message to the port) could lead to the object's thread using
the link at the same time, which would screw up all subsequent
communication via that link.
This fixes the problem that mimeset would sometimes fail when building
Haiku in Haiku (can't find the ticket). It probably also fixes #2331,
and the bug that sometimes when a window is opened (Terminal, crash
alert, shutdown window, etc.) it would come up with huge width/height
and tiny other dimension (can't find the ticket).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26192 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6ec21b4ad380a417f21835299ebb928b8f39a806 03-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* Implemented retrieving additional bitmap support flags by the app_server.
* Added B_BITMAPS_SUPPORT_OVERLAY flag to indicate overlay support for the
color space.
* Rewrote GraphicsDefs.h - the previous one was obvious a copy of the Be header,
including typos and strange white space. I was a bit lazy with respect to
the color space details, and mostly trusted the information provided by the
Be header else.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25793 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8a2dad71cc46467f6fe5495946a502d2e9bf966c 18-Apr-2008 Karsten Heimrich <host.haiku@gmx.de>

* no need to reply, as set_ui_color won't read it anyway
Fixes some strage behavior (moving/disappearing text) in
Appearance preflet while moving a color control chooser.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25035 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ace2d5ee376ad7d772cd313781ea2f912409f299 02-Apr-2008 Stephan Aßmus <superstippi@gmx.de>

HWInterface::Cursor() and therefor Desktop::Cursor() accessed the
current cursor without locking, and did not add a reference while
using the cursor. I have tried to solve both problems by introducing
a simple ServerCursorReference class, which makes sure that the
reference count is properly maintained. There are only two places
where this code was even used, from within ServerApp and when taking
screenshots. Axel, you mentioned in #837 that the code is unsafe, is
this what you meant? This hopefully fixes #837, but it is very hard
to reproduce in the first place, I will close the ticket, but it should
just be reopened if ever encountered again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24741 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9dbce7a4e74e3a5093dbca56590b08510ba96c73 28-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* AS_CURRENT_WORKSPACE now holds a single window lock before retrieving
the current workspace.
* This should fix bug #1765 as far as the app_server is concerned.
* Cleanup, removed extraneous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24632 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 437b19277feacd48292ca9ec814a38da17e4eb89 08-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Removed severly outdated DebugInfoManager.
* More "layer" cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24305 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 953d895e020ece5d50cfc2e76d9f370ceb5c45e7 07-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Got rid of the "Layer" part of WindowLayer, ViewLayer, WorkspacesLayer
(now WorkspacesView), OffscreenWindowLayer.
* Renamed ServerScreen.cpp/h to Screen.cpp/h (the class was already called
Screen).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24303 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a4de7fa0fa41cc3cae689ae24a1245e296272ea5 27-Feb-2008 Axel Dörfler <axeld@pinc-software.de>

* Do not trust the client! ServerFont::GetEscapements() now takes a
parameter for the length of the arrays, so that even if the char/byte
counts do not match, no memory is overwritten anymore.
This fixes bug #1862; .canna obviously contains invalid UTF-8
characters, or there is a bug in StyledEdit (or deeper) and it doesn't
call BFont::GetEscapements() correctly.
* Fixed some cases of unchecked allocations in the font handling methods
of ServerApp, added TODOs to all other ones.
* Improved error code when creating a window fails.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24160 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2e3233d74e16f90a6ae916935dc65ea53b4364de 29-Nov-2007 François Revol <revol@free.fr>

Propagate set_ui_color() up to the DesktopSettingsPrivate class.
Still needs code to save the values.
Also needs a way to access them from Decorator::UIColor(), but the DesktopSettings passed to the ctor can't be cached.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23024 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6ae06ef86a9612a2fb6ce22d177c48722b28a9a3 29-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

Implemented AS_IDLE_TIME, this closes bug #1593.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22758 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c27844865341578ec602735e06ecba0bd188cdeb 15-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* Introduced a monitor_info structure and means to let it be filled by the
accelerant (or the app_server via EDID info). It's still experimental
API, and opinions are welcome.
* Moved BPrivateScreen into the BPrivate namespace.
* Rewrote Screen.h.
* Introduced a BScreen::GetMonitorInfo() method, and implemented it in the
app server as well (ie. AS_GET_MONITOR_INFO).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22563 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e2693621b6e93462629d439effd550df7f64ac49 30-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

Correctly implemented the missing BBitmap::GetOverlayRestrictions() on the
client and the server. This should fix bug #1490, but I haven't tested it yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22388 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f7e1df75609966bdfdb4ed39edf26dd145d8221f 16-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* get rid of RGBColor usage where it is not needed, this simplified many things,
possibly making them a little faster too
* mess with decorator button size calculation to make the whole layout scale
more agreeable with the font size (no more fixed offsets/insets), but it
is work in progress
* DefaultDecorator no longer allocated the border color array, it is part of
the object now
* small memory footprint optimizations in ViewLayer, Decorator and WindowLayer


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22003 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38daa5cd6e789ad5df2b719ad0843f3431f86854 13-Aug-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Also upload/download subpictures


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21926 a95241bf-73f2-0310-859d-f6bbb57e9c96


# edac8f06a8052817ba9cf3b668fe13ea879a4e88 13-Aug-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented drawing of pictures inside pictures. Thanks to Marc
Flerackers for clarifying some things.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21920 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aadc09c6651a6b4c522f91d3cc9f137064a66896 11-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* fix the mixup of charCount (glyphs) versus bytes. The new font cache
implementation takes the byte count, even though it looks like this is
less efficient when the glyph count is already known (I tested to
optimize it away but it was not faster)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21891 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25a706165200f555d65fba7648a0092a64c018af 02-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* moved AGGTextRenderer alongside it's pal, Painter, it felt lonely,
removed font_support folder
* ServerApp can use ServerFont::StringWidth() directly again
* more ServerFont functions implemented via GlyphLayoutEngine and
custom consumer
* extended GlyphCache data structure to hole the left/right insets
of the glyph shape between its advance width, took it from the earlier
ServerFont implementation, have not tested if that gives same result
as R5
* TODO: implement GetGylphShapes via GlyphCache, although it might not
look as clean as it does now


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21805 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1a6914c5175839a9579543d087b1f15bc9d9f3f0 02-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* fixes the build, forgot to include in r21797


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21800 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38287e02afe4c0b08ae1c2c3279bb8d3a2e07fc2 22-Jul-2007 Stephan Aßmus <superstippi@gmx.de>

* completed my changes to DrawState handling, the current DrawingState
of the active ViewLayer is now always mirrored in the Painter instance
of a ServerWindow, so that it doesn't need to be synced on every drawing
command, this was previously incomplete for font handling
* removed the DrawState parameter from all the DrawingEngine functions
* adjusted ServerWindow and ServerPicture accordingly
* made sure that string related functions used by non-drawing related
parts (ServerApp, Decorator) don't interfere with the current drawing
state
* moved AS_SYNC handling from _DispatchViewMessage to _DispatchMessage,
it is actually a window message and doesn't require fCurrentLayer to
be valid
* fixed bug #1300, fCurrentLayer was not updated when a ViewLayer was
deleted by client request which happened to be fCurrentLayer (I am now
handling it so that the parent becomes the current layer, could be
wrong)
* AGGTextRenderer is no longer using it's own scanline, which should save
a few bytes RAM, the Painter already had such an object
* StringWidth() in AGGTextRenderer is now taking the escapement_delta into
account
* Painter::StrokeLine() doesn't need to check the clipping as much, since
that is already done in DrawingEngine
* if a ServerWindow message is not handled because fCurrentLayer is NULL,
a reply is sent in case the messages needs it (client window could
freeze otherwise, waiting for the reply for ever)
* removed unused AS_SET_FONT and AS_SET_FONT_SIZE
* added automatic RGBColor -> rgb_color conversion to RGBColor.h
* minor cleanup for 80 char/line limit



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21685 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5f43b49ba05a837a4d72fb9c04258188e2e49bcd 18-Jul-2007 Ryan Leavengood <leavengood@gmail.com>

When I added my BuyNow screen saver to the image and ran it, the app_server
crashed. Turns out a call I use, BFont.GetBoundingBoxesForStrings was not
implemented, and worse, there was bug in how the ServerApp read the parameters
from the link. This was easy to fix to stop app_server from crashing, but it
took me a while to figure out how to implement GetBoundingBoxesForStrings.

Anyhow I implemented an initial version which works fairly well for now. I
don't think the width is quite right, but it seems to match StringWidth(), so
I guess it is good enough for now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21652 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 117b384e5ea73689b02264424911b0848be47962 27-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

* Implemented the overlay suspend/resume protocol on mode changes; not really tested
yet. Also, BBitmap::LockBits() should probably fail when the Bits() are NULL.
* The downside is that many more classes now know of each other.
* Cleaned up the work divided between the BitmapManager and the Overlay class.
* Fixed a memory leak in AS_CREATE_BITMAP in case the bitmap could not be added to
the ServerApp's bitmap list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21512 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ff32e5158c98c4dd9eab938af32667fff625786e 03-May-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

ServerPicture now uses a BPositionIO object as internal storage instead
of BMallocIO. Added an additional constructor to handle a file. This is
in preparation of implementing BView::SetDiskMode().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20996 a95241bf-73f2-0310-859d-f6bbb57e9c96


# caae1184ab222773b6bbb3c1db08791c2354f396 01-Mar-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

When creating a picture with data, the app_server was writing beyond the
allocated memory, without telling anyone. That was causing bad things to
happen. Flattening and unflattening BPictures now works, and
consequently, printing works too. Bug #1014 is fixed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20285 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cf2aeb201fe3785161bb0502effba053b0d76879 21-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

* Implemented BDragger::{Show|Hide}AllDraggers() and its backend in the app_server.
This fixes bug #242. The value is currently stored in a separate file.
* Removed some unused codes from ServerProtocol.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20188 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 89eb4cd6c992af20ed413de6bb2bd50fdb910647 02-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

Now checks the screen mode to be set if it is already the active one (and do nothing if
that's the case).
Accidently this also fixes bug #1010.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20049 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e30afed4394414aa6ca3163de20901c0b3b367c6 19-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

As per Ingo's request, I moved calling BRoster::Private::UpdateActiveApp() into
the app_server (and updated all comments that said otherwise).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19865 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 10f6ed940bffa4153ff5511897bcc823b1f2d792 17-Dec-2006 Stephan Aßmus <superstippi@gmx.de>

* implemented "false bold" for text rendering. It is a new property
of BFont. You can BFont::SetFalseBoldWidth(float) a width on a
BFont object, and it will cause the glyph shapes to be run through
an AGG "contour converter" so that they become thicker or thinner.
IIRC, this is commonly referred to as "false bold". The "width" value
is the distance in pixels that the new glyph outline will be offset
from the original outline.

It would be nice if someone could look at my change to View.h with
regards to the B_FONT_ALL flag.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19547 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7dfa04527ca74a8512c56851f06e9924fc5f7800 17-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19074 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6edab6011e23437c2cda1a80cf988427f8652658 11-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

We must not have the font manager locked when locking the desktop (no matter
if read or write); there are some methods that cause a locking of the font
manager (like ServerFont::SetFamilyAndStyle()).
This fixes bug #885.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19051 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c585b1f46df25a610b39200ab7bb4d4f25c4b4cf 03-Oct-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

GetEscapements() didnt' take the font spacing into account. Looks like the spacing is ignored by the font backend, though, am I correct?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18990 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a17c3a48b84013d5c1ab684fd5bf9961eee3d7d9 26-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Changed the way DesktopSettings work:
* Removed the DesktopSettings lock itself - it's not really needed at all,
and causes some trouble with a clean locking design. This may even have
fixed bug #757, at least I couldn't reproduce it anymore.
* There is now a class for read-only access that requires you to have locked
the desktop (either read or write).
* There is now another class LockedDesktopSettings that allows you to set
settings (and only that) - when you're changing the settings, you must not
have read locked the desktop (ie. hold the single window lock). The class
will obtain a write lock, but write locks can be nested.
* Moved SetWorkspacesCount() into the Desktop class.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18646 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3a44e6e37d60b599f911009054aeac3a729f794f 19-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed a big race condition in the server code:
* ServerApp was accessing ServerWindow::Window() (while having the app window
lock held), but in fact, there was no guarantee it already existed, or was
added to the Desktop.
* Therefore, the Window() semantics have changed to only return a window in
case the window exists *and* has been added to the desktop (the latter
constraint might be lifted again, though). Therefore, it doesn't work
for offscreen windows, and should not be used within ServerWindow code
anymore.
* This fixes bug #686 and maybe others as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 82584ab9c2996ff4dec740d64eb78c7c0b74c900 09-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented AS_DIRECT_WINDOW_SET_FULLSCREEN so that it sets kWindowScreenFeel
when enabled, and B_NORMAL_WINDOW_FEEL when disabled. IOW when enabled, no
other windows can interfere.
* Therefore, it's no longer necessary to have the screen_blanker window
use kWindowScreenFeel - it will set its window to full screen as long
as the blanker runs.
* Added a AS_APP_CRASHED notification in the app_server that will remove
all kWindowScreenFeels from the windows of the crashed app.
* This is now used by the debugger to ensure that the debugger alert will
be visible.
* Factored out a DesktopLink class out of the BRoster::_ActivateApp()
method. This class is now also used in the new BRoster::_ApplicationCrashed()
method as used in the debug_server (via BRoster::Private).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17785 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4f4035561fa312e2059e8a28ed0cb538f0b9a15d 02-May-2006 Axel Dörfler <axeld@pinc-software.de>

Hacked AccelerantHWInterface::GetDriverPath() to call the accelerants
B_GET_ACCELERANT_CLONE_INFO (as that's what the caller actually wants).
Unfortunately, it's currently hard-coded to path names, that is, if there
is a driver out there that doesn't follow this quasi standard, it will
break this mechanism.
We should either change the driver interface to explicetly use path
names, or change the mechanism we're using (in BWindowScreen upwards to
the app_server) to the one as thought by Be.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17299 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5ec797a76f3bbb8ac83678bd568cee1d2e767d86 29-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

* improved getting the retrace semaphore, now the PrivateScreen
will not try to retrieve the retrace semaphore again and again
if the graphics cards doesn't support it for some reason
* disabled BScreen::WaitForRetarce() for now, since it will just
hang on ATI Radeon at least


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17266 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 23ae77aa566566465e1fca7aedbf0f1139acca1e 26-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* Removed ColorSet, it's no longer needed or used.
* The Decorator are temporarily using ui_color() - this needs to be changed
to use the DesktopSettings (when the decorator stuff gets refactored); right
now, the colors are fixed.
* Added B_WINDOW_TEXT_COLOR, B_WINDOW_INACTIVE_TAB_COLOR, and
B_WINDOW_INACTIVE_TEXT_COLOR to the UI colors, B_WINDOW_TAB_COLOR is no
longer deprecated. Note, however, that not every decorator may use these
colors.
* Removed unused and wrong (ie. hard-coded paths) stuff from ServerConfig.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17236 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6d5488e18ac47e1c47706227b9a21524ae7874e8 25-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* There is now a server_read_only_memory structure that is placed in a (surprise!)
read-only area shared between the Desktop and all applications.
* Right now, this area only contains the desktop colors, ie. B_PANEL_BACKGROUND_COLOR
etc.; ui_color() no longer needs to ask the server for these colors.
* The ui_colors are now maintained by DesktopSettings, though ColorSet is still there.
* The default colors are now hardcoded once and for everyone in InterfaceDefs.h, ie.
the app_server uses them as well.
* Desktop::Init() can now also return an error (but that is not yet accounted for).
* Cleaned up InterfaceDefs.h.
* Fixed wrong include in moreUTF8.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17232 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f7c7883b9f7be15d6ffcc066e0f75e3d878c7923 23-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* We now have working video overlay - even though the overlay_token handling
is currently broken, mode switches probably fail or result in sudden death
(didn't try) it's good enough for Radeon cards and VLC (might work with
others as well).
* Implemented follow modes for view bitmaps (wasn't taken into account at
all before).
* Switched to a darker overlay color for now (dunno what exactly makes a
good candidate there, but this one is good enough for now).
* Added TODO about a race condition in AS_LAYER_SET_VIEW_BITMAP.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17208 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 21c8c925d834845b599781b72192b10befc68ec0 22-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* With Rudolf's information about relocating overlays, I changed the way memory
is managed for those bitmaps:
- the shared client memory mechanism is used to allocate a small overlay_client_data
structure that contains the actual buffer and a semaphore that you have acquire in
order to access it.
- LockBits()/UnlockBits() now have a function: you need to call them before accessing
the overlay buffer, and you need to keep that lock until you're done with it.
* The overlay cookie is now an extra member of the ServerBitmap class.
* Removed fInitialized from ServerBitmap - IsValid() now just checks the buffer associated
with the bitmap.
* ViewLayer::Draw() will now handle overlay bitmaps specially and will draw the overlay
color instead of any contents (this is currently in ugly pink, but will become some
dark color later on).
* All what's missing from actually being able to use overlays now is to configure
them so that they are shown on screen. VLC will now show an empty pink window when
overlay video is enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17201 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f33610f874950e36978c238c83f1004592070481 21-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed number 1 (or the only one? ;-)) crashing bug #306 in the app_server:
Since ServerWindow removed itself from its ServerApp in _PrepareQuit(), it could
happen quite easily that the ServerApp was deleted before the ServerWindow - and
since deleting WindowLayer as part of that referenced the ServerApp, it crashed.
Now, adding/removing is both done by the ServerWindow in Init() respectively
the destructor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17198 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 37b502f28bf22293b4b060e8577e491d1c299ca8 21-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Implemented some more overlay support - the overlay bitmap is now allocated
via the graphics driver (but not yet shown on screen).
I probably got the meaning of the "overlay count" wrong - I guess that you
can allocate any number of overlay bitmaps, but can only see "overlay count"
on screen at a time (right now, I only allow to create "overlay count" bitmaps).
Stephan?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17193 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e520b288ca835c78eddcd975e25ed88e50e5a793 06-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed compilation with tracing turned on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17030 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c0a7267732ae2912dfbd625f18f2a75939fecb8f 03-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Minor cleanup: removed some unused commands.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16980 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 600fbd78e4d89c3666152fec0e857f11783c0258 01-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

* BView::FillRegion() sends the BRegion data instead of decomposing
it and rebuilding it on the server side (that causes a huge speed
up for regions containing many rects)
* There is a method in ServerLink that could have been used, but I
actually needed to add the direct BRegion support to LinkReceiver
* added LinkReceiver as a friend to BRegion class
* ServerApp and ServerWindow keep the CursorManager locked after they
have retrieved a cursor until they have called Acquire() on the
cursor. (Axel: what good is using atomic* stuff in Acquire() and
Release() if we have to protect this by a lock anyways?)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16957 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16ed1e1d15aac69c945890e5d5990bb41d9f4303 18-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Removed headers/private/servers/app - everything is in src/servers/app now.
* Removed DisplaySupport.h, wasn't needed anymore.
* Removed private color set functions from InterfaceDefs.cpp - we might want
something similar, but definitely not like that.
* Minor cleanup, added some missing licenses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38a6ea1d98b5b9d9d88f369f26c24f35262d9369 18-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Removed the old AS_AREA_MESSAGE stuff - it's currently not used at all, and
even though we might need something similar, we can't use it (since it was
based on BGet++).
* Removed BGet++, it's not used anymore.
* Removed ServerMemIO class, was never used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16830 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9a44fdc97c4c91b6be039ac5125a618c8fd268cc 18-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented a new client allocation method: instead of having all bitmaps of
all teams in serveral server areas, and instead of having to eventually clone
them all several times in BBitmap, we now have one or more areas per team,
and BBitmap will only clone areas once if needed. As a side effect, this
method should be magnitudes faster than the previous version.
* This method is also much more secure: instead of putting the allocation
maintenance structures into those everyone-read-write areas, they are now
separated, so that faulty applications cannot crash the app_server this
way anymore. This should fix bug #172.
* Freeing memory is not yet implemented though! (although all memory will
be freed upon app exit)
* There are now 3 different bitmap allocation strategies: per ClientMemoryAllocator
(ie. via ServerApp), per area (for overlays, not yet implemented), and using
malloc()/free() for server-only bitmaps.
* ServerBitmap now deletes its buffers itself.
* Cleaned up BBitmap and BApplication a bit.
* The test environment currently doesn't build anymore, will fix it next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16826 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a587720a30ade00969932cbbe5d03b18894ad677 11-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

print something to stderr when window creation fails

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16718 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1e766d4688da9cbaea73b0f10564fb0b3d708806 10-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Moved the ViewUnderMouse() functionality from the EventDispatcher to the Desktop;
this saves us some locking headaches and solves a possible deadlock in
ServerApp::Activate().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16688 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 87b1f40c0f241325ebc66f8734e3eb889ac386b8 09-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed misbehaviour of AS_SET_CURSOR: it will no longer set the mouse cursor
when it's not over a view of the application.
* The application cursor is no longer applied when the mouse cursor is over
the border (or tab) of a window.
* Gave up and imitate BeOS behaviour: the mouse cursor now always get the
shape the view below dictates, ie. it will no longer fall back to the
default cursor outside the focus window.
* The window is now set to the default in case there is no window under it
at all (ie. if Tracker isn't running).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16685 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9ce4e5b4ed4f524b077a35f13f9f17328b5fabff 09-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* The ServerApp now has the concept of a current cursor: this is either the cursor
of the view currently under the mouse, or the application cursor, if the view doesn't
have its own cursor (ie. it will no longer set the wrong cursor in certain situations).
* AS_DELETE_CURSOR has no longer an influence on the application cursor, as this grabs
a ref for its own use - this fixes bug #275.
* AS_SET_CURSOR no longer sets the cursor when the application is not active.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16678 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ed45b6652a428260b27986ee487ea2887b23471c 09-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Cleaned up AS_SET_CURSOR a bit: it now just calls Desktop::SetCursor(), and no longer
HWInterface::SetCursor() directly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16677 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 52b3e056cd6ff7f2bb7d68dec346f8a7ad8d3548 09-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

AS_SET_CURSOR now grabs a reference to the current app cursor, so that it won't be
deleted when the local BCursor object is gone. This should fix bug #275 (ScummVM
should no longer have two cursors), not tested yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16676 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3e2ee69551a2ab301f93a129863788dc0d9a9b20 02-Mar-2006 Michael Lotz <mmlr@mlotz.ch>

Started implementing the server side of BScreen()->ReadBitmap().
Colorspace conversion is not done yet so that it only works correct in 32bit modes.
Also drawCursor is not respected yet. Partially fixes bug 197.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16573 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f19839c230e64120d4b9e9fda83d1578445d232f 01-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Some groundwork for overlay support. If someone wants to finish this, feel
free to continue (it would be nice to be notified before, though, in case
I get to it again in the next weeks).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16561 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bfe698736ddb0a6dabeb8688120c2b1d20bcbf0a 28-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented private do_window_action() function, used by the Deskbar to bring
windows to front (or minimize them).
* Desktop::ActivateWindow() no longer crashes in case the window to be activated
is not on the current workspace - instead, it doesn't do anything at this
point. IOW it doesn't handle workspace activation at all, yet.
* Renamed ServerWindow::GetWindowLayer() to ServerWindow::Window().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16550 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2ed942c199a7fcc5b119566d5626adf5be3f251b 27-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* Added LinkReceiver methods that return the length of the string.
* AS_GET_STRING_WIDTHS now uses this method to send the strings to the app_server;
ie. it no longer sends the whole strings, and it saves sending the string length
separately.
* BFont::StringWidth() will now always return 0.0f in case of an error (instead of
some random value)
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16525 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 588259b66d15a3bde1fae53833230bbe28a4e8b0 26-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

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


# f877af82fefb0143773ffcfadff86058f38cc578 09-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented private functions do_minimize_team(), and do_bring_to_front_team()
used by the Deskbar (for "Hide All" and "Show All"). The latter doesn't work
correctly yet, though, it just maximizes all windows of that application.
* Added a TODO to ServerWindow AS_MINIMIZE_WINDOW on how to make it work correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16315 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8527f8ffbeb4b72a9502099b29aa6210b7832191 06-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

The display resolution is now saved and restored. Probably doesn't handle non-default
modes right yet.
The settings are stored in B_USER_SETTINGS_DIRECTORY/system/app_server/workspaces.
They are currently saved as a flattened BMessage - we might want to switch to the
driver_settings format, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16249 a95241bf-73f2-0310-859d-f6bbb57e9c96


# db5734a452fa53de2ed303eea64622c5d310280e 05-Feb-2006 Michael Lotz <mmlr@mlotz.ch>

More work on the BFont special functions.

* Reworked functions like GetEscapements(), GetBoundingBoxesAsString() and GetGlyphShapes() completely
* Made the ServerFont functions uniform in their prototypes and cleaned out unnecessary arguments
* Added new UTF8 handling functions to moreUTF8.h that are now used by ServerFont
* Put the common transformations of the FT_Face into an own GetTransformedFace() to lessen code duplication

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

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16241 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 195e980ef10d42d13bf8f4360d81eebda3b8417e 05-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* Cursors are now reference counted, so it shouldn't be possible anymore
to delete them accidently :)
* You should no longer call HWInterface::SetCursor(), but the new Desktop::SetCursor()
if you need to change the cursor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16238 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aa1f5437999ab8531f33139c129c6bcaceb74e7a 05-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Some work on cursors:
* Fixed a myriad of bugs all over the place, ranging from locking errors to
deleting objects that don't belong to the one deleting them (hello HWInterface!)
* Almost all ServerWindow cursor stuff was broken; I've replaced all commands
to set a cursor with a single one AS_SET_CURSOR.
* Renamed some cursor commands.
* Changed the (broken) way ServerApp::fAppCursor was maintained - the application
cursor is now NULL as long as possible.
* Removed superfluous ServerCursor app signature stuff.
* The BApplication will no longer duplicate the default/I-beam cursors, it will
just reuse the default ones which now have fixed tokens.
* As a result, changing the cursor is now working as expected, closing bug #102.
* Rewrote Cursor.h, renamed private members to match our style guide.
* Minor cleanup.

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


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16237 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bb96bd0a70d1cd2ac657a59016e70a1df4923909 04-Feb-2006 Michael Lotz <mmlr@mlotz.ch>

* Fixed GetGlyphShapes(). The BShapes that are outputted are correct now but the app_server still cannot draw them correctly.
* Changed the allocation to new for GetGlyphShapes() and GetEscapements() as the data is deleted in ServerApp.cpp
* Minor cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16231 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ff3abf4d6f7d48ce29fc2ff3e2937cdf89a65b08 02-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* 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


# df19082398bcec393dba5c3df50e47f1dcdd5a9d 12-Jan-2006 Stephan Aßmus <superstippi@gmx.de>

* cleaned up ServerApp header a bit
* added support for nested cursor showing/hiding


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15926 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cf6fe303d66468616a0dbadb879b6a8df68bc784 12-Jan-2006 Stephan Aßmus <superstippi@gmx.de>

* I decided having the cursor obscuring feature in the HWInterface class
was not such a bad idea after all.
* Reenabled obscuring the cursor in ServerApp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15925 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b073091ab3520507161989eafa550851caa66b6f 11-Jan-2006 Stephan Aßmus <superstippi@gmx.de>

* small cleanups
* reworded Activate and commented out all code
that actually tries to change the cusor shape


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15917 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7898383a8a16b52d26a01cc15218163ea5e18c87 05-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented AS_CREATE_PICTURE, started cleaning up Picture.cpp

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15843 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9c0c899e7d5d797fa8cceafe4016ad6c249425d6 04-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a copy constructor to ServerPicture. ServerPicture's constructors are private now, and can be called only from ServerApp (friend). Changed BList to a stl::stack which is better suited as a stack... Changed ServerApp::CreatePicture() to accept a picture to clone, instead of passing back a token which was never used anyway.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15840 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b41356006aef277792571274133e80dce6151be8 03-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implement AS_CLONE_PICTURE handler, needed to copy bpictures server side. Not tested yet

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15826 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c33148d102b4aff988cb557510caa4be5c6b080 02-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented handlers needed for Begin/EndPicture, and a handler for DrawPicture().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15816 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 843bc3cd0dd6421b0d7f2b14df7faacfc5a219f7 03-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

* Introduced an initial application workspace - should be retrieved differently,
though (ideally when launched).
* B_MODAL_APP_WINDOW_FEEL windows are now visible on the initial app workspace
in case it has no other window visible. This fixes the missing BAlerts in
the debug_server or just the "alert" command. Thanks to Stephan for pointing
this out.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15811 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 20c2f67293be1d3fa30fa690e4ca819ab05da42c 03-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added Create/DeletePicture to ServerApp

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15802 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fc6ec91732ba7dfe509e0c37fb72dec1f749f505 29-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented AS_SET_DESKTOP_COLOR - the desktop is not redrawn yet, but freshly exposed
areas will be filled with the new color.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15724 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 55fd3336b6bb6e3407377196f70991a01d081eda 29-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

* 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


# 51a523b14792f192490e6a09d13d313f5e870229 24-Dec-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

implemented AS_GET_ACCELERANT/DRIVER_PATH and renamed the relative constants

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15666 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1f0a4ee8c766f5176c2707539d6732298efab385 20-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

removed unused stuff from Painter and DrawingEngine, fixed the deadlock when trying to use the (20 times faster) DrawingEngine version of StringWidth, the font is now usually ignored when taking on a DrawState in Painter... should add a little speed overall

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15628 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4fbc3f58031322dac5276815ada9c20e66e5a70f 12-Dec-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Researched and implemented BDirectWindow::SupportsWindowMode() more
correctly, both for r5 and haiku


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15523 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1eed15a2d2ea4e652b7c003df3339931b3951e00 12-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

ServerApp no longer kills ServerWindows when they don't respond, but drops into
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


# 61fed21b0401ca13f44df07fcdda8690975e6871 12-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed Write[Un]lockWindows() to [Un]lockAllWindows(), and Read[Un]lockWindows() to
[Un]lockSingleWindow().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15509 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bff84e78b75f30be586ab5b8d29228c85cac8259 11-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

This enables BDirectWindow support again.
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


# 34227d2c345f87c9eeee09004f31e4713278a0c9 09-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

A couple of changes related to modal and floating windows:
* 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


# e83820ed5720395d39a1ff809991b4fd76326548 07-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

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


# 4c0269b979e64569c25a44567bb26a33f4877ac7 02-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

* WindowLayer::OnWorkspace() should now work correctly for all window feels.
* 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


# 85096c8acbb6e63a37dfa2707b8e232592381887 30-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Some cleanup:
* 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


# a8b49ab3108330558271c111f631a43256998506 30-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented AS_COUNT_WORKSPACES and AS_SET_WORKSPACE_COUNT server side.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15253 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5ca8477eca516c59dcc8f4981f47471b2bd5d1c1 30-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* the Workspace class is now hidden and put into Workspace::Private; the new
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


# 27adb969620d656c8d92dfa608cd85c35f4d37e3 28-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Massive RootLayer & Workspace tearing:
* 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


# ae0a90cedbc83cc3299a9793e7e49d482131878f 28-Nov-2005 Jérôme Duval <korli@users.berlios.de>

SetAppCursor also sets cursor status


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15205 a95241bf-73f2-0310-859d-f6bbb57e9c96


# df36243372fcfd038e2ea21196f33390cb04678d 26-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Now sends B_SCREEN_CHANGED messages to all windows when the screen resolution changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15167 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 26b02ddc808ad610a35d4666fb694a3b3ce4b997 26-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

The input_server is now notified when the screen resolution is changed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15165 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 67e79bf45aca758085d8272ba2c2c46415560361 25-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

A message looper can now have a death semaphore, ServerWindow now uses them.
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


# 4b813bf2670024494ff699a4a2ccb87ca3bccd61 24-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed WinBorder to WindowLayer, and OffscreenWinBorder to OffscreenWindowLayer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15128 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4ceb1e519c0447147b1d8b54a324bb7fedd3a606 20-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* reverted Adi's premature changes to BWindow and restored _DetermineTarget() and
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


# 63ea9a28702979e6a53229b6b4a9cdf3b5903feb 18-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Missing "using std::nothrow".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15021 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fa26723bb29d97b4bcb3437a60da21d59cd266b1 18-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Moved workspace keyboard switch and dump screen capability from RootLayer
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


# 8d8f5950d0c28592beaef5196091ef2a5ce92901 17-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Some cleanup, mostly GetHWInterface() to HWInterface().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15016 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f7598223274c44c551f1ed581030e6ed5268fe68 18-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* the new input event dispatcher is now actually used, although it doesn't
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


# 6c17d025516c9c1a271394f8ef618d842e68c716 15-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Introduced a new handshake between input_server and app_server, and some
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


# be05d56c7eea834b5983ba3411d79fabd8b616b7 14-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* the app_server now uses a global token space - this should later be changed to
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


# b66d7537121d617485e5f5c47d4deb7f79f20880 14-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Prepared the BScreen and BPrivateScreen class to be used with multiple monitors.
* 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


# d9525baaf5225ccac51a32b0fb2ba5d8c0b367cf 13-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Forgot to update Screen.h with the last commit...
* 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


# a817d6ad5a6b49ed79d84ce2e8a6e9c5f5150560 14-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* (tried to) implemented RootLayer::ResizeBy() and activated AS_SET_SCREEN_MODE again;
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


# dfd5b49996d7422a371a463a05ba98b6276995d5 11-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* last change set window title to "Unnamed Window" if the title was empty - but
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


# 90dfa70739c4afba1330e8bda26597fccef63d5d 09-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* ServerFont now also adopts the FontStyle's face and direction on
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


# 2fe84ae95feccc80f29269a4b340693b3091ea00 09-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Now AS_GET_DEFAULT_SYSTEM_FONT actually returns the default font as used
by the app_server (ie. also if it's a fallback font).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14805 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16f782ccbdfe4bf0ba9a674c2a7b5d7b8e37ac54 09-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented AS_SET_SYSTEM_FONT.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14803 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d0a688ee924b0f5ec82bf83d66b2fa97109ef452 09-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Introduced and implemented new font command AS_GET_DEFAULT_SYSTEM_FONT that returns
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


# e37155c67037f35d73ab9329f2ebebb9334b1d9c 07-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* The font list is now cached client-side. The app_server is only queried for
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


# b2cc345461400d6944e2de35ec6decc8d1af8751 07-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

More font work:
* 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


# 86ad4b9c5e7a763e27556a537a5246580dadc8ae 06-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

First steps into on-demand font scanning. When you've installed lots of fonts, this
will speed up launching the app_server considerably (once it's done).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14720 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6ed894182f5f5865f2f8a2b1c4dea7bf81324063 04-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

renamed DisplayDriverPainter.* to DrawingEngine.*

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14695 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aca4f50d1eefef8bf137cc16f5b707d223494377 04-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Merged DrawData and LayerData to one class DrawState.
Removed that ambiguous second copy constructor and moved push state functionality
into a separate PushState() method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14679 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 05bd1efe5b72256ccd4afa82fafb7da4ae045e0d 03-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* the FontManager is now a looper (but doesn't do anything useful yet).
* moved the system default font functionality into the DesktopSettings class.
* ServerFont::SetStyle() is now a public method.
* Improved font fallback routines: they will never end up without a font if
there is at least one font installed.
* fixed some minor bugs in the DecorManager.
* Decorator now get a DesktopSettings object passed - dunno if that's a good
idea (since we'll have to open the DesktopSettings header), but it works
for now (and something like this is probably needed anyway).
* a clean ServerFont is now set to the system default font - and not to the
(user chosen) desktop default font anymore (since the font manager doesn't
know about that one).
* Improved font directory scanning in the font manager a bit, it's now using
find_directory() instead of hard-coded paths.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14666 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8365d9ecd2ee3cbc483fb75e7094e39005912446 03-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* A ServerFont is now always valid, bye-bye ServerFont::InitCheck().
* The FontFamily is no longer reference counting itself.
* SharedObject is now more useful and destructs itself when unused.
* Fixed FontStyle::GetHeight()/ServerFont::GetHeight() semantics.
* Simplified ServerFont constructors.
* Removed wrong function descriptions.
* FontStyleHeight is no longer used: the FontStyle is calculating the
base font height on construction - this reduces the resolution a bit,
but it's hopefully not causing any troubles (doesn't look like it,
at least).
* A FontStyle now removes itself from its family on destruction.
* More cleanup, removed unused stuff like FontStyleHeight.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14657 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c9ff9a39d05bc20c6ab6afdb52dacf6448945726 02-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

ServerFont::StringWidth() did not set the size of the face, and could therefore
return wrong results. Activated it again to work-around the possible font deadlock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14654 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f1d3628119dc1fa9189fe956a60408f36854108f 02-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Apparently, ServerFont::StringWidth() doesn't work for fixed width fonts...
Will look into this later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14648 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cf550035dde7a9efe7f26dbcbba39a3d62926387 02-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

This works around a deadlock that frequently happened when working with menus (font stuff).
I should start investigate this one more deeply some time...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14646 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bdd34c028f89763afa318013894e0beb039bba97 02-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed the FontServer class to FontManager.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14642 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 26a2be8ba57f87fc8a5c6e5845defa5816f77329 02-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

less overhead when byte count of string is already known

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14639 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5d1bd031a2dc1a6b7a610da5f43e202fec25b079 02-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed some communication mismatches I introduced earlier: we are no longer sending
whole font_family/style strings (each 64 bytes), but only strings, because they
are usually shorter than 64 bytes.
This should fix the StyleEdit problems Stefano were seeing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14628 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fb2d4d51a71b78739e1014a733077386928ec9f5 02-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Removed unused variable (copy&paste remains...).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14626 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6f121769adf06a153c16e156989ea940a4d8f44d 01-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Added and implemented AS_GET_FONT_FILE_FORMAT - currently, it returns always
B_TRUETYPE_WINDOWS, though.
* possibly returned an uninitialized error code in some BFont methods.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14622 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b8cde4497e0a1d607bd7688742bd2926e4e4dcca 01-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

More font work:
* simplified BFont::SetFamily*() server communication - there is now only
AS_SET_FAMILY_AND_STYLE left, but at least that one works correctly.
* BFont::fFace is now always updated correctly.
* Moved the fFace masking to the server - BFont doesn't know enough to do
this correctly, anyway.
* Only one version of get_font_style() worked correctly.
* Font family/style ID and index were used completely mixed up - this
would have become an issue as soon as the font list changes during
runtime.
* Enabled AS_GET_FONT_DIRECTION again - missing functionality should only
be taken into account on lowest level as long as it can be emulated.
* Made FontServer a bit clearer to use (more to come).
* fixed several allocation leaks in the font server communication.
* New FontStyle::Direction() method, that currently only returns
B_FONT_LEFT_TO_RIGHT, though.
* more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14618 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1334ab472129e9ac0ca2408ebb8ed01f336f35b4 31-Oct-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

just some work, made sure to preserve app_server coding style


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14608 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d317ba74884bfebef66485f811a131dbc3b25d66 31-Oct-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

real men don't do any error checking


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14607 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9b1ad6f45e47ebe429f2fbc93a7900cb45caa5a3 31-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed a bunch of bugs in the font sub-system:
* BFont::Face() was almost always wrong - also on the server side,
_TranslateStyleToFace() was broken.
* a clean font was not correctly initialized to be_plain_font
* BFont::GetFamilyAndStyle() did not work correctly if either family
or style was NULL - which is allowed, and shouldn't have let it abort
its task.
* FontServer::GetStyle() by ID did not work reliably under certain
circumstances (but those were not reached with the current server)
* BFont::SetFamilyAndStyle() did not work when family was NULL, and
it also never set fFace correctly.
* Introduced a FontFamily::GetStyleWithFace()
* Renamed some FontFamily/FontStyle methods from ie. GetID() to ID()
to match the style used everywhere else in BeOS.
* Removed AS_SET_FAMILY_NAME as its no longer in use.
* Lots of cleanup and simplification.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14602 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 959a5a68bcb01c877ea6fe66211e60d54bab1ecd 31-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Removed global gDesktop variable - there is now an sDesktop variable in AppServer.cpp, but
that will go away, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14590 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cf5a01494085b86176147c73eb08aae1062267a0 13-Oct-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Merged two case blocks, thus removing some duplicated code.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14374 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f2fd12985205decda0138ba31d9b82865b6fe9e8 30-Aug-2005 Jérôme Duval <korli@users.berlios.de>

now uses delta escapement
improved GetBoundingBoxesAsString (just for fun, keep in mind we'll use AGGTextRenderer in the end :) )


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14091 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 29926b974b829129e43de6eab73b69a069dcbb6c 26-Aug-2005 Jérôme Duval <korli@users.berlios.de>

completes previous commit


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14076 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3cf915cb23b4ab87d244c5a37fb2c39526327401 26-Aug-2005 Jérôme Duval <korli@users.berlios.de>

spacing is needed for GetBoundingBoxes too (string case)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14072 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 697085a5aab25cc8aeba3e36a5a815deb2adce76 26-Aug-2005 Jérôme Duval <korli@users.berlios.de>

shear is needed for GetBoundingBoxes
now uses _GetBoundingBoxes_ for GetBoundingBoxesAsGlyphs and GetBoundingBoxesAsString


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14071 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2f23ef90dd1c72779c09cdb5fd035a636f41538b 25-Aug-2005 Jérôme Duval <korli@users.berlios.de>

added GetBoundingBoxesAsGlyph, GetBoundingBoxesAsString, GetBoundingBoxesAsStrings
real implementation with freetype still missing


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14062 a95241bf-73f2-0310-859d-f6bbb57e9c96


# af86ce75a07e5d2e119e46182489e12a22e7dabf 24-Aug-2005 Jérôme Duval <korli@users.berlios.de>

copyright update


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14058 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2b1263bedf5512d3312c6722a10c2d1184de391e 24-Aug-2005 Jérôme Duval <korli@users.berlios.de>

reworked BFont::GetStringWidths and BFont::StringWidth
implemented BFont::GetEdges


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14057 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2185eed6d2679fcb56d83287d9939d29608d9f44 23-Aug-2005 Jérôme Duval <korli@users.berlios.de>

implemented GetHasGlyphs for real


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14056 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3ddebe7ec23737814f02aeb99e2ed3eb0fb5998e 21-Aug-2005 Michael Lotz <mmlr@mlotz.ch>

Moved the CursorManager over to the Desktop too.
Maybe the CursorManager should be used to set the cursors directly instead of using
fDesktop->GetCursorManager.FindCursor() and then fDesktop->GetHWInterface()->SetCursor()
in ServerApp.cpp.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14033 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d863d4bf1d0abf169d895ac72145bc99c15e8bba 12-Aug-2005 DarkWyrm <darkwyrm@gmail.com>

Made scanning of all font folders a compile-time option
Moved the scanning of individual font folders to FontServer
Implemented server-side code for update_font_families
Removed ClientFontList from the build


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13938 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 770c05d6cc602b2e545e2ccae5a17c576881dc9c 25-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

The Desktop class now gets its own message processing loop: moved application
creation/deletion (and management) over to that class.
ServerApp now gets a desktop pointer, and no longer uses gDesktop.
Converted private MessageLooper::_MessagePort() to a public method MessagePort()
so that the looper can be addressed from elsewhere without using PostMessage().
Added a real basic message loop to MessageLooper::_MessageLoop().
BApplication now only asks the app_server to get its desktop object which should
now be used for everything that's not in the realm of the application.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13824 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 89ab121e66e7cd6136e4e561805b85acea3d046a 23-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Factored a MessageLooper class out of ServerWindow and ServerApp. Could still
be improved a bit (Quit() and _MessageLooper() are empty right now).
Removed ServerApp::PingTarget().
Hopefully cleared some confusion about ServerApp::fClientLooperPort and fClientToken
(previously fHandlerToken), even if it's currently unused.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13807 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 599be43472927a99764bc0a5fd9d9bf5d07cb150 19-Jul-2005 Jérôme Duval <korli@users.berlios.de>

Implemented GetHasGlyphs support somehow (FT support is lacking)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13766 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2213782534a8b17fdea5d7fc603360f4c9ac317e 17-Jul-2005 Michael Lotz <mmlr@mlotz.ch>

All cursor related changes:

* Moved setting the default cursor from ServerScreen to Desktop
* Getting the default cursor is now done using the CursorManager
* Removed outdated setcursor from SysCursor.cpp (we have a new implementation by now)
* Renamed SysCursor.cpp to CursorSet.cpp as that's what it is
* Moved headers/private/app/SysCursor.h to headers/private/servers/app/CursorSet.h
* Removed some unneeded header includes along the way

There remains {set|get}_syscursor now in CursorSet.cpp. Serverside for these are not implemented
and they are obvious hacks. Do we need to keep them?
Also this commit _would_ break Appearance, but 1) all the related code is currently commented out
with the comment "cursor set management belongs in another app" and 2) it is already broken
because of ColorSet.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13726 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ef8810f2adeb29b35fc895347011ad39bd591bd1 17-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Extracted the settings stuff from the Desktop class. If you now need to access
the desktop's settings, you have to do something like this:
DesktopSettings settings(desktop);
settings.SetMouseMode(mode);
The advantage of this is that this object is fully locked, and cannot lead to
corrupted settings anymore. Also, the settings will stay the same until you
delete the object again.
Updated all accesses to use this new API.
Removed no longer used FFM messages.
Implemented AS_{GET|SET}_MENU_INFO for future use.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13719 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16046321cc1ea02071b973c61d782755883bc9ea 13-Jul-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented BPrivateScreen::ReadBitmap(), but the guts are still missing

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13665 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3f319b3346fcc3f45786d9fb9c6ca698c4de7a22 10-Jul-2005 Michael Lotz <mmlr@mlotz.ch>

Some cleanup, some removed typos, some unification, some fixes and some added todos. Most of it related to client-server communication. Apps that rely on BFont stuff should work now (StyledEdit, Fonts, Keymap, Menu, ...). Or should not hang/quit at startup at least.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13625 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16e938888da430370cd2d1ec6d8879413bcaa3fc 06-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Some more debug output, so that you know which window is killed this way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13512 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6a0a0a80daf7b99da86f3d6085aff3525dd13b50 05-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented AS_GET_WINDOW_LIST and AS_GET_WINDOW_INFO.
Renamed Desktop::FindWinBorderByServerWindowTokenAndTeamID() to FindWinBorderByClientToken().
Every ServerWindow now gets a server token.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13455 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 359c905c57c9d43ce84badcaef859fa94322897c 05-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

offscreen bitmaps work, tested on Haiku as well, supports all colorspaces that BBitmap::ImportBits() supports. It uses a fallback for non-B_RGB(A)32 bitmaps. Added support for B_SUB_PIXEL_PRECISION view flags, though it is a bit hacky, since I had to add it to LayerData, even though it is not a true part of stack data. Added Layer::SetFlags() to enforce code path and update fLayerData. Cleaned up DisplayDriverPainter and DisplayDriver API (changed some const BRect& rect to simply BRect rect in order to be able to reuse it in the code), moved Painter.h, the test environment only draws the changed part of the frame buffer again - this causes a lot less CPU overhead, Painter special cases stroke width of 1.0 to use square caps, which is similar to R5 implementation and removes a lot of problems with non-straight line drawing, ServerWindow uses the DisplayDriver from it's WinBorder instead of the one from the Desktop (needed for offscreen windows, which have their own DisplayDriverPainter), it also checks for GetRootLayer() == NULL, because offscreen layers are not attached to a RootLayer, there was a fix for scrolling which worked at least in the test environment, it is now defunced, because Adi moved _CopyBits to Layer... I need to reenable it later, LayerData has no more fEscapementDelta, also fixed fFontAliasing (which was thought to overriding the font flags, and now works as such again), Desktop initialises the menu_info and scroll_bar_info stuff, which makes ScrollBars work actually... hope I didn't forget something.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13448 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c030c6fa68e6c6622abfbf769a5101c3b0ce0a31 01-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

As the comment says, deleting the cursor is not necessary.
But since every single cursor is owned by a team - why the cursor manager?
I must overlook something...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13385 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3870c9f18f109903c134d6d36271ec3e83e7a185 01-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Improved quit mechanism (for the last time): if an application had open
windows that wouldn't quit on demand, the app_server would have gotten
the kShutdownServer message anyway already (as the last app was quit).
Since that one removed things like gDesktop/gBitmapManager, it liked
crashing.
Now, there is a semaphore that will be send to each app on quit. Only
when this semaphore can be acquired, the shutdown message will be sent.
Removed unused semaphores (decorator, active app).
Replaced fAppListLock with a BLocker (just calling acquire_sem() without
error checking is very unsafe in userland, and should never be done).

BTW the bug was triggered by broken menu code that only sometimes
really quit the window; it leaves a whole lot of zombies around - Stefano,
any quick idea? :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13384 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1e1b96cdc18e12c182f6f2c7984ca05bb1ec12fc 01-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Rather than a "case message: /* unimplemented */ break;", we should not
handle the case at all to give the server the possibility to send a
failure response - ifdef'd some code out.
Added comment to ServerApp::PingTarget(), because what it currently does
does not make any sense.
Minor cleanup (replaced fSignature.String() with Signature()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13381 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 17867066967e7de14b01339fa569c38c8158e525 01-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

You're not supposed to delete bitmaps yourself; you have to let the
bitmap manager do the job.
This fixes a possible crashing bug on quit, a giant memory hole, and
probably also a possible crash during runtime.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13380 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9f5ffc2c3cbbe15f9b4141e6d6628228e298184e 27-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed BFont's GetTunedCount() and IsFixed()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13293 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 08d9a6e30d49aac2ac85f0d141408bb66f7712c5 26-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Some minor work on minimum window sizes. A WinBorder now makes sure it has
a valid size on construction; DefaultDecorator should do that as well.
ServerApp AS_CREATE_WINDOW now makes sure it passes a valid rectangle to
ServerWindow's constructor.
Smaller default size for Layers that have been created with an invalid frame.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13291 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 89d0b3cdadf23ce78fe59c886fc82c109bb56db6 25-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Safer code

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13275 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 55b222b0b02bcc53c7301f8e3200553f046bc4e5 25-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Stephan already implemented the needed support for dpms stuff too, so why not implementing the client methods too?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13274 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 75de27f83b9482a5a32fb06b7e1a20a14383d8c6 25-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

more BScreen related stuff

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13270 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 583f6c3eba3f0d46c6025ac9e15023826463da83 24-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added server side support for BScreen::ProposeMode(), fixed client side too.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13269 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c6418981503ea9b168a9944c49ffbe3c382ea572 24-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

implemented client/server side support for BScreen::GetDeviceInfo() and WaitForRetrace(), and (only client side) support for Bscreen::ProposeMode()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13266 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0ec4af22334b9ded101a81c7c25886ecc84a6129 23-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Improved AreaPool to have an initial size as well as well as a name that is
used for new area.
MemPool::AddToPool() now gracefully deals with NULL pointers (or a size of 0).
BitmapManager was deleting the area it transferred to AreaPool before - it
no longer needs an extra area, though.
Minor other cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13260 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b5436616a3528ac13645a3e73065474ef988c107 23-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed some style related functions and other oddities in FontServer.
Also applied our style guide on that class.
Renamed some public globals to match our style guide.
Made BitmapManager inherit from BLocker instead of duplicating its
functionality (incorrectly, did not check for B_INTERRUPTED) locally.
Some more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13259 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2949ed1def291d8d0fc05d0cb2b6ec01b5a7569d 23-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

Thou shalt compile before thou commitst.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13253 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3dcb3b079ab645a90859eba6505cf2692c291138 23-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

Added some root layer locking in ServerWindow.cpp when accessing the layer tree. Moved HWInterface management out of DisplayDriverPainter and into Desktop. Removed all the directly hardware related functions from DisplayDriver API. They just called the same HWInterface functions. Now DisplayDriver is much cleaner and ready for being attached to a yet to be written BitmapHWInterface. Clean up of the display mode stuff in Screen and the View-/AccelerantHWInterface. Frequency is now regarded on Haiku. AccelerantHWInterface::GetModeList now works before SetMode has been called. Added MultiLocker from the sample code. HWInterface uses it now in preparation to being used from multiple instances of DisplayDriver.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13252 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1b53e8af26fec8abbba112529036233f3b071e2e 23-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

The app_server now cleans up better after a team crashed; not only the
application and bitmaps are removed, the team's windows are now removed
as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13251 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ce1639b2bf1fc9f842e8f22a4a4cb035d2599a21 23-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Some more cleanup:
- replaced fMsgSender/Receiver with a BPortLink fLink
- moved message loop into non-static method _MessageLooper()
- renamed Zoom()/Minimize()/Quit()/ScreenModeChanged() to Notify*(), and
Quit() to NotfiyQuitRequested() to make more clear what they do (they
don't operate on ServerWindow, they just notify its client)
- less insane way to init a window: there is no longer the constructor
and a separate method Init(); now there is the constructor (which
fully sets up the window), InitCheck(), and Run() which runs the
window's message loop
- moved the quitting stuff into a separate method Quit() and made
it callable from other threads.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13247 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a38e46a046cbb27fef680a1c9f93b000663d70c9 23-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

ServerApp now maintains a list of all windows, ServerWindow's AS_DELETE_WINDOW
will update it automatically.
Renamed ServerWindow::fName to fTitle, made it a pointer - it will now just
adopt the title pointer that came from AS_CREATE_WINDOW.
Just another cleanup round: renamed Layer::GetName() to Name(), no
more layer->fName->String() accesses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13239 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fcb006dcf5e3396d905e09d127c085f7efb9b017 23-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Rewrote how the app_server and ServerApp's quit. As a side effect, the server
can now quit instantly.
AppServer must no longer call ServerApp's destructor once it's running - it now
has to call Quit() in this case. The ServerApp is now destructed in its own thread.
Some cleanup (like renaming ServerApp::MonitorThreadID() to Thread()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13238 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2e86adec11532e39de02af03dab30b12ee465c5f 22-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented AS_GET_MODE_LIST server side.
Fixed broken ViewHWInterface::GetModeList() - it did not correctly write into
the allocated memory. Also extended it to be more flexible, has better timing
values, and more resolutions.
ViewHWInterface::SetMode() will now check if the requested mode is in its
list of supported modes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13226 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 550d6a53752c94858a712b581a56f66bc6696fe8 17-Jun-2005 DarkWyrm <darkwyrm@gmail.com>

Cleanup for decorator management code
Updated a couple headers
Moved all decorator code to ServerApp where it belongs
Modified AppServer::Broadcast to allow ServerApps send messages to all apps without having to have a global AppServer instance


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13204 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 54cc0f1b56a9419e6d900c40bb03d4fa25d58c49 16-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

reverted some unintentional changes

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13179 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 99b9d5ac8a6a1fa22e162b433e258f3d048bf6eb 15-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

a new state begins life as a copy from the previous state, fixed Scale(). Note that BoundsOrigin() (and therefor Scale()) is called _a lot_ so we should cache the value! I started to work on this, but our lack of encapsulation strikes again... Layer::fLayerData is used directly all over the place.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13172 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dd10337fd005a67a4947714fdeecf2121485b91d 14-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed BAppServerLink to AppServerLink, BPortLink to PortLink, LinkMsgReader
to LinkReceiver, LinkMsgSender to LinkSender, and put everything into the
BPrivate namespace.
Made AppServerLink a cheap object - it will use the applications receiver/sender
and not create its own buffers.
Fixed broken communication stuff here and there (mostly Font.cpp).
Put the newly introduced set|get_system_colors() into the BPrivate namespace -
please don't introduce private functions into the public namespace!!!
Also fixed their broken communication use, as Darkwyrm obviously forgot about
it again: the sequence Flush(); GetNextMessage() without error checking is
purely wrong and can make the app hang and/or crash! :-)
Other minor cleanup.
The input_server used some test mode with the haiku build target which is
probably wrong.
Hopefully I did not forget anything this time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13128 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 57bbc53987a2e821025ddb88146ca7f68ff3c068 14-Jun-2005 DarkWyrm <darkwyrm@gmail.com>

Moved some system colors code to be monitored by a client's ServerApp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13123 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3a27ae791e943c7e682d571394251a24102bbf23 13-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added server support for activate_workspace(). Looks like it's not doing anything, though SetActiveWorkspace() returns true....

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13103 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eef16dda7d0245b39fe0b10af93eed1903d60130 13-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

implemented server support for current_workspace(), just because I had enough of the 'blablah got unknown reply' message

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13102 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f1496739a3bd1d46435329d0af37649f3e9816da 10-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

removed AS_SET_SCREEN_MODE handler

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13040 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2ed35bc88c0b74f64c136466da1fcbb64ff9054b 08-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Thanks to Axel's change, now we can pass the app_server's colormap to libbe. Methods like BScreen::ColorMap() and BScreen::ColorForIndex() work.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13023 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3ba7d6f35058ac6bdd50b37d60e75034cef83ce2 08-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Added AS_{GET|SET}_DESKTOP_COLOR.
(Incorrectly) implemented AS_GET_DESKTOP_COLOR - works for now.
Minor cleanup.
Is AS_SET_SCREEN_MODE used at all?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13010 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd28b3c7469be94f8c4dbecc3d2683d7960da4dd 07-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

BAppServerLink is now using BApplication::fServerTo/From for its messaging.
Added LinkMsgReader::NeedsReply() method.
Completely redone ServerApp messaging: no more "replyport" from BAppServerLink; instead,
the registered client reply port is used. Fixed some more weak messaging stuff.
ServerApp now recognizes if an unknown message needs a reply, and sends it - for example,
the "Screen" preferences app no longer hangs, but crashes on start :)
Made LinkMsgReader::Read() virtual again, since it's needed by RAMLinkMsgReader.cpp.
Renamed BPortLink::GetNextReply() to GetNextMessage().
Some more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13004 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 75936a02e432bb4ceb04494f0d53eb4d10ac7764 07-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

BPortLink now has a FlushWithReply() method itself.
BPortLink::AttachString() now accepts a length argument, and will no longer
send a terminating null byte; LinkMsgReader::ReadString(), however, will
make sure the string read is null terminated.
Changed client communication code to use FlushWithReply() instead of Flush()
and GetNextReply() - there were many bugs and shortcomings in the code, I
hope I've fixed them all.
Converted ClientFontList.cpp to our coding style (but not completely, the
class members are missing).
Some more cleanup - I hope Adi will adopt our coding style one day!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12998 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7475dcdf3a736a8e17b0d3fabe970a48661f7d83 07-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added an app server command to retrieve the color map. Made some adjustments to SystemPalette.cpp, implemented support for it in BPrivateScreen. Moved get_scs() a bit down to avoid a deadlock. Note that getting the colormap doesn't work due to port capacity limit (?)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12996 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f9e3895bf2331f50faf57ad124b62c5b8351a5cf 04-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

added tracing to some messages

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12952 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 59345e264fccac812b03a49a1e4466f10133a309 03-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

huge cleanup, support for SetSizeLimits, support for truncating strings, numerous decorator bug fixes, Layer does not draw when view color is B_TRANSPARENT_COLOR, cleaner dispatching of mouse events to the WinBorder in RootLayer, commented the char map selection in the font server, as it seems glyph lookup by unicode index works much better with the default map

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12945 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 19e4729202665c803426fd7b08e85355d0628a5f 28-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Uncommented SendMessageToClient, as it's used in test mode.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12869 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8380e999e764ceab9b6554ebe7b92390ca734452 28-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

better error checking in Run()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12866 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6390df8e27c19a517f8aa043a43d6b5051cf6dd2 28-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Made app_server a static, renamed desktop to gDesktop as it's a global, RootLayer now uses its own fDesktop internal member instead of the global one. Fixed a typo in some commented code (thanks Axel)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12864 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7f2831b56b4add56f2cffdb506575f10b01349f3 28-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Removed a couple of friendships, commented/removed unused stuff

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12863 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2724858b5b929609dd8e65b488ec02e3a010c68f 27-May-2005 Axel Dörfler <axeld@pinc-software.de>

Added global app_server port, so that other parts of the server don't have
to search for it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12859 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d7c08b7d2e945f1284a22a3db01652c47fd41d3a 26-May-2005 Axel Dörfler <axeld@pinc-software.de>

Tried to make the ServerApp aware when a client dies: the main communication
port is now transferred to the client, so that it goes away automatically.
Unfortunately, this doesn't seem to work. This code is truly a big mess :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12846 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e5b4782b4ee7663decea60a4385fce3122c2b16d 26-May-2005 Axel Dörfler <axeld@pinc-software.de>

Made some necessary enhancements to class Screen; the app_server also
has to care about refresh rates. Also changed Screen::GetMode() (formerly
Resolution()) to return all interesting values, so that hopefully no one
will call it anymore like RootLayer::SetScreens() did.
Greatly improved the horrible RootLayer::SetScreens().
The app_server is now able to deal with failing HWInterface::SetMode() calls;
in this case, it will fall back to the hardware's current mode. This now
also works correctly in combination with the vesa driver, so that you don't
have to compile the app_server with the same resolution you boot in anymore.
SetMode() now always returns if it succeeded or not.
Renamed RootLayer::fScreenXYResolution to fScreenWidth/Height respectively.
Removed the useless DisplayDriver::DisplayMode() method.
Added B_GET_DISPLAY_MODE to the required accelerant hooks.
Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2762b0cecda645270a573d97b168a49dcea3a8c9 20-May-2005 Stephan Aßmus <superstippi@gmx.de>

Work in progress... improvements on font stuff, reverted to using Painter to get the string width. Since it actually uses glyph caching, it is about 20 times faster than the implementation in ServerFont (and a about twice the time as R5). I added a StringWidth method to Painter and AGGTextRenderer which works as correct as ServerFont::StringWidth, which btw was broken, because I mixed up glyph count and byte count...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12745 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38c5a7b7fa10b1cdd7e15a482cba5461957b4986 20-May-2005 Stephan Aßmus <superstippi@gmx.de>

Implemented StringWidth in ServerFont, updated ServerApp to use it, and removed a -1 from TextView in the char location calculation, which I didn't understand and without which the cursor location and related stuff now finally work.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12744 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cb80e15b3c577ab5e800b07024556f88b823f0f8 14-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

ServerWindow is no more a ServerApp's friend. Some cleanups.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12663 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9bdb0522c19c1f779f8e5c56e8faa4a749800cff 12-May-2005 Stephan Aßmus <superstippi@gmx.de>

Implemented BFont::GetEscapments() float version. It is pretty rough yet, but appears to handle UTF8 correctly. The optional escapement_delta is currently ignored. I didn't touch other functionality too much, until I know more about it.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12645 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b3d3da708d775e46954ab634e02e25f8e841b17d 12-May-2005 Stephan Aßmus <superstippi@gmx.de>

more cleanup, fixed a bug in AS_GET_ESCAPEMENTS_AS_FLOATS that caused a lockup. DarkWyrm - I'm looking at you. :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12640 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f3a544e82050640d8e3a7d20aba02e210f68ac38 08-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Putting this handler in once again, as it looks it's used in InterfaceDefs.cpp, even if it's not working

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12595 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 80581303925e34862e621be341f94232f3ec855a 08-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Cleanup of the ServerApp parts I looked at. Removed reduntant comments

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12594 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fb52610b8272f62f11fe2ecf96c30ce59c7e718c 07-May-2005 DarkWyrm <darkwyrm@gmail.com>

Added a handler for GET_ESCAPEMENTS_AS_FLOATS so that there are no deadlocks in the BFont call until the server-side code can be implemented


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12590 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 04efb239b7b67db3b7bff60c80bfece9bd91dd72 07-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

AppServer is no longer a friend of ServerApp. Small cleanups.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12586 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 78f09a0553b88f6f3923d04ddb7126440f42d530 06-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

app_server doesn't hang anymore when an application exits in an unclean way. Got rid of the kill_thread in ServerApp's destructor. Small refactoring. Added a TODO item.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12578 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61d296c9f523caa7225f2ba334d4a2adc8fe3010 05-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed a crashing bug

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12574 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5e6d7d522d35dd4f45f8cfd8dece508b4f572122 04-May-2005 DarkWyrm <darkwyrm@gmail.com>

Fixed a TODO - added a method for calling StringWidth with a ServerFont instead of DrawData


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12568 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f812bf8b4c9c402a1f51cc2a125ca78d13414d0a 01-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented server side support for BScreen::SetMode(). Note that setting the mode works, but rootlayer crashes afterwards. I guess I'll need to lock something. Adi ? Stephan ?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12523 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6e927d6e3bfdf02212adc85d9f83341b61373dd8 30-Apr-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

BScreens methods didn't work for a number of reasons: fixed.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12517 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e742e3e106eb77f506e827b18f4a35e015e55f61 18-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

refactoring and cleanup in LayerData and friends, it shows what I mean by "forced code paths" for example in coupled font size and view scale, added a couple TODOs, disabled decoupled frame buffer transfers, it is buggy and deadlocks for some reason...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12441 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3dea4bb659457b495b7ed9ca66168426a162312c 18-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

cleanup the defines, move old DisplayDriver implementations out because they are currently unused and won't build

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12438 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d7c2c05061210a81952d3a32a464a0e23f008c48 16-Apr-2005 Adi Oanca <adioanca@nowhere.fake>

Big cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12424 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7d5778defa3ca2b0ae8da7604c9e01921b9aaa51 01-Apr-2005 Michael Lotz <mmlr@mlotz.ch>

Added support for GetEscapements() too. Still unfinished. Maybe this should be moved elsewhere?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12216 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c2da902f2e4736f49ce04a47d9db03bd81b70a57 01-Apr-2005 Michael Lotz <mmlr@mlotz.ch>

Implemented BPortLink::AttachShape and BPortLink::ReadShape and used them for passing the shapes in AS_GET_GLYPH_SHAPES.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12215 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ebf8af66c9ef27a706dde42124e0fa42d594d04e 01-Apr-2005 Michael Lotz <mmlr@mlotz.ch>

Added support for BFont::GetGlyphShapes. Not finished yet and untested, delivery method as to be changed.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12214 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b2b5acff33d176e8b70ae9d9528f54ef9b25dc30 29-Mar-2005 Axel Dörfler <axeld@pinc-software.de>

Made DISPLAYDRIVER a true compile time option.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12119 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 256c1b150247d9e53ace03175b9158feb5372e35 28-Mar-2005 Adi Oanca <adioanca@nowhere.fake>

Insignifican change. Read uint32 instead of int32.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12108 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33bbe223914093509b4bc56bea8a90c81af80a37 24-Mar-2005 Axel Dörfler <axeld@pinc-software.de>

Moved app_server files to app/.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11972 a95241bf-73f2-0310-859d-f6bbb57e9c96