aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-10-05 09:03:43 (GMT)
committerrathnor <rathnor>2003-10-05 09:03:43 (GMT)
commit9a155ea7b5cf1b76aa7b9864aa3c1a7342f1f67c (patch)
tree4656a6fe71b5e18bf4b5044df9e1980162823c58 /src/Window.cc
parent6984eb8970b61c0a6bcacba301707807d47d9b42 (diff)
downloadfluxbox_pavel-9a155ea7b5cf1b76aa7b9864aa3c1a7342f1f67c.zip
fluxbox_pavel-9a155ea7b5cf1b76aa7b9864aa3c1a7342f1f67c.tar.bz2
fix window size when changing titlebar height
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/Window.cc b/src/Window.cc
index e104ae6..ccf52a2 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.cc,v 1.239 2003/10/05 02:31:22 rathnor Exp $ 25// $Id: Window.cc,v 1.240 2003/10/05 09:03:43 rathnor Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -512,7 +512,6 @@ void FluxboxWindow::init() {
512 if (!place_window) 512 if (!place_window)
513 moveResize(frame().x(), frame().y(), frame().width(), frame().height()); 513 moveResize(frame().x(), frame().y(), frame().width(), frame().height());
514 514
515
516 screen().getWorkspace(m_workspace_number)->addWindow(*this, place_window); 515 screen().getWorkspace(m_workspace_number)->addWindow(*this, place_window);
517 516
518 if (shaded) { // start shaded 517 if (shaded) { // start shaded
@@ -2627,6 +2626,7 @@ void FluxboxWindow::setDecoration(Decoration decoration) {
2627// commit current decoration values to actual displayed things 2626// commit current decoration values to actual displayed things
2628void FluxboxWindow::applyDecorations(bool initial) { 2627void FluxboxWindow::applyDecorations(bool initial) {
2629 frame().clientArea().setBorderWidth(0); // client area bordered by other things 2628 frame().clientArea().setBorderWidth(0); // client area bordered by other things
2629 bool client_move = false;
2630 2630
2631 int grav_x=0, grav_y=0; 2631 int grav_x=0, grav_y=0;
2632 // negate gravity 2632 // negate gravity
@@ -2636,28 +2636,34 @@ void FluxboxWindow::applyDecorations(bool initial) {
2636 if (decorations.border) 2636 if (decorations.border)
2637 border_width = frame().theme().border().width(); 2637 border_width = frame().theme().border().width();
2638 2638
2639 if (initial || frame().window().borderWidth() != border_width) 2639 if (initial || frame().window().borderWidth() != border_width) {
2640 client_move = true;
2640 frame().setBorderWidth(border_width); 2641 frame().setBorderWidth(border_width);
2642 }
2641 2643
2642 // we rely on frame not doing anything if it is already shown/hidden 2644 // we rely on frame not doing anything if it is already shown/hidden
2643 if (decorations.titlebar) 2645 if (decorations.titlebar)
2644 frame().showTitlebar(); 2646 client_move |= frame().showTitlebar();
2645 else 2647 else
2646 frame().hideTitlebar(); 2648 client_move |= frame().hideTitlebar();
2647 2649
2648 if (decorations.handle) { 2650 if (decorations.handle) {
2649 frame().showHandle(); 2651 client_move |= frame().showHandle();
2650 } else 2652 } else
2651 frame().hideHandle(); 2653 client_move |= frame().hideHandle();
2652 2654
2653 // apply gravity once more 2655 // apply gravity once more
2654 frame().gravityTranslate(grav_x, grav_y, m_client->gravity(), false); 2656 frame().gravityTranslate(grav_x, grav_y, m_client->gravity(), false);
2655 2657
2656 // if the location changes, shift it 2658 // if the location changes, shift it
2657 if (grav_x != 0 || grav_y != 0) 2659 if (grav_x != 0 || grav_y != 0) {
2658 move(grav_x + frame().x(), grav_y + frame().y()); 2660 move(grav_x + frame().x(), grav_y + frame().y());
2661 client_move = true;
2662 }
2659 2663
2660 frame().reconfigure(); 2664 frame().reconfigure();
2665 if (client_move)
2666 sendConfigureNotify();
2661} 2667}
2662 2668
2663void FluxboxWindow::toggleDecoration() { 2669void FluxboxWindow::toggleDecoration() {
@@ -2989,8 +2995,6 @@ void FluxboxWindow::attachTo(int x, int y) {
2989 if (client) 2995 if (client)
2990 attach_to_win = client->fbwindow(); 2996 attach_to_win = client->fbwindow();
2991 2997
2992 cerr<<"client = "<<client<<", child = "<<hex<<child<<dec<<", fbwin = "<<attach_to_win<<endl;
2993
2994 if (attach_to_win != this && 2998 if (attach_to_win != this &&
2995 attach_to_win != 0) { 2999 attach_to_win != 0) {
2996 attach_to_win->attachClient(*m_attaching_tab); 3000 attach_to_win->attachClient(*m_attaching_tab);