all repos — fluxbox @ fdc9b5adb7eb49a9e2481b07e9298b634133f745

custom fork of the fluxbox windowmanager

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
mathias mathias
commit

fdc9b5adb7eb49a9e2481b07e9298b634133f745

parent

0438a7bfd72b08dab7ede46f40b0f7f1f368c6fb

3 files changed, 25 insertions(+), 9 deletions(-)

jump to
M src/Screen.hhsrc/Screen.hh

@@ -464,11 +464,9 @@

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;
M src/Toolbar.ccsrc/Toolbar.cc

@@ -314,22 +314,22 @@ switch (placement()) {

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);
M src/Window.ccsrc/Window.cc

@@ -3273,23 +3273,39 @@

///////////////////////////////////// // 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 @@ Workspace::Windows::iterator it_end = wins.end();

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,