all repos — fluxbox @ 9be679dad71f81e85d6e55dd11c662b17e73d937

custom fork of the fluxbox windowmanager

allow negative width and height
markt markt
commit

9be679dad71f81e85d6e55dd11c662b17e73d937

parent

7a22210864b59c06bba6ca6530bb5e69c9772517

3 files changed, 11 insertions(+), 7 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -1841,8 +1841,8 @@ pos_visible = false;

} } - -void BScreen::showGeometry(unsigned int gx, unsigned int gy) { +// can be negative when base_width/height > min_width/height +void BScreen::showGeometry(int gx, int gy) { if (!doShowWindowPos()) return;
M src/Screen.hhsrc/Screen.hh

@@ -286,7 +286,7 @@ /// show position window centered on the screen with "X x Y" text

void showPosition(int x, int y); void hidePosition(); /// show geomentry with "width x height"-text, not size of window - void showGeometry(unsigned int width, unsigned int height); + void showGeometry(int width, int height); void hideGeometry(); void notifyReleasedKeys(XKeyEvent &ke);
M src/WinClient.ccsrc/WinClient.cc

@@ -842,11 +842,15 @@ }

// enforce incremental size limits, wrt base size // only calculate this if we really need to - i = (width - base_width) / width_inc; - width = i*width_inc + base_width; + i = (width - static_cast<signed>(base_width)) / + static_cast<signed>(width_inc); + width = i*static_cast<signed>(width_inc) + + static_cast<signed>(base_width); - j = (height - base_height) / height_inc; - height = j*height_inc + base_height; + j = (height - static_cast<signed>(base_height)) / + static_cast<signed>(height_inc); + height = j*static_cast<signed>(height_inc) + + static_cast<signed>(base_height); if (display_width) *display_width = i;