use old size/position in apps file when the window is shaded or maximized
markt markt
6 files changed,
43 insertions(+),
2 deletions(-)
M
ChangeLog
→
ChangeLog
@@ -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)
M
src/FbWinFrame.cc
→
src/FbWinFrame.cc
@@ -1766,6 +1766,12 @@ move(x, 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;
M
src/FbWinFrame.hh
→
src/FbWinFrame.hh
@@ -206,6 +206,7 @@ inline int x() const { return m_window.x(); }
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;
M
src/Remember.cc
→
src/Remember.cc
@@ -905,13 +905,13 @@ app->rememberHead(win->screen().getHead(win->fbWindow()));
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:
M
src/Window.cc
→
src/Window.cc
@@ -3735,6 +3735,32 @@ return empty_string;
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) {
M
src/Window.hh
→
src/Window.hh
@@ -389,6 +389,11 @@ inline int y() const { return frame().y(); }
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(); }