From cdfafcaa4eb16dc78919fd1dac13fe103becc9f0 Mon Sep 17 00:00:00 2001 From: markt Date: Thu, 22 Nov 2007 05:47:02 +0000 Subject: set resize increments to 1 when set to 0 by the application --- ChangeLog | 3 +++ src/WinClient.cc | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 18c51ed..a0e0446 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ (Format: Year/Month/Day) Changes for 1.0.1: *07/11/22: + * Fix division by 0 error when resize increments are set to 0 by an + application, bug #1836182 + WinClient.cc * Added conditional statements to key commands (Mark) - for example, this will search for an open xterm window, cycle through them if there are any, or else open one: diff --git a/src/WinClient.cc b/src/WinClient.cc index 83637e2..fb9fec6 100644 --- a/src/WinClient.cc +++ b/src/WinClient.cc @@ -508,6 +508,11 @@ void WinClient::updateWMNormalHints() { } else width_inc = height_inc = 1; + if (width_inc == 0) + width_inc = 1; + if (height_inc == 0) + height_inc = 1; + if (sizehint.flags & PAspect) { min_aspect_x = sizehint.min_aspect.x; min_aspect_y = sizehint.min_aspect.y; -- cgit v0.11.2