From 223b96641b0b5b4f5059fa3a385e1af0829f6504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 17 Jul 2005 16:13:58 +0000 Subject: [PATCH] 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 --- src/kits/interface/InterfaceDefs.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/kits/interface/InterfaceDefs.cpp b/src/kits/interface/InterfaceDefs.cpp index a7082867db..7a84890825 100644 --- a/src/kits/interface/InterfaceDefs.cpp +++ b/src/kits/interface/InterfaceDefs.cpp @@ -654,26 +654,15 @@ run_be_about() _IMPEXP_BE void set_focus_follows_mouse(bool follow) { - BPrivate::AppServerLink link; - link.StartMessage(AS_SET_FOCUS_FOLLOWS_MOUSE); - link.Attach(follow); - link.Flush(); + // obviously deprecated API + set_mouse_mode(B_WARP_MOUSE); } _IMPEXP_BE bool focus_follows_mouse() { - bool ffm = false; - - BPrivate::AppServerLink link; - link.StartMessage(AS_FOCUS_FOLLOWS_MOUSE); - - int32 code; - if (link.FlushWithReply(code) == B_OK && code == SERVER_TRUE) - link.Read(&ffm); - - return ffm; + return mouse_mode() != B_NORMAL_MOUSE; } @@ -754,6 +743,9 @@ load_menu_settings(menu_info &into) // TODO: Load settings from the settings file, // 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(); be_plain_font->GetFamilyAndStyle(&into.f_family, &into.f_style); into.background_color = ui_color(B_MENU_BACKGROUND_COLOR);