Implemented the focus follows mouse stuff over the standard mouse mode functions; the other functions look deprecated to me.
Added a comment to load_menu_settings() - I think that stuff should be moved into the server. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13718 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -654,26 +654,15 @@ run_be_about()
|
|||||||
_IMPEXP_BE void
|
_IMPEXP_BE void
|
||||||
set_focus_follows_mouse(bool follow)
|
set_focus_follows_mouse(bool follow)
|
||||||
{
|
{
|
||||||
BPrivate::AppServerLink link;
|
// obviously deprecated API
|
||||||
link.StartMessage(AS_SET_FOCUS_FOLLOWS_MOUSE);
|
set_mouse_mode(B_WARP_MOUSE);
|
||||||
link.Attach<bool>(follow);
|
|
||||||
link.Flush();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_IMPEXP_BE bool
|
_IMPEXP_BE bool
|
||||||
focus_follows_mouse()
|
focus_follows_mouse()
|
||||||
{
|
{
|
||||||
bool ffm = false;
|
return mouse_mode() != B_NORMAL_MOUSE;
|
||||||
|
|
||||||
BPrivate::AppServerLink link;
|
|
||||||
link.StartMessage(AS_FOCUS_FOLLOWS_MOUSE);
|
|
||||||
|
|
||||||
int32 code;
|
|
||||||
if (link.FlushWithReply(code) == B_OK && code == SERVER_TRUE)
|
|
||||||
link.Read<bool>(&ffm);
|
|
||||||
|
|
||||||
return ffm;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -754,6 +743,9 @@ load_menu_settings(menu_info &into)
|
|||||||
// TODO: Load settings from the settings file,
|
// TODO: Load settings from the settings file,
|
||||||
// and only if it fails, fallback to the defaults
|
// and only if it fails, fallback to the defaults
|
||||||
|
|
||||||
|
// TODO: shouldn't the server handle the details? It could broadcast
|
||||||
|
// change messages to the applications, which could also relayout
|
||||||
|
// there menus and menu bars then (as soon as we have a layout management)
|
||||||
into.font_size = be_plain_font->Size();
|
into.font_size = be_plain_font->Size();
|
||||||
be_plain_font->GetFamilyAndStyle(&into.f_family, &into.f_style);
|
be_plain_font->GetFamilyAndStyle(&into.f_family, &into.f_style);
|
||||||
into.background_color = ui_color(B_MENU_BACKGROUND_COLOR);
|
into.background_color = ui_color(B_MENU_BACKGROUND_COLOR);
|
||||||
|
|||||||
Reference in New Issue
Block a user