- m_hAdjust->page_increment = (w / m_xScrollPixelsPerLine);
- m_hAdjust->page_size = m_hAdjust->page_increment;
-
+ m_hAdjust->page_size = w / m_xScrollPixelsPerLine;
+ m_hAdjust->page_increment = w / m_xScrollPixelsPerLine;
+
+ // Special case. When client and virtual size are very close but
+ // the client is big enough, kill scrollbar.
+
+ if ((m_hAdjust->page_size < m_hAdjust->upper) && (w >= vw))
+ m_hAdjust->page_size += 1.0;
+