> 
> So where is the strut placed? why is the strut not placed right on the edge
> of
> the screen? (not counting the "full maximisation" thing)
> 
> On the right hand side, there is a 1px gap. at the top, where it snaps to the
> toolbar there is a 1 px overlap... with the slit there is no overlap, on the
> left there is no gap... why the difference? how are the struts calculated?
> 

the answer is in Screen.cc:updateAvailableArea().  Since this has come up a
lot, I will paste it below.

void BScreen::updateAvailableArea(void)
  int old_x = usableArea.x, old_y = usableArea.y,
    old_width = usableArea.width, old_height = usableArea.height;

  StrutList::iterator it = strutList.begin();
  unsigned int current_left = 0, current_right = 0, current_top = 0,
    current_bottom = 0;

  usableArea = getRect(); // reset to full screen
  for(; it != strutList.end(); ++it) {
    NETStrut *strut = *it;
    if (strut->left > current_left)
      current_left = strut->left;
    if (strut->top > current_top)
      current_top = strut->top;
    if (strut->right > current_right)
      current_right = strut->right;
    if (strut->bottom > current_bottom)
      current_bottom = strut->bottom;
  }

  // this is the area maximize and placeWindow now use
  usableArea.x = current_left;
  usableArea.width -= usableArea.x + current_right;
  usableArea.y = current_top;
  usableArea.height -= usableArea.y + current_bottom;

  // if area changed
  if (old_x != usableArea.x || old_y != usableArea.y ||
      old_width != usableArea.width || old_height != usableArea.height) {
    BlackboxWindowList::iterator it = windowList.begin(),
      end = windowList.end();
    for(; it != end; ++it)
      if((*it)->isMaximized()) (*it)->remaximize();
  }
}

> 
> On another note, if only subscibers can post to this list, we probably don't
> need to CC to the poster, eh? Just posting it to the list should do the
> trick.
> 

I have to remove the person from my mailer's recipient list every time i start
a new message.  I often forget.

Reply via email to