fixed #996298, maximized windows and snapped windows dont respect
toolbar-borderwidth further more windows do snap at screen-edges, no matter if maxover is enabled or not
This commit is contained in:
parent
0438a7bfd7
commit
fdc9b5adb7
3 changed files with 25 additions and 9 deletions
|
@ -464,11 +464,9 @@ private:
|
|||
const std::string m_name, m_altname;
|
||||
FbTk::ResourceManager &m_resource_manager;
|
||||
|
||||
// Xinerama related private data
|
||||
bool m_xinerama_avail;
|
||||
int m_xinerama_num_heads;
|
||||
|
||||
// Xinerama related private data
|
||||
|
||||
int m_xinerama_center_x, m_xinerama_center_y;
|
||||
|
||||
HeadArea *m_head_areas;
|
||||
|
|
|
@ -314,22 +314,22 @@ void Toolbar::updateStrut() {
|
|||
case TOPLEFT:
|
||||
case TOPCENTER:
|
||||
case TOPRIGHT:
|
||||
top = height();
|
||||
top = height() + 2 * theme().border().width();
|
||||
break;
|
||||
case BOTTOMLEFT:
|
||||
case BOTTOMCENTER:
|
||||
case BOTTOMRIGHT:
|
||||
bottom = height();
|
||||
bottom = height() + 2 * theme().border().width();
|
||||
break;
|
||||
case RIGHTTOP:
|
||||
case RIGHTCENTER:
|
||||
case RIGHTBOTTOM:
|
||||
right = width();
|
||||
right = width() + 2 * theme().border().width();
|
||||
break;
|
||||
case LEFTTOP:
|
||||
case LEFTCENTER:
|
||||
case LEFTBOTTOM:
|
||||
left = width();
|
||||
left = width() + 2 * theme().border().width();
|
||||
break;
|
||||
};
|
||||
m_strut = screen().requestStrut(getOnHead(), left, right, top, bottom);
|
||||
|
|
|
@ -3273,23 +3273,39 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) {
|
|||
/////////////////////////////////////
|
||||
// begin by checking the screen (or Xinerama head) edges
|
||||
|
||||
int h;
|
||||
if (screen().numHeads() > 0) {
|
||||
// head "0" == whole screen width + height, which we skip since the
|
||||
// sum of all the heads covers those edges
|
||||
for (int h = 1; h <= screen().numHeads(); h++) {
|
||||
for (h = 1; h <= screen().numHeads(); h++) {
|
||||
snapToWindow(dx, dy, left, right, top, bottom,
|
||||
screen().maxLeft(h),
|
||||
screen().maxRight(h),
|
||||
screen().maxTop(h),
|
||||
screen().maxBottom(h));
|
||||
}
|
||||
for (h = 1; h <= screen().numHeads(); h++) {
|
||||
snapToWindow(dx, dy, left, right, top, bottom,
|
||||
screen().getHeadX(h),
|
||||
screen().getHeadX(h) + screen().getHeadWidth(h),
|
||||
screen().getHeadY(h),
|
||||
screen().getHeadY(h) + screen().getHeadHeight(h));
|
||||
}
|
||||
} else {
|
||||
snapToWindow(dx, dy, left, right, top, bottom,
|
||||
screen().maxLeft(0),
|
||||
screen().maxRight(0),
|
||||
screen().maxTop(0),
|
||||
screen().maxBottom(0));
|
||||
|
||||
snapToWindow(dx, dy, left, right, top, bottom,
|
||||
screen().getHeadX(0),
|
||||
screen().getHeadX(0) + screen().getHeadWidth(0),
|
||||
screen().getHeadY(0),
|
||||
screen().getHeadY(0) + screen().getHeadHeight(0));
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////
|
||||
// now check window edges
|
||||
|
||||
|
@ -3301,7 +3317,9 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) {
|
|||
|
||||
unsigned int bw;
|
||||
for (; it != it_end; it++) {
|
||||
if ((*it) == this) continue; // skip myself
|
||||
if ((*it) == this)
|
||||
continue; // skip myself
|
||||
|
||||
bw = (*it)->decorationMask() & DECORM_ENABLED ? (*it)->frame().window().borderWidth() : 0;
|
||||
|
||||
snapToWindow(dx, dy, left, right, top, bottom,
|
||||
|
|
Loading…
Reference in a new issue