diff options
author | rathnor <rathnor> | 2003-07-26 16:17:02 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-07-26 16:17:02 (GMT) |
commit | 2585aefafe99591a6d3fa20fd09f079ddfa897c1 (patch) | |
tree | 98dfce1ebc1e0e3537360aaa3953cb8abba3c6dc /src/FbWinFrame.cc | |
parent | 2b7aace6b304fc46ae4f948feb531ae60b39251e (diff) | |
download | fluxbox_pavel-2585aefafe99591a6d3fa20fd09f079ddfa897c1.zip fluxbox_pavel-2585aefafe99591a6d3fa20fd09f079ddfa897c1.tar.bz2 |
fix window size when varying borderWidth
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r-- | src/FbWinFrame.cc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index a848788..ada5f00 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: FbWinFrame.cc,v 1.30 2003/07/10 11:36:21 fluxgen Exp $ | 22 | // $Id: FbWinFrame.cc,v 1.31 2003/07/26 16:17:01 rathnor Exp $ |
23 | 23 | ||
24 | #include "FbWinFrame.hh" | 24 | #include "FbWinFrame.hh" |
25 | #include "ImageControl.hh" | 25 | #include "ImageControl.hh" |
@@ -914,3 +914,22 @@ void FbWinFrame::renderLabelButtons() { | |||
914 | } | 914 | } |
915 | 915 | ||
916 | } | 916 | } |
917 | |||
918 | void FbWinFrame::setBorderWidth(unsigned int borderW) { | ||
919 | int bw_changes = 0; | ||
920 | // we need to change the size of the window | ||
921 | // if the border width changes... | ||
922 | if (m_use_titlebar) | ||
923 | bw_changes += (signed) borderW - titlebar().borderWidth(); | ||
924 | if (m_use_handle) | ||
925 | bw_changes += (signed) borderW - handle().borderWidth(); | ||
926 | |||
927 | window().setBorderWidth(borderW); | ||
928 | titlebar().setBorderWidth(borderW); | ||
929 | handle().setBorderWidth(borderW); | ||
930 | gripLeft().setBorderWidth(borderW); | ||
931 | gripRight().setBorderWidth(borderW); | ||
932 | |||
933 | if (bw_changes != 0) | ||
934 | resize(width(), height() + bw_changes); | ||
935 | } | ||