aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Window.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 162ecd4..38ac8eb 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.cc,v 1.96 2002/10/29 16:24:54 fluxgen Exp $ 25// $Id: Window.cc,v 1.97 2002/11/12 14:54:45 rathnor Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -210,8 +210,8 @@ tab(0) {
210 210
211 if ((client.normal_hint_flags & PMinSize) && 211 if ((client.normal_hint_flags & PMinSize) &&
212 (client.normal_hint_flags & PMaxSize) && 212 (client.normal_hint_flags & PMaxSize) &&
213 client.max_width <= client.min_width && 213 client.max_width != 0 && client.max_width <= client.min_width &&
214 client.max_height <= client.min_height) { 214 client.max_height != 0 && client.max_height <= client.min_height) {
215 decorations.maximize = decorations.handle = 215 decorations.maximize = decorations.handle =
216 functions.resize = functions.maximize = false; 216 functions.resize = functions.maximize = false;
217 decorations.tab = false; //no tab for this window 217 decorations.tab = false; //no tab for this window
@@ -1207,8 +1207,8 @@ void FluxboxWindow::getWMNormalHints() {
1207 client.min_width = client.min_height = 1207 client.min_width = client.min_height =
1208 client.base_width = client.base_height = 1208 client.base_width = client.base_height =
1209 client.width_inc = client.height_inc = 1; 1209 client.width_inc = client.height_inc = 1;
1210 client.max_width = screen->getWidth(); 1210 client.max_width = 0; // unbounded
1211 client.max_height = screen->getHeight(); 1211 client.max_height = 0;
1212 client.min_aspect_x = client.min_aspect_y = 1212 client.min_aspect_x = client.min_aspect_y =
1213 client.max_aspect_x = client.max_aspect_y = 1; 1213 client.max_aspect_x = client.max_aspect_y = 1;
1214 client.win_gravity = NorthWestGravity; 1214 client.win_gravity = NorthWestGravity;
@@ -1225,8 +1225,8 @@ void FluxboxWindow::getWMNormalHints() {
1225 client.max_width = sizehint.max_width; 1225 client.max_width = sizehint.max_width;
1226 client.max_height = sizehint.max_height; 1226 client.max_height = sizehint.max_height;
1227 } else { 1227 } else {
1228 client.max_width = screen->getWidth(); 1228 client.max_width = 0; // unbounded
1229 client.max_height = screen->getHeight(); 1229 client.max_height = 0;
1230 } 1230 }
1231 1231
1232 if (sizehint.flags & PResizeInc) { 1232 if (sizehint.flags & PResizeInc) {
@@ -1809,8 +1809,8 @@ void FluxboxWindow::maximize(unsigned int button) {
1809 1809
1810 if (dw < client.min_width) dw = client.min_width; 1810 if (dw < client.min_width) dw = client.min_width;
1811 if (dh < client.min_height) dh = client.min_height; 1811 if (dh < client.min_height) dh = client.min_height;
1812 if (dw > client.max_width) dw = client.max_width; 1812 if (client.max_width != 0 && dw > client.max_width) dw = client.max_width;
1813 if (dh > client.max_height) dh = client.max_height; 1813 if (client.max_height != 0 && dh > client.max_height) dh = client.max_height;
1814 1814
1815 dw -= (dw % client.width_inc); 1815 dw -= (dw % client.width_inc);
1816 dw += client.base_width; 1816 dw += client.base_width;
@@ -2649,8 +2649,8 @@ void FluxboxWindow::propertyNotifyEvent(Atom atom) {
2649 if ((client.normal_hint_flags & PMinSize) && 2649 if ((client.normal_hint_flags & PMinSize) &&
2650 (client.normal_hint_flags & PMaxSize)) { 2650 (client.normal_hint_flags & PMaxSize)) {
2651 2651
2652 if (client.max_width <= client.min_width && 2652 if (client.max_width != 0 && client.max_width <= client.min_width &&
2653 client.max_height <= client.min_height) { 2653 client.max_height != 0 && client.max_height <= client.min_height) {
2654 decorations.maximize = false; 2654 decorations.maximize = false;
2655 decorations.handle = false; 2655 decorations.handle = false;
2656 functions.resize=false; 2656 functions.resize=false;
@@ -3662,9 +3662,9 @@ void FluxboxWindow::right_fixsize(int *gx, int *gy) {
3662 dx = client.min_width; 3662 dx = client.min_width;
3663 if (dy < (signed) client.min_height) 3663 if (dy < (signed) client.min_height)
3664 dy = client.min_height; 3664 dy = client.min_height;
3665 if ((unsigned) dx > client.max_width) 3665 if (client.max_width > 0 && (unsigned) dx > client.max_width)
3666 dx = client.max_width; 3666 dx = client.max_width;
3667 if ((unsigned) dy > client.max_height) 3667 if (client.max_height > 0 && (unsigned) dy > client.max_height)
3668 dy = client.max_height; 3668 dy = client.max_height;
3669 3669
3670 dx /= client.width_inc; 3670 dx /= client.width_inc;
@@ -3693,8 +3693,8 @@ void FluxboxWindow::left_fixsize(int *gx, int *gy) {
3693 3693
3694 if (dx < (signed) client.min_width) dx = client.min_width; 3694 if (dx < (signed) client.min_width) dx = client.min_width;
3695 if (dy < (signed) client.min_height) dy = client.min_height; 3695 if (dy < (signed) client.min_height) dy = client.min_height;
3696 if ((unsigned) dx > client.max_width) dx = client.max_width; 3696 if (client.max_width > 0 && (unsigned) dx > client.max_width) dx = client.max_width;
3697 if ((unsigned) dy > client.max_height) dy = client.max_height; 3697 if (client.max_height > 0 && (unsigned) dy > client.max_height) dy = client.max_height;
3698 3698
3699 dx /= client.width_inc; 3699 dx /= client.width_inc;
3700 dy /= client.height_inc; 3700 dy /= client.height_inc;