diff options
Diffstat (limited to 'src/WindowState.cc')
-rw-r--r-- | src/WindowState.cc | 8 |
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 | ||
32 | bool WindowState::useHandle() const { | 32 | bool 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 | ||
36 | bool WindowState::useTabs() const { | 37 | bool 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 | ||
82 | bool SizeHints::isResizable() const { | ||
83 | return max_width == 0 || max_height == 0 || | ||
84 | max_width > min_width || max_height > min_height; | ||
85 | } | ||
86 | |||
81 | void SizeHints::reset(const XSizeHints &sizehint) { | 87 | void 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; |