History log of /haiku/src/servers/app/DesktopSettings.cpp
Revision Date Author Comments
# 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>


# 56761ebf 22-Oct-2022 Augustin Cavalier <waddlesplash@gmail.com>

app_server: Granularize whether font settings were loaded in DesktopSettings.

As per axeld's review.

Change-Id: Idd817156d53ebf535f162285bfd08f0566ac3901
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5755
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# a180a40b 19-Oct-2022 Augustin Cavalier <waddlesplash@gmail.com>

app_server: Only increase default font sizes if settings were not loaded.

Thanks to axeld for the review.


# 0da59b24 09-Aug-2022 Máximo Castañeda <antiswen@yahoo.es>

DesktopSettings: remove unnecessary includes

Change-Id: I94fbffbe359be954bf769299420d1df97b2da184


# 44e3766b 17-Nov-2021 Augustin Cavalier <waddlesplash@gmail.com>

app_server: Add casts to appease GCC 11 -Wclass-memaccess.


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

app_server memory management: use ObjectDeleter to mark ownership

Make object ownership explicit by use of ObjectDeleter where possible.

Change-Id: I499a00aa3390d1510ae284419e73faffa5166430
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2695
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>


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

Allow setting a "full and half fixed" font as the system fixed font.

Fixes #14424.


# 3eb9476f 05-May-2020 Emir SARI <bitigchi@me.com>

Enable "Accept First Click" (supplementary)

As Axel mentioned, there is one more value to be changed. It should be
complete now. Ticket: #15953

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


# 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>


# 5464abed 09-Jan-2019 Augustin Cavalier <waddlesplash@gmail.com>

Enable sub-pixel font anti-aliasing by default.

Now that stippi has fixed the FreeType bitmap filter in app_server,
this rendering mode looks much nicer than Grayscale does.

Fixes #13290.


# 71c7f405 23-Jan-2015 John Scipione <jscipione@gmail.com>

app_server: change the default scrollbar knob to none

Change-Id: Iea13ebe6918f5583c3a4ce10414a54f06c51efe6


# 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>


# af84ce79 16-Apr-2013 John Scipione <jscipione@gmail.com>

Rename B_COLOR_WHICH_COUNT to kColorWhichCount


# 33025215 05-Apr-2013 John Scipione <jscipione@gmail.com>

Remove dependence on color constants in ServerReadOnlyMemory.

This fixes a maintainance problem where you have to update this otherwise
unrelated file to keep it in sync whenever you add a color constant.

I've added a B_COLOR_WHICH_COUNT constant to the color_which enum which should
be updated to point to the newest color constants as new ones are added. I
reworked ServerReadOnlyMemory to use this constant instead of using to the
current largest color constant directly. If you use B_COLOR_WHICH_COUNT to
refer to a color in your code expect to get unpredictable and nonsensical
results. Most likely you'll get an undefined result which will return black
but don't depend on it.

The net effect of this is that ServerReadOnlyMemory doesn't need to be updated
anymore when new color constants are introduced but will continue to produce
correct results.

Eliminate kNumColors constant, replace it with B_COLOR_WHICH_COUNT


# d6bb64d8 07-Feb-2013 Axel Dörfler <axeld@pinc-software.de>

app_server: Added NormalMouse() and ClickToFocusMouse() methods.

* Made FocusFollowsMouse() inline.
* For convenience only.


# 5b60052c 02-Sep-2012 Ryan Leavengood <leavengood@gmail.com>

Make double scrollbar arrows default to false again.


# 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.


# 30e7dbeb 10-Jun-2012 Ryan Leavengood <leavengood@gmail.com>

Save and load scrollbar settings in app_server.

Added to the appearance settings since menu info was already there.


# 9609fb50 09-Jun-2012 Ryan Leavengood <leavengood@gmail.com>

Double scrollbar thumbs have returned!!!

Let the flamewar begin.


# 5377c49b 23-Dec-2010 Michael Lotz <mmlr@mlotz.ch>

CID 4383 and 4384: Fix wrong checks of index values against kMaxWorkspaces that
could otherwise lead to out of bound access.


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


# 2be8427e 04-Aug-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Remove debugger call. This assert is to early because the desktop is locked later in the LockedDesktopSettings sub class. Fix bug #6392.



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


# c3d0a5e8 25-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed the style violations introduced by r33732, nothing too bad, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33767 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


# 2c69b5b6 19-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Made the libbe_test environment basically working under Haiku - to actually
make it work, one would need to use versioning for all libbe symbols. This is
worth an 8k price per file that links against libbe.so, so I didn't want to
commit this as is. An alternative to this solution would be to write a
separate application that is responsible for the app_server's window. Comments
welcome.
* Removed BeOS compatbility of the libbe_test stuff.
* Renamed the libbe_test targets from *haiku* to *test*, ie. libbe_haiku.so is
now called libbe_test.so, haiku_registrar is now test_registrar, etc.
* This also removes BeOS compatibility from tracker/FSUtils.cpp (all BeOS
compatibility should be removed, but I don't want to make Alexandre more work
in his branch, and it's not urgent at all).
* Replaced the former "run" scripts for the test environment with a single
run script (see updated NOTES file).
* Removed the libbe_test target from some applications - this was only to help
developing them under BeOS, and is thus no longer necessary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32521 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


# 75251adc 29-Jul-2009 Michael Lotz <mmlr@mlotz.ch>

Small cleanup.


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


# 337b8534 29-Jul-2009 Michael Lotz <mmlr@mlotz.ch>

Don't crash the app_server if the font couldn't be found. Fixes bug #4149,
though it still has to be investigated why the font style isn't found.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31901 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


# 231cbd90 16-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

Actually restore the "dragger" settings. So the system remember your "Show
Replicants" setting after reboot.


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


# 0a3f410f 16-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* Added a Desktop::BroadcastToAllWindows() method that sends all ServerWindows
a message.
* The DesktopSettings class is now using that to send the new
AS_SYSTEM_FONT_CHANGED message to all windows.
* The ServerWindow now propagates font changes to its decorator, causing it
to update its drawing. That means changing the bold font in the "Fonts"
preferences application will instantly change all window titles.
* Factored out a _RebuildAndRedrawAfterWindowChange() out of several Desktop
methods, simplifying some code.
* The DefaultDecorator no longer calls _DoLayout() twice (through SetLook()),
but instead calls the new _UpdateFont() method now also called by
FontsChanged(), and SetLook().
* BWindow::GetDecoratorSettings() now also includes "tab frame" BRect with the
exact footprint of the tab, allowing apps to know the size of the tab to
position itself accordingly.
* Automatic white space cleanup.


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


# 4a4355bd 16-Oct-2008 Rene Gollent <anevilyak@gmail.com>

app_server was not storing its settings when the workspace count was changed.
As a consequence this setting was lost unless another setting was also altered
that affected the workspace configuration in some way.
Fixes #2849.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28206 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


# 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


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

Fixed warnings.


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


# 676308a6 03-Mar-2008 Rene Gollent <anevilyak@gmail.com>

App Server now saves/restores ui_color settings.



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


# 46f29e60 06-Dec-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Also update the ui_color for menu backgrounds, when using set_menu_info.
Update the menu_info neverthless, when setting the ui_color for menu
backgrounds. Fixes bug #550.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23070 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


# 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


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

* Replaced DEBUG MultiLocker with an implementation that actually helps debugging
locking problems (instead of debugging the locker class).
* MultiLocker::IsReadLocked() is now only exported with DEBUG mode turned on, as
it only works correctly in this case.
* Made MultiLocker safe against B_INTERRUPTED, ie. it now just tries to lock again
instead of failing for no obvious reason.
* Removed bogus arguments to acquire_sem_etc() in MultiLocker (like B_DO_NOT_RESCHEDULE).
* Applied coding style to MultiLocker.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20055 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


# 86f902c3 31-May-2006 Stephan Aßmus <superstippi@gmx.de>

save and restore menu and mouse settings, fixes bug 607


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17676 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


# b03deb09 19-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Menu settings are now handled by the app_server. As a result, changing them does something, although they aren't saved to disk yet. 'click_to_open' is not checked anymore, because it was useless anyway, I'll remove it from the Menu preflet too.

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


# a0b6c232 13-Apr-2006 Jérôme Duval <korli@users.berlios.de>

replace hard value with the constant


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


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

app_server remembers the font settings now

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16961 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


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

Reenabled most of the workspaces functionality - the Workspaces window doesn't
show any windows, but everything else seems to work fine.


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


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

The font manager now has default fonts for bold/fixed as well - these are now used
in the DesktopSettings as defaults, too (but can be changed there).


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


# f38c001e 04-Nov-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

Assigned names to "some BLocker"s to aid debugging.
Small cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14703 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


# 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


# af84ce79da03c13c332dba559d7c54f565e17f4a 16-Apr-2013 John Scipione <jscipione@gmail.com>

Rename B_COLOR_WHICH_COUNT to kColorWhichCount


# 33025215566c130e9d950fc95d4605617203c248 05-Apr-2013 John Scipione <jscipione@gmail.com>

Remove dependence on color constants in ServerReadOnlyMemory.

This fixes a maintainance problem where you have to update this otherwise
unrelated file to keep it in sync whenever you add a color constant.

I've added a B_COLOR_WHICH_COUNT constant to the color_which enum which should
be updated to point to the newest color constants as new ones are added. I
reworked ServerReadOnlyMemory to use this constant instead of using to the
current largest color constant directly. If you use B_COLOR_WHICH_COUNT to
refer to a color in your code expect to get unpredictable and nonsensical
results. Most likely you'll get an undefined result which will return black
but don't depend on it.

The net effect of this is that ServerReadOnlyMemory doesn't need to be updated
anymore when new color constants are introduced but will continue to produce
correct results.

Eliminate kNumColors constant, replace it with B_COLOR_WHICH_COUNT


# d6bb64d84872c1ce527e4ca75d5f133c3991a0b5 07-Feb-2013 Axel Dörfler <axeld@pinc-software.de>

app_server: Added NormalMouse() and ClickToFocusMouse() methods.

* Made FocusFollowsMouse() inline.
* For convenience only.


# 5b60052cfc0d6505729aab88507e017f66862696 02-Sep-2012 Ryan Leavengood <leavengood@gmail.com>

Make double scrollbar arrows default to false again.


# 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.


# 30e7dbeb72799820bec7143fff2da0e16ab3986b 10-Jun-2012 Ryan Leavengood <leavengood@gmail.com>

Save and load scrollbar settings in app_server.

Added to the appearance settings since menu info was already there.


# 9609fb5050b23018d4d809f2f37ffcb6cbe04860 09-Jun-2012 Ryan Leavengood <leavengood@gmail.com>

Double scrollbar thumbs have returned!!!

Let the flamewar begin.


# 5377c49be42eb630ed3c3779c8c2e612fba1825f 23-Dec-2010 Michael Lotz <mmlr@mlotz.ch>

CID 4383 and 4384: Fix wrong checks of index values against kMaxWorkspaces that
could otherwise lead to out of bound access.


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


# 2be8427e017e69c58c320304e22f7a465cbce793 04-Aug-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Remove debugger call. This assert is to early because the desktop is locked later in the LockedDesktopSettings sub class. Fix bug #6392.



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


# c3d0a5e8a1fb6e79e543c9523c8c21e389904e04 25-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed the style violations introduced by r33732, nothing too bad, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33767 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


# 2c69b5b6c0e7b481a0c43366a1942a6055cbb864 19-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Made the libbe_test environment basically working under Haiku - to actually
make it work, one would need to use versioning for all libbe symbols. This is
worth an 8k price per file that links against libbe.so, so I didn't want to
commit this as is. An alternative to this solution would be to write a
separate application that is responsible for the app_server's window. Comments
welcome.
* Removed BeOS compatbility of the libbe_test stuff.
* Renamed the libbe_test targets from *haiku* to *test*, ie. libbe_haiku.so is
now called libbe_test.so, haiku_registrar is now test_registrar, etc.
* This also removes BeOS compatibility from tracker/FSUtils.cpp (all BeOS
compatibility should be removed, but I don't want to make Alexandre more work
in his branch, and it's not urgent at all).
* Replaced the former "run" scripts for the test environment with a single
run script (see updated NOTES file).
* Removed the libbe_test target from some applications - this was only to help
developing them under BeOS, and is thus no longer necessary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32521 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


# 75251adc379b6993204a9c9f44b42b59455756f7 29-Jul-2009 Michael Lotz <mmlr@mlotz.ch>

Small cleanup.


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


# 337b8534e03819f7f7172e211ad68a0497748121 29-Jul-2009 Michael Lotz <mmlr@mlotz.ch>

Don't crash the app_server if the font couldn't be found. Fixes bug #4149,
though it still has to be investigated why the font style isn't found.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31901 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


# 231cbd908e85a0ac946adf8b2ecf179ce558f203 16-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

Actually restore the "dragger" settings. So the system remember your "Show
Replicants" setting after reboot.


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


# 0a3f410f3040ce58777d262de98229a054e43f10 16-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* Added a Desktop::BroadcastToAllWindows() method that sends all ServerWindows
a message.
* The DesktopSettings class is now using that to send the new
AS_SYSTEM_FONT_CHANGED message to all windows.
* The ServerWindow now propagates font changes to its decorator, causing it
to update its drawing. That means changing the bold font in the "Fonts"
preferences application will instantly change all window titles.
* Factored out a _RebuildAndRedrawAfterWindowChange() out of several Desktop
methods, simplifying some code.
* The DefaultDecorator no longer calls _DoLayout() twice (through SetLook()),
but instead calls the new _UpdateFont() method now also called by
FontsChanged(), and SetLook().
* BWindow::GetDecoratorSettings() now also includes "tab frame" BRect with the
exact footprint of the tab, allowing apps to know the size of the tab to
position itself accordingly.
* Automatic white space cleanup.


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


# 4a4355bd7d6e2d45a9fa3dc0ece57a9697efad14 16-Oct-2008 Rene Gollent <anevilyak@gmail.com>

app_server was not storing its settings when the workspace count was changed.
As a consequence this setting was lost unless another setting was also altered
that affected the workspace configuration in some way.
Fixes #2849.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28206 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


# 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


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

Fixed warnings.


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


# 676308a602849ad12219344e5a3fcdc86ce26c34 03-Mar-2008 Rene Gollent <anevilyak@gmail.com>

App Server now saves/restores ui_color settings.



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


# 46f29e60b49f1149d45e3fe183a36f730051cf19 06-Dec-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Also update the ui_color for menu backgrounds, when using set_menu_info.
Update the menu_info neverthless, when setting the ui_color for menu
backgrounds. Fixes bug #550.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23070 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


# 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


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

* Replaced DEBUG MultiLocker with an implementation that actually helps debugging
locking problems (instead of debugging the locker class).
* MultiLocker::IsReadLocked() is now only exported with DEBUG mode turned on, as
it only works correctly in this case.
* Made MultiLocker safe against B_INTERRUPTED, ie. it now just tries to lock again
instead of failing for no obvious reason.
* Removed bogus arguments to acquire_sem_etc() in MultiLocker (like B_DO_NOT_RESCHEDULE).
* Applied coding style to MultiLocker.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20055 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


# 86f902c3ed42806fd5f7dcdff36eba7fee9bf6ea 31-May-2006 Stephan Aßmus <superstippi@gmx.de>

save and restore menu and mouse settings, fixes bug 607


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17676 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


# b03deb09dbdb2968fecc5f128fd6ae4cf7b8169f 19-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Menu settings are now handled by the app_server. As a result, changing them does something, although they aren't saved to disk yet. 'click_to_open' is not checked anymore, because it was useless anyway, I'll remove it from the Menu preflet too.

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


# a0b6c232bef76a5e0427055b18509853462d25b1 13-Apr-2006 Jérôme Duval <korli@users.berlios.de>

replace hard value with the constant


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


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

app_server remembers the font settings now

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16961 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


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

Reenabled most of the workspaces functionality - the Workspaces window doesn't
show any windows, but everything else seems to work fine.


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


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

The font manager now has default fonts for bold/fixed as well - these are now used
in the DesktopSettings as defaults, too (but can be changed there).


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


# f38c001e5661d4664cf31ea429ef1bc7f87e7dd0 04-Nov-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

Assigned names to "some BLocker"s to aid debugging.
Small cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14703 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


# 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