use old size/position in apps file when the window is shaded or maximized
This commit is contained in:
parent
b00d53eb72
commit
2ddc0290cb
6 changed files with 43 additions and 2 deletions
|
@ -1,6 +1,9 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 1.0.0:
|
||||
*07/07/02:
|
||||
* Remember original size/position in apps file for shaded or maximized
|
||||
windows (Mark)
|
||||
Remember.cc Window.cc/hh FbWinFrame.cc/hh
|
||||
* Enabled Xinerama and Imlib2 support by default (Mark)
|
||||
configure.in
|
||||
* Fixed handle rendering when switching from a style without them (Mark)
|
||||
|
|
|
@ -1766,6 +1766,12 @@ void FbWinFrame::gravityTranslate(int &x, int &y,
|
|||
}
|
||||
}
|
||||
|
||||
unsigned int FbWinFrame::normalHeight() const {
|
||||
if (m_shaded)
|
||||
return m_height_before_shade;
|
||||
return height();
|
||||
}
|
||||
|
||||
int FbWinFrame::widthOffset() const {
|
||||
if (m_tabmode != EXTERNAL || !m_use_tabs)
|
||||
return 0;
|
||||
|
|
|
@ -206,6 +206,7 @@ public:
|
|||
inline int y() const { return m_window.y(); }
|
||||
inline unsigned int width() const { return m_window.width(); }
|
||||
inline unsigned int height() const { return m_window.height(); }
|
||||
unsigned int normalHeight() const;
|
||||
|
||||
// extra bits for tabs
|
||||
int xOffset() const;
|
||||
|
|
|
@ -905,13 +905,13 @@ void Remember::rememberAttrib(WinClient &winclient, Attribute attrib) {
|
|||
break;
|
||||
case REM_DIMENSIONS:
|
||||
//!! Note: This is odd, why dont we need to substract border width on win->width() ?
|
||||
app->rememberDimensions(win->width(), win->height() - 2 * win->fbWindow().borderWidth());
|
||||
app->rememberDimensions(win->normalWidth(), win->normalHeight() - 2 * win->fbWindow().borderWidth());
|
||||
break;
|
||||
case REM_POSITION: {
|
||||
int head = win->screen().getHead(win->fbWindow());
|
||||
int head_x = win->screen().getHeadX(head);
|
||||
int head_y = win->screen().getHeadY(head);
|
||||
app->rememberPosition(win->x() - head_x, win->y() - head_y);
|
||||
app->rememberPosition(win->normalX() - head_x, win->normalY() - head_y);
|
||||
break;
|
||||
}
|
||||
case REM_FOCUSHIDDENSTATE:
|
||||
|
|
|
@ -3735,6 +3735,32 @@ const string &FluxboxWindow::iconTitle() const {
|
|||
return m_client->iconTitle();
|
||||
}
|
||||
|
||||
int FluxboxWindow::normalX() const {
|
||||
if (maximized & MAX_HORZ)
|
||||
return m_old_pos_x;
|
||||
return x();
|
||||
}
|
||||
|
||||
int FluxboxWindow::normalY() const {
|
||||
if (maximized & MAX_VERT)
|
||||
return m_old_pos_y;
|
||||
return y();
|
||||
}
|
||||
|
||||
unsigned int FluxboxWindow::normalWidth() const {
|
||||
if (maximized & MAX_HORZ)
|
||||
return m_old_width;
|
||||
return width();
|
||||
}
|
||||
|
||||
unsigned int FluxboxWindow::normalHeight() const {
|
||||
if (maximized & MAX_VERT)
|
||||
return m_old_height;
|
||||
if (shaded)
|
||||
return frame().normalHeight();
|
||||
return height();
|
||||
}
|
||||
|
||||
int FluxboxWindow::initialState() const { return m_client->initial_state; }
|
||||
|
||||
void FluxboxWindow::changeBlackboxHints(const BlackboxHints &net) {
|
||||
|
|
|
@ -389,6 +389,11 @@ public:
|
|||
inline unsigned int width() const { return frame().width(); }
|
||||
inline unsigned int height() const { return frame().height(); }
|
||||
|
||||
int normalX() const;
|
||||
int normalY() const;
|
||||
unsigned int normalWidth() const;
|
||||
unsigned int normalHeight() const;
|
||||
|
||||
inline int xOffset() const { return frame().xOffset(); }
|
||||
inline int yOffset() const { return frame().yOffset(); }
|
||||
inline int widthOffset() const { return frame().widthOffset(); }
|
||||
|
|
Loading…
Reference in a new issue