[haiku-commits] Re: r33732 - in haiku/trunk: headers/os/interface headers/private/app src/kits/interface src/preferences/mouse src/servers/app src/servers/input

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 25 Oct 2009 16:11:02 +0100

brecht@xxxxxxxxxxxxxxxx wrote:
> * added click to focus mouse mode; right-click for bring-to-front and
> send-to> -back (might cause some regressions in FFM)

It actually completely breaks FFM - please fix this, or else I'm tempted 
to revert it again, as it makes Haiku pretty much unusable in FFM mode.

Three things to notice:
- menu bar click doesn't bring window to front anymore
- I had FFM active, and after a restart, it defaulted to click-to-front 
- I hope that isn't the new default?
- Tracker windows cannot be clicked to front anymore

And a coding style issue:
+       BWindow* window = Window();
+       if (!window->IsActive() || !window->IsFront()) {
+               if ((mouse_mode() == B_FOCUS_FOLLOWS_MOUSE)
+                       || ((mouse_mode() == B_CLICK_TO_FOCUS_MOUSE)
+                               && ((buttons & B_SECONDARY_MOUSE_BUTTON) != 
0))) {
+                       window->Activate();
+                       window->UpdateIfNeeded();
+               }

Don't use more parenthesis than needed (or for clarity), or else it 
makes reading the code unnecessarily harder, ie. no () around ==.
But don't ask me why this code above doesn't seem to work anymore, it 
sure looks correct. Have you broken Activate() for FFM?

Bye,
   Axel.


Other related posts: