- /* these values represent offsets from the screen edge
- * we look for the biggest offset on each edge and then apply them
- * all at once
- * do not be confused by the similarity to the names of Rect's members
- */
- unsigned int current_left = 0, current_right = 0, current_top = 0,
- current_bottom = 0;
-
- StrutList::const_iterator it = _struts.begin(), end = _struts.end();
-
- for(; it != end; ++it) {
- otk::Strut *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;
- }
-
- _area.setRect(current_left, current_top,
- _info->width() - (current_left + current_right),
- _info->height() - (current_top + current_bottom));
+ _area.setRect(_strut.left, _strut.top,
+ _info->width() - (_strut.left + _strut.right),
+ _info->height() - (_strut.top + _strut.bottom));