toggleDecor fix - rather than static, use an extra member of decorations (means that odd number of toggles don't cause the next window toggled to "ignore" it). I think this fixes bug [ 561602 ] Problem using ToggleDecor in terminals.
rathnor rathnor
2 files changed,
7 insertions(+),
7 deletions(-)
M
src/Window.cc
→
src/Window.cc
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.100 2002/11/17 12:50:20 fluxgen Exp $ +// $Id: Window.cc,v 1.101 2002/11/23 16:07:19 rathnor Exp $ #include "Window.hh"@@ -94,6 +94,7 @@ blackbox_attrib.premax_x = blackbox_attrib.premax_y = 0;
blackbox_attrib.premax_w = blackbox_attrib.premax_h = 0; //use tab as default decorations.tab = true; + decorations.enabled = true; client.window = w; frame.window = frame.plate = frame.title = frame.handle = None; frame.right_grip = frame.left_grip = None;@@ -3175,17 +3176,16 @@
} void FluxboxWindow::toggleDecoration() { - static bool decor = false; //don't toggle decor if the window is shaded if (isShaded()) return; - if (!decor) { //remove decorations + if (decorations.enabled) { //remove decorations setDecoration(DECOR_NONE); - decor = true; + decorations.enabled = false; } else { //revert back to old decoration setDecoration(old_decoration); - decor = false; + decorations.enabled = true; } }
M
src/Window.hh
→
src/Window.hh
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.hh,v 1.36 2002/11/15 12:14:39 fluxgen Exp $ +// $Id: Window.hh,v 1.37 2002/11/23 16:07:19 rathnor Exp $ #ifndef WINDOW_HH #define WINDOW_HH@@ -278,7 +278,7 @@ } client;
struct _decorations { bool titlebar, handle, border, iconify, - maximize, close, menu, sticky, shade, tab; + maximize, close, menu, sticky, shade, tab, enabled; } decorations; struct _functions {