fixed some window placement issues
markt markt
3 files changed,
12 insertions(+),
5 deletions(-)
M
src/ScreenPlacement.cc
→
src/ScreenPlacement.cc
@@ -118,10 +118,11 @@ int win_w = win.width() + win.fbWindow().borderWidth()*2 + win.widthOffset(),
win_h = win.height() + win.fbWindow().borderWidth()*2 + win.heightOffset(); // make sure the window is inside our screen(head) area - if (place_x + win_w > head_right) - place_x = (head_right - win_w) / 2 + win.xOffset(); - if (place_y + win_h > head_bot) - place_y = (head_bot - win_h) / 2 + win.yOffset(); + if (place_x + win_w - win.xOffset() > head_right) + place_x = head_left + (head_right - head_left - win_w) / 2 + + win.xOffset(); + if (place_y + win_h - win.yOffset() > head_bot) + place_y = head_top + (head_bot - head_top - win_h) / 2 + win.yOffset(); return true; }
M
src/ScreenResources.cc
→
src/ScreenResources.cc
@@ -84,6 +84,7 @@ template<>
string FbTk::Resource<BScreen::FollowModel>::getString() const { switch (m_value) { case BScreen::FOLLOW_ACTIVE_WINDOW: + default: return string("Follow"); break; case BScreen::FETCH_ACTIVE_WINDOW:@@ -93,7 +94,6 @@ case BScreen::SEMIFOLLOW_ACTIVE_WINDOW:
return string("SemiFollow"); break; case BScreen::IGNORE_OTHER_WORKSPACES: - default: return string("Ignore"); break; }@@ -111,6 +111,8 @@ strcasecmp(strval, "Fetch") == 0)
m_value = BScreen::FETCH_ACTIVE_WINDOW; else if (strcasecmp(strval, "SemiFollow") == 0) m_value = BScreen::SEMIFOLLOW_ACTIVE_WINDOW; + else if (strcasecmp(strval, "Ignore") == 0) + m_value = BScreen::IGNORE_OTHER_WORKSPACES; else setDefaultValue(); }