diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-08-27 17:47:16 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-08-27 17:47:16 (GMT) |
commit | cbc1075dde0276956aca1753a229097bcc7bac87 (patch) | |
tree | 1449a8cd55a242034e5f6f70a78e4df63f00dc54 /src/WindowState.cc | |
parent | 55fd49614bb1b9e37561147f18719b2ac277b64b (diff) | |
download | fluxbox_pavel-cbc1075dde0276956aca1753a229097bcc7bac87.zip fluxbox_pavel-cbc1075dde0276956aca1753a229097bcc7bac87.tar.bz2 |
move decoration handling for non-resizable windows to SizeHint class
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; |