aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/WindowState.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/WindowState.cc b/src/WindowState.cc
index e684992..4bd8f61 100644
--- a/src/WindowState.cc
+++ b/src/WindowState.cc
@@ -113,8 +113,9 @@ void SizeHints::reset(const XSizeHints &sizehint) {
113 min_width = min_height = 1; 113 min_width = min_height = 1;
114 114
115 if (sizehint.flags & PBaseSize) { 115 if (sizehint.flags & PBaseSize) {
116 base_width = sizehint.base_width; 116 base_width = std::max(sizehint.base_width, 0);
117 base_height = sizehint.base_height; 117 base_height = std::max(sizehint.base_height, 0);
118
118 if (!(sizehint.flags & PMinSize)) { 119 if (!(sizehint.flags & PMinSize)) {
119 min_width = base_width; 120 min_width = base_width;
120 min_height = base_height; 121 min_height = base_height;