diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/FbWinFrame.cc | 6 | ||||
-rw-r--r-- | src/FbWinFrame.hh | 1 | ||||
-rw-r--r-- | src/Remember.cc | 4 | ||||
-rw-r--r-- | src/Window.cc | 26 | ||||
-rw-r--r-- | src/Window.hh | 5 |
5 files changed, 40 insertions, 2 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 5a9a301..d3b3d2f 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -1766,6 +1766,12 @@ void FbWinFrame::gravityTranslate(int &x, int &y, | |||
1766 | } | 1766 | } |
1767 | } | 1767 | } |
1768 | 1768 | ||
1769 | unsigned int FbWinFrame::normalHeight() const { | ||
1770 | if (m_shaded) | ||
1771 | return m_height_before_shade; | ||
1772 | return height(); | ||
1773 | } | ||
1774 | |||
1769 | int FbWinFrame::widthOffset() const { | 1775 | int FbWinFrame::widthOffset() const { |
1770 | if (m_tabmode != EXTERNAL || !m_use_tabs) | 1776 | if (m_tabmode != EXTERNAL || !m_use_tabs) |
1771 | return 0; | 1777 | return 0; |
diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh index 8d0c3ba..87c290c 100644 --- a/src/FbWinFrame.hh +++ b/src/FbWinFrame.hh | |||
@@ -206,6 +206,7 @@ public: | |||
206 | inline int y() const { return m_window.y(); } | 206 | inline int y() const { return m_window.y(); } |
207 | inline unsigned int width() const { return m_window.width(); } | 207 | inline unsigned int width() const { return m_window.width(); } |
208 | inline unsigned int height() const { return m_window.height(); } | 208 | inline unsigned int height() const { return m_window.height(); } |
209 | unsigned int normalHeight() const; | ||
209 | 210 | ||
210 | // extra bits for tabs | 211 | // extra bits for tabs |
211 | int xOffset() const; | 212 | int xOffset() const; |
diff --git a/src/Remember.cc b/src/Remember.cc index 12b5097..30a3e14 100644 --- a/src/Remember.cc +++ b/src/Remember.cc | |||
@@ -905,13 +905,13 @@ void Remember::rememberAttrib(WinClient &winclient, Attribute attrib) { | |||
905 | break; | 905 | break; |
906 | case REM_DIMENSIONS: | 906 | case REM_DIMENSIONS: |
907 | //!! Note: This is odd, why dont we need to substract border width on win->width() ? | 907 | //!! Note: This is odd, why dont we need to substract border width on win->width() ? |
908 | app->rememberDimensions(win->width(), win->height() - 2 * win->fbWindow().borderWidth()); | 908 | app->rememberDimensions(win->normalWidth(), win->normalHeight() - 2 * win->fbWindow().borderWidth()); |
909 | break; | 909 | break; |
910 | case REM_POSITION: { | 910 | case REM_POSITION: { |
911 | int head = win->screen().getHead(win->fbWindow()); | 911 | int head = win->screen().getHead(win->fbWindow()); |
912 | int head_x = win->screen().getHeadX(head); | 912 | int head_x = win->screen().getHeadX(head); |
913 | int head_y = win->screen().getHeadY(head); | 913 | int head_y = win->screen().getHeadY(head); |
914 | app->rememberPosition(win->x() - head_x, win->y() - head_y); | 914 | app->rememberPosition(win->normalX() - head_x, win->normalY() - head_y); |
915 | break; | 915 | break; |
916 | } | 916 | } |
917 | case REM_FOCUSHIDDENSTATE: | 917 | case REM_FOCUSHIDDENSTATE: |
diff --git a/src/Window.cc b/src/Window.cc index 2434d31..af74074 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -3735,6 +3735,32 @@ const string &FluxboxWindow::iconTitle() const { | |||
3735 | return m_client->iconTitle(); | 3735 | return m_client->iconTitle(); |
3736 | } | 3736 | } |
3737 | 3737 | ||
3738 | int FluxboxWindow::normalX() const { | ||
3739 | if (maximized & MAX_HORZ) | ||
3740 | return m_old_pos_x; | ||
3741 | return x(); | ||
3742 | } | ||
3743 | |||
3744 | int FluxboxWindow::normalY() const { | ||
3745 | if (maximized & MAX_VERT) | ||
3746 | return m_old_pos_y; | ||
3747 | return y(); | ||
3748 | } | ||
3749 | |||
3750 | unsigned int FluxboxWindow::normalWidth() const { | ||
3751 | if (maximized & MAX_HORZ) | ||
3752 | return m_old_width; | ||
3753 | return width(); | ||
3754 | } | ||
3755 | |||
3756 | unsigned int FluxboxWindow::normalHeight() const { | ||
3757 | if (maximized & MAX_VERT) | ||
3758 | return m_old_height; | ||
3759 | if (shaded) | ||
3760 | return frame().normalHeight(); | ||
3761 | return height(); | ||
3762 | } | ||
3763 | |||
3738 | int FluxboxWindow::initialState() const { return m_client->initial_state; } | 3764 | int FluxboxWindow::initialState() const { return m_client->initial_state; } |
3739 | 3765 | ||
3740 | void FluxboxWindow::changeBlackboxHints(const BlackboxHints &net) { | 3766 | void FluxboxWindow::changeBlackboxHints(const BlackboxHints &net) { |
diff --git a/src/Window.hh b/src/Window.hh index d7d8910..d9e4a7c 100644 --- a/src/Window.hh +++ b/src/Window.hh | |||
@@ -389,6 +389,11 @@ public: | |||
389 | inline unsigned int width() const { return frame().width(); } | 389 | inline unsigned int width() const { return frame().width(); } |
390 | inline unsigned int height() const { return frame().height(); } | 390 | inline unsigned int height() const { return frame().height(); } |
391 | 391 | ||
392 | int normalX() const; | ||
393 | int normalY() const; | ||
394 | unsigned int normalWidth() const; | ||
395 | unsigned int normalHeight() const; | ||
396 | |||
392 | inline int xOffset() const { return frame().xOffset(); } | 397 | inline int xOffset() const { return frame().xOffset(); } |
393 | inline int yOffset() const { return frame().yOffset(); } | 398 | inline int yOffset() const { return frame().yOffset(); } |
394 | inline int widthOffset() const { return frame().widthOffset(); } | 399 | inline int widthOffset() const { return frame().widthOffset(); } |