aboutsummaryrefslogtreecommitdiff
path: root/src/WindowState.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-08-27 17:47:16 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-08-27 17:47:16 (GMT)
commitcbc1075dde0276956aca1753a229097bcc7bac87 (patch)
tree1449a8cd55a242034e5f6f70a78e4df63f00dc54 /src/WindowState.cc
parent55fd49614bb1b9e37561147f18719b2ac277b64b (diff)
downloadfluxbox-cbc1075dde0276956aca1753a229097bcc7bac87.zip
fluxbox-cbc1075dde0276956aca1753a229097bcc7bac87.tar.bz2
move decoration handling for non-resizable windows to SizeHint class
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;