allow negative width and height
This commit is contained in:
parent
7a22210864
commit
9be679dad7
3 changed files with 11 additions and 7 deletions
|
@ -1841,8 +1841,8 @@ void BScreen::hidePosition() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// can be negative when base_width/height > min_width/height
|
||||||
void BScreen::showGeometry(unsigned int gx, unsigned int gy) {
|
void BScreen::showGeometry(int gx, int gy) {
|
||||||
if (!doShowWindowPos())
|
if (!doShowWindowPos())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -286,7 +286,7 @@ public:
|
||||||
void showPosition(int x, int y);
|
void showPosition(int x, int y);
|
||||||
void hidePosition();
|
void hidePosition();
|
||||||
/// show geomentry with "width x height"-text, not size of window
|
/// 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 hideGeometry();
|
||||||
|
|
||||||
void notifyReleasedKeys(XKeyEvent &ke);
|
void notifyReleasedKeys(XKeyEvent &ke);
|
||||||
|
|
|
@ -842,11 +842,15 @@ void WinClient::applySizeHints(int &width, int &height,
|
||||||
|
|
||||||
// enforce incremental size limits, wrt base size
|
// enforce incremental size limits, wrt base size
|
||||||
// only calculate this if we really need to
|
// only calculate this if we really need to
|
||||||
i = (width - base_width) / width_inc;
|
i = (width - static_cast<signed>(base_width)) /
|
||||||
width = i*width_inc + 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;
|
j = (height - static_cast<signed>(base_height)) /
|
||||||
height = j*height_inc + base_height;
|
static_cast<signed>(height_inc);
|
||||||
|
height = j*static_cast<signed>(height_inc) +
|
||||||
|
static_cast<signed>(base_height);
|
||||||
|
|
||||||
if (display_width)
|
if (display_width)
|
||||||
*display_width = i;
|
*display_width = i;
|
||||||
|
|
Loading…
Reference in a new issue