[haiku-commits] r33767 - haiku/trunk/src/servers/app

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 25 Oct 2009 22:52:17 +0100 (CET)

Author: axeld
Date: 2009-10-25 22:52:17 +0100 (Sun, 25 Oct 2009)
New Revision: 33767
Changeset: http://dev.haiku-os.org/changeset/33767/haiku

Modified:
   haiku/trunk/src/servers/app/Desktop.cpp
   haiku/trunk/src/servers/app/DesktopSettings.cpp
   haiku/trunk/src/servers/app/DesktopSettings.h
   haiku/trunk/src/servers/app/DesktopSettingsPrivate.h
Log:
* Fixed the style violations introduced by r33732, nothing too bad, though.


Modified: haiku/trunk/src/servers/app/Desktop.cpp
===================================================================
--- haiku/trunk/src/servers/app/Desktop.cpp     2009-10-25 21:26:54 UTC (rev 
33766)
+++ haiku/trunk/src/servers/app/Desktop.cpp     2009-10-25 21:52:17 UTC (rev 
33767)
@@ -217,8 +217,8 @@
 
 
 filter_result
-MouseFilter::Filter(BMessage* message, EventTarget** _target,
-       int32* _viewToken, BMessage* latestMouseMoved)
+MouseFilter::Filter(BMessage* message, EventTarget** _target, int32* 
_viewToken,
+       BMessage* latestMouseMoved)
 {
        BPoint where;
        if (message->FindPoint("where", &where) != B_OK)
@@ -1437,12 +1437,13 @@
        // A normal window that was once a floating or modal window will
        // adopt the window's current workspaces
 
-       if (!window->IsNormal())
+       if (!window->IsNormal()) {
                _ChangeWindowWorkspaces(window, window->Workspaces(),
                        window->SubsetWorkspaces());
+       }
 
        // make sure the window has the correct position in the window lists
-       //      (ie. all floating windows have to be on the top, ...)
+       // (ie. all floating windows have to be on the top, ...)
 
        for (int32 i = 0; i < kMaxWorkspaces; i++) {
                if (!workspace_in_workspaces(i, window->Workspaces()))
@@ -2109,8 +2110,7 @@
        if (entryStatus == B_OK)
                entryStatus = roster.Launch(&ref);
        if (entryStatus == B_OK || entryStatus == B_ALREADY_RUNNING) {
-               syslog(LOG_ERR,
-                       "Failed to launch the input server by signature: %s!\n",
+               syslog(LOG_ERR, "Failed to launch the input server by 
signature: %s!\n",
                        strerror(status));
                return;
        }
@@ -2145,9 +2145,10 @@
        }
 
        // wait for the last app to die
-       if (count > 0)
+       if (count > 0) {
                acquire_sem_etc(fShutdownSemaphore, fShutdownCount, 
B_RELATIVE_TIMEOUT,
                        250000);
+       }
 
        fApplicationsLock.Unlock();
 }
@@ -2164,7 +2165,7 @@
                        // Attached data:
                        // 1) port_id - receiver port of a regular app
                        // 2) port_id - client looper port - for sending 
messages to the
-                       //                                      client
+                       //              client
                        // 2) team_id - app's team ID
                        // 3) int32 - handler token of the regular app
                        // 4) char * - signature of the regular app
@@ -2432,8 +2433,8 @@
 {
        fBack = NULL;
 
-       for (Window* window = _CurrentWindows().FirstWindow();
-                       window != NULL; window = 
window->NextWindow(fCurrentWorkspace)) {
+       for (Window* window = _CurrentWindows().FirstWindow(); window != NULL;
+                       window = window->NextWindow(fCurrentWorkspace)) {
                if (window->IsHidden() || window->Feel() == kDesktopWindowFeel)
                        continue;
 
@@ -2455,8 +2456,7 @@
 {
        fFront = NULL;
 
-       for (Window* window = _CurrentWindows().LastWindow();
-                       window != NULL;
+       for (Window* window = _CurrentWindows().LastWindow(); window != NULL;
                        window = window->PreviousWindow(fCurrentWorkspace)) {
                if (window->IsHidden() || window->IsFloating()
                        || !window->SupportsFront())
@@ -3177,8 +3177,7 @@
                }
 
                if (window->Frame().LeftTop() != position) {
-                       // the window was visible before, but its on-screen 
location
-                       //      changed
+                       // the window was visible before, but its on-screen 
location changed
                        BPoint offset = position - window->Frame().LeftTop();
                        MoveWindowBy(window, offset.x, offset.y);
                                // TODO: be a bit smarter than this...

Modified: haiku/trunk/src/servers/app/DesktopSettings.cpp
===================================================================
--- haiku/trunk/src/servers/app/DesktopSettings.cpp     2009-10-25 21:26:54 UTC 
(rev 33766)
+++ haiku/trunk/src/servers/app/DesktopSettings.cpp     2009-10-25 21:52:17 UTC 
(rev 33767)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2008, Haiku.
+ * Copyright 2005-2009, Haiku.
  * Distributed under the terms of the MIT License.
  *
  * Authors:
@@ -199,16 +199,19 @@
                        int32 mode;
                        if (settings.FindInt32("mode", &mode) == B_OK)
                                fMouseMode = (mode_mouse)mode;
+
                        int32 focusFollowsMouseMode;
                        if (settings.FindInt32("focus follows mouse mode",
-                               &focusFollowsMouseMode) == B_OK) {
-                               fFocusFollowsMouseMode =
-                                       
(mode_focus_follows_mouse)focusFollowsMouseMode;
+                                       &focusFollowsMouseMode) == B_OK) {
+                               fFocusFollowsMouseMode
+                                       = 
(mode_focus_follows_mouse)focusFollowsMouseMode;
                        }
+
                        bool acceptFirstClick;
                        if (settings.FindBool("accept first click", 
&acceptFirstClick)
-                               == B_OK)
+                                       == B_OK) {
                                fAcceptFirstClick = acceptFirstClick;
+                       }
                }
        }
 
@@ -247,8 +250,8 @@
                                fMenuInfo.click_to_open = clickToOpen;
 
                        bool triggersAlwaysShown;
-                       if (settings.FindBool("triggers always shown",
-                               &triggersAlwaysShown) == B_OK) {
+                       if (settings.FindBool("triggers always shown", 
&triggersAlwaysShown)
+                                        == B_OK) {
                                fMenuInfo.triggers_always_shown = 
triggersAlwaysShown;
                        }
 
@@ -514,8 +517,7 @@
 
 
 void
-DesktopSettingsPrivate::SetFocusFollowsMouseMode(
-       const mode_focus_follows_mouse mode)
+DesktopSettingsPrivate::SetFocusFollowsMouseMode(mode_focus_follows_mouse mode)
 {
        fFocusFollowsMouseMode = mode;
        Save(kMouseSettings);
@@ -943,8 +945,7 @@
 
 
 void
-LockedDesktopSettings::SetFocusFollowsMouseMode(
-       const mode_focus_follows_mouse mode)
+LockedDesktopSettings::SetFocusFollowsMouseMode(mode_focus_follows_mouse mode)
 {
        fSettings->SetFocusFollowsMouseMode(mode);
 }

Modified: haiku/trunk/src/servers/app/DesktopSettings.h
===================================================================
--- haiku/trunk/src/servers/app/DesktopSettings.h       2009-10-25 21:26:54 UTC 
(rev 33766)
+++ haiku/trunk/src/servers/app/DesktopSettings.h       2009-10-25 21:52:17 UTC 
(rev 33767)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2007, Haiku.
+ * Copyright 2001-2009, Haiku.
  * Distributed under the terms of the MIT License.
  *
  * Authors:
@@ -44,7 +44,7 @@
                void                    GetMenuInfo(menu_info& info) const;
 
                mode_mouse              MouseMode() const;
-               mode_focus_follows_mouse        FocusFollowsMouseMode() const;
+               mode_focus_follows_mouse FocusFollowsMouseMode() const;
                bool                    FocusFollowsMouse() const;
                bool                    AcceptFirstClick() const;
 
@@ -80,8 +80,8 @@
 
                void                    SetMouseMode(mode_mouse mode);
                void                    SetFocusFollowsMouseMode(
-                                                       const 
mode_focus_follows_mouse mode);
-               void                    SetAcceptFirstClick(bool 
accept_first_click);
+                                                       
mode_focus_follows_mouse mode);
+               void                    SetAcceptFirstClick(bool 
acceptFirstClick);
 
                void                    SetShowAllDraggers(bool show);
 

Modified: haiku/trunk/src/servers/app/DesktopSettingsPrivate.h
===================================================================
--- haiku/trunk/src/servers/app/DesktopSettingsPrivate.h        2009-10-25 
21:26:54 UTC (rev 33766)
+++ haiku/trunk/src/servers/app/DesktopSettingsPrivate.h        2009-10-25 
21:52:17 UTC (rev 33767)
@@ -47,9 +47,9 @@
                        mode_mouse                      MouseMode() const;
                        void                            
SetFocusFollowsMouseMode(
                                                                        
mode_focus_follows_mouse mode);
-                       mode_focus_follows_mouse                
FocusFollowsMouseMode() const;
+                       mode_focus_follows_mouse FocusFollowsMouseMode() const;
                        bool                            FocusFollowsMouse() 
const;
-                       void                            
SetAcceptFirstClick(bool accept_first_click);
+                       void                            
SetAcceptFirstClick(bool acceptFirstClick);
                        bool                            AcceptFirstClick() 
const;
 
                        void                            SetShowAllDraggers(bool 
show);


Other related posts:

  • » [haiku-commits] r33767 - haiku/trunk/src/servers/app - axeld