From f758ee4bbd4785c65c838a12507e3f6f5f63d210 Mon Sep 17 00:00:00 2001 From: rathnor Date: Mon, 9 Dec 2002 14:17:50 +0000 Subject: proper fix for [ 561602 ] Problem using ToggleDecor in terminals. old_decoration wasn't initialised. --- src/Window.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Window.cc b/src/Window.cc index cf88219..e54a1de 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.106 2002/12/01 13:42:03 rathnor Exp $ +// $Id: Window.cc,v 1.107 2002/12/09 14:17:50 rathnor Exp $ #include "Window.hh" @@ -71,7 +71,7 @@ FluxboxWindow::FluxboxWindow(Window w, BScreen *s): display(0), lastButtonPressTime(0), m_windowmenu(0), - m_layer(LAYER_NORMAL), + m_layer(LAYER_NORMAL), old_decoration(DECOR_NORMAL), tab(0) { lastFocusTime.tv_sec = lastFocusTime.tv_usec = 0; @@ -3177,7 +3177,11 @@ void FluxboxWindow::toggleDecoration() { setDecoration(DECOR_NONE); decorations.enabled = false; } else { //revert back to old decoration - setDecoration(old_decoration); + if (old_decoration == DECOR_NONE) { // make sure something happens + setDecoration(DECOR_NORMAL); + } else { + setDecoration(old_decoration); + } decorations.enabled = true; } } -- cgit v0.11.2