… | |
… | |
718 | if (rs[Rs_geometry]) |
718 | if (rs[Rs_geometry]) |
719 | flags = XParseGeometry (rs[Rs_geometry], &x, &y, &w, &h); |
719 | flags = XParseGeometry (rs[Rs_geometry], &x, &y, &w, &h); |
720 | |
720 | |
721 | if (flags & WidthValue) |
721 | if (flags & WidthValue) |
722 | { |
722 | { |
723 | ncol = BOUND_POSITIVE_INT16 (w); |
723 | ncol = clamp (w, 0, MAX_POSITIVE_INT16); |
724 | szHint.flags |= USSize; |
724 | szHint.flags |= USSize; |
725 | } |
725 | } |
726 | |
726 | |
727 | if (flags & HeightValue) |
727 | if (flags & HeightValue) |
728 | { |
728 | { |
729 | nrow = BOUND_POSITIVE_INT16 (h); |
729 | nrow = clamp (h, 0, MAX_POSITIVE_INT16); |
730 | szHint.flags |= USSize; |
730 | szHint.flags |= USSize; |
731 | } |
731 | } |
732 | |
732 | |
733 | if (flags & XValue) |
733 | if (flags & XValue) |
734 | { |
734 | { |
… | |
… | |
795 | szHint.width = newwidth; |
795 | szHint.width = newwidth; |
796 | width = newwidth - szHint.base_width; |
796 | width = newwidth - szHint.base_width; |
797 | } |
797 | } |
798 | else |
798 | else |
799 | { |
799 | { |
800 | MIN_IT (width, max_width); |
800 | min_it (width, max_width); |
801 | szHint.width = szHint.base_width + width; |
801 | szHint.width = szHint.base_width + width; |
802 | } |
802 | } |
803 | |
803 | |
804 | if (newheight && newheight - szHint.base_height < max_height) |
804 | if (newheight && newheight - szHint.base_height < max_height) |
805 | { |
805 | { |
806 | szHint.height = newheight; |
806 | szHint.height = newheight; |
807 | height = newheight - szHint.base_height; |
807 | height = newheight - szHint.base_height; |
808 | } |
808 | } |
809 | else |
809 | else |
810 | { |
810 | { |
811 | MIN_IT (height, max_height); |
811 | min_it (height, max_height); |
812 | szHint.height = szHint.base_height + height; |
812 | szHint.height = szHint.base_height + height; |
813 | } |
813 | } |
814 | |
814 | |
815 | if (scrollbar_visible () && (options & Opt_scrollBar_right)) |
815 | if (scrollbar_visible () && (options & Opt_scrollBar_right)) |
816 | window_sb_x = szHint.width - sb_w; |
816 | window_sb_x = szHint.width - sb_w; |