aboutsummaryrefslogtreecommitdiff
path: root/src/WindowState.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/WindowState.cc')
-rw-r--r--src/WindowState.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/WindowState.cc b/src/WindowState.cc
index 2f8fd4e..f4df136 100644
--- a/src/WindowState.cc
+++ b/src/WindowState.cc
@@ -30,7 +30,8 @@ bool WindowState::useBorder() const {
30} 30}
31 31
32bool WindowState::useHandle() const { 32bool WindowState::useHandle() const {
33 return !fullscreen && !shaded && deco_mask & DECORM_HANDLE; 33 return !fullscreen && !shaded && deco_mask & DECORM_HANDLE &&
34 size_hints.isResizable();
34} 35}
35 36
36bool WindowState::useTabs() const { 37bool WindowState::useTabs() const {
@@ -78,6 +79,11 @@ int WindowState::getDecoMaskFromString(const std::string &str_label) {
78 return mask; 79 return mask;
79} 80}
80 81
82bool SizeHints::isResizable() const {
83 return max_width == 0 || max_height == 0 ||
84 max_width > min_width || max_height > min_height;
85}
86
81void SizeHints::reset(const XSizeHints &sizehint) { 87void SizeHints::reset(const XSizeHints &sizehint) {
82 if (sizehint.flags & PMinSize) { 88 if (sizehint.flags & PMinSize) {
83 min_width = sizehint.min_width; 89 min_width = sizehint.min_width;