really fix placement when head is remembered but not position
This commit is contained in:
parent
42ace97775
commit
b504021145
8 changed files with 13 additions and 6 deletions
|
@ -46,7 +46,7 @@ bool CascadePlacement::placeWindow(const std::list<FluxboxWindow *> &windowlist,
|
|||
const FluxboxWindow &win,
|
||||
int &place_x, int &place_y) {
|
||||
|
||||
int head = (signed) win.screen().getCurrHead();
|
||||
int head = (signed) win.getOnHead();
|
||||
int head_left = (signed) win.screen().maxLeft(head);
|
||||
int head_right = (signed) win.screen().maxRight(head);
|
||||
int head_top = (signed) win.screen().maxTop(head);
|
||||
|
|
|
@ -32,7 +32,7 @@ bool ColSmartPlacement::placeWindow(const std::list<FluxboxWindow *> &windowlist
|
|||
int &place_x, int &place_y) {
|
||||
|
||||
// xinerama head constraints
|
||||
int head = (signed) win.screen().getCurrHead();
|
||||
int head = (signed) win.getOnHead();
|
||||
int head_left = (signed) win.screen().maxLeft(head);
|
||||
int head_right = (signed) win.screen().maxRight(head);
|
||||
int head_top = (signed) win.screen().maxTop(head);
|
||||
|
|
|
@ -39,7 +39,7 @@ bool MinOverlapPlacement::placeWindow(
|
|||
const FluxboxWindow &win, int &place_x, int &place_y) {
|
||||
|
||||
// view (screen + head) constraints
|
||||
int head = (signed) win.screen().getCurrHead();
|
||||
int head = (signed) win.getOnHead();
|
||||
int head_left = (signed) win.screen().maxLeft(head);
|
||||
int head_right = (signed) win.screen().maxRight(head);
|
||||
int head_top = (signed) win.screen().maxTop(head);
|
||||
|
|
|
@ -35,7 +35,7 @@ bool RowSmartPlacement::placeWindow(const std::list<FluxboxWindow *> &windowlist
|
|||
int next_x, next_y;
|
||||
|
||||
// view (screen + head) constraints
|
||||
int head = (signed) win.screen().getCurrHead();
|
||||
int head = (signed) win.getOnHead();
|
||||
int head_left = (signed) win.screen().maxLeft(head);
|
||||
int head_right = (signed) win.screen().maxRight(head);
|
||||
int head_top = (signed) win.screen().maxTop(head);
|
||||
|
|
|
@ -88,7 +88,7 @@ bool ScreenPlacement::placeWindow(const std::list<FluxboxWindow *> &windowlist,
|
|||
}
|
||||
|
||||
// view (screen + head) constraints
|
||||
int head = (signed) win.screen().getCurrHead();
|
||||
int head = (signed) win.getOnHead();
|
||||
int head_left = (signed) win.screen().maxLeft(head);
|
||||
int head_right = (signed) win.screen().maxRight(head);
|
||||
int head_top = (signed) win.screen().maxTop(head);
|
||||
|
|
|
@ -51,7 +51,7 @@ bool UnderMousePlacement::placeWindow(const std::list<FluxboxWindow *> &list,
|
|||
int test_y = root_y - (win_h / 2);
|
||||
|
||||
// keep the window inside the screen
|
||||
int head = (signed) win.screen().getCurrHead();
|
||||
int head = (signed) win.getOnHead();
|
||||
int head_left = (signed) win.screen().maxLeft(head);
|
||||
int head_right = (signed) win.screen().maxRight(head);
|
||||
int head_top = (signed) win.screen().maxTop(head);
|
||||
|
|
|
@ -480,6 +480,8 @@ void FluxboxWindow::init() {
|
|||
real_y <= (signed) screen().height())
|
||||
m_placed = true;
|
||||
|
||||
} else if (!m_placed) {
|
||||
setOnHead(screen().getCurrHead());
|
||||
}
|
||||
/*
|
||||
if (wattrib.width <= 0)
|
||||
|
@ -4096,6 +4098,10 @@ int FluxboxWindow::getDecoMaskFromString(const string &str_label) {
|
|||
return mask;
|
||||
}
|
||||
|
||||
int FluxboxWindow::getOnHead() const {
|
||||
return screen().getHead(fbWindow());
|
||||
}
|
||||
|
||||
void FluxboxWindow::setOnHead(int head) {
|
||||
if (head > 0 && head <= screen().numHeads()) {
|
||||
int cur = screen().getHead(fbWindow());
|
||||
|
|
|
@ -306,6 +306,7 @@ public:
|
|||
void lowerLayer();
|
||||
/// moves the window to a new layer
|
||||
void moveToLayer(int layernum, bool force = false);
|
||||
int getOnHead() const;
|
||||
void setOnHead(int head);
|
||||
/// sets the window focus hidden state
|
||||
void setFocusHidden(bool value);
|
||||
|
|
Loading…
Reference in a new issue