1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-23 22:52:34 +01:00

Revert "Fixed regression when placing windows."

This reverts commit 4e193c172b.

Conflicts:
	src/window.c
This commit is contained in:
Carlos R. Mafra
2012-12-18 18:20:52 +00:00
parent ff52ef3996
commit f6f72acbde
3 changed files with 5 additions and 16 deletions

View File

@@ -523,7 +523,6 @@ void PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret, unsigned width, unsigned
WScreen *scr = wwin->screen_ptr;
int h = WMFontHeight(scr->title_font)
+ (wPreferences.window_title_clearance + TITLEBAR_EXTEND_SPACE) * 2;
int border_width;
if (h > wPreferences.window_title_max_height)
h = wPreferences.window_title_max_height;
@@ -578,14 +577,13 @@ void PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret, unsigned width, unsigned
* this will also take dock/clip etc.. into account
* aswell as being xinerama friendly
*/
border_width = (HAS_BORDER(wwin)) ? 2 * FRAME_BORDER_WIDTH : 0;
if (*x_ret + border_width + width > usableArea.x2)
*x_ret = usableArea.x2 - border_width - width;
if (*x_ret + width > usableArea.x2)
*x_ret = usableArea.x2 - width;
if (*x_ret < usableArea.x1)
*x_ret = usableArea.x1;
if (*y_ret + border_width + height > usableArea.y2)
*y_ret = usableArea.y2 - border_width - height;
if (*y_ret + height > usableArea.y2)
*y_ret = usableArea.y2 - height;
if (*y_ret < usableArea.y1)
*y_ret = usableArea.y1;
}