all repos — fluxbox @ 173d740377112dedb508ce61341e405d1a51a7d8

custom fork of the fluxbox windowmanager

check valid attr.height and width
fluxgen fluxgen
commit

173d740377112dedb508ce61341e405d1a51a7d8

parent

660b3bddd64ac8463714f037b3e1322f694ccd20

1 files changed, 11 insertions(+), 3 deletions(-)

jump to
M src/FbTk/FbWindow.ccsrc/FbTk/FbWindow.cc

@@ -19,7 +19,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: FbWindow.cc,v 1.30 2004/01/08 22:04:39 fluxgen Exp $ +// $Id: FbWindow.cc,v 1.31 2004/01/21 20:07:41 fluxgen Exp $ #include "FbWindow.hh"

@@ -285,8 +285,16 @@ if (XGetWindowAttributes(s_display,

m_window, &attr) != 0 && attr.screen != 0) { m_screen_num = XScreenNumberOfScreen(attr.screen); - m_width = attr.width; - m_height = attr.height ; + if (attr.width <= 0) + m_width = 1; + else + m_width = attr.width; + + if (attr.height <= 0) + m_height = 1; + else + m_height = attr.height; + m_x = attr.x; m_y = attr.y; m_depth = attr.depth;