1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +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

@@ -81,13 +81,6 @@ void wClientRestore(WWindow * wwin)
if (gy > 0) if (gy > 0)
wwin->frame_y += (wwin->frame->top_width + wwin->frame->bottom_width); wwin->frame_y += (wwin->frame->top_width + wwin->frame->bottom_width);
#endif #endif
/* account for titlebar and border */
wwin->frame_y += wwin->frame->top_width;
if (HAS_BORDER(wwin)) {
wwin->frame_x += FRAME_BORDER_WIDTH;
wwin->frame_y += FRAME_BORDER_WIDTH;
}
XSetWindowBorderWidth(dpy, wwin->client_win, wwin->old_border_width); XSetWindowBorderWidth(dpy, wwin->client_win, wwin->old_border_width);
XReparentWindow(dpy, wwin->client_win, wwin->screen_ptr->root_win, wwin->frame_x, wwin->frame_y); XReparentWindow(dpy, wwin->client_win, wwin->screen_ptr->root_win, wwin->frame_x, wwin->frame_y);

View File

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

View File

@@ -591,7 +591,6 @@ WWindow *wManageWindow(WScreen *scr, Window window)
char *title; char *title;
Bool withdraw = False; Bool withdraw = False;
Bool raise = False; Bool raise = False;
Bool frame_adjustment = True;
/* mutex. */ /* mutex. */
XGrabServer(dpy); XGrabServer(dpy);
@@ -992,7 +991,6 @@ WWindow *wManageWindow(WScreen *scr, Window window)
} else { } else {
PlaceWindow(wwin, &x, &y, width, height); PlaceWindow(wwin, &x, &y, width, height);
frame_adjustment = False;
} }
if (wPreferences.window_placement == WPM_MANUAL) if (wPreferences.window_placement == WPM_MANUAL)
@@ -1142,7 +1140,7 @@ WWindow *wManageWindow(WScreen *scr, Window window)
y -= wwin->frame->top_width + wwin->frame->bottom_width; y -= wwin->frame->top_width + wwin->frame->bottom_width;
} }
if (frame_adjustment) { {
WMRect rect; WMRect rect;
WArea usableArea; WArea usableArea;
int head; int head;