[haiku-bugs] Re: [Haiku] #8188: Make Workspaces Auto-raise behave like LaunchBox Auto-raise

  • From: "axeld" <trac@xxxxxxxxxxxx>
  • Date: Tue, 06 Dec 2011 16:45:58 -0000

#8188: Make Workspaces Auto-raise behave like LaunchBox Auto-raise
---------------------------------------+-----------------------------------
   Reporter:  devine                   |      Owner:  axeld
       Type:  enhancement              |     Status:  new
   Priority:  normal                   |  Milestone:  R1
  Component:  Applications/Workspaces  |    Version:  R1/Development
 Resolution:                           |   Keywords:  workspaces, auto-
 Blocked By:                           |  raise
Has a Patch:  1                        |   Blocking:
                                       |   Platform:  All
---------------------------------------+-----------------------------------

Comment (by axeld):

 Thanks! You introduce a number of coding style violations with your patch,
 though, and it much more complicated than needed. Besides that, you should
 use the BWindow::GetDecoratorSettings() to determine the actual window
 bounds -- what you do there looks a bit messy.

 The code should a bit look like this (pseudo code):
 {{{
 BScreen screen(this);
 BRect screenFrame = screen.Frame();
 if (mouse on screen edge) {
         BRect tabFrame;
         BMessage settings;
         if (GetDecoratorSettings(&settings) == B_OK)
                 tabFrame = settings.FindRect("tab frame");

         screenFrame.InsetBy(tabFrame);
         if (screenFrame.contains(Frame())
                 Activate();
 }
 }}}

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/8188#comment:2>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: