1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 05:18:06 +01:00

Fix typos, remove commented out code etc

This commit is contained in:
Carlos R. Mafra
2010-03-15 19:36:25 +01:00
parent 939f46b870
commit 9a2dbc5a5f

View File

@@ -275,9 +275,6 @@ void wUnshadeWindow(WWindow *wwin)
wwin->client.y = wwin->frame_y + wwin->frame->top_width; wwin->client.y = wwin->frame_y + wwin->frame->top_width;
wWindowSynthConfigureNotify(wwin); wWindowSynthConfigureNotify(wwin);
/*
wClientSetState(wwin, NormalState, None);
*/
/* if the window is focused, set the focus again as it was disabled during /* if the window is focused, set the focus again as it was disabled during
* shading */ * shading */
if (wwin->flags.focused) if (wwin->flags.focused)
@@ -413,10 +410,10 @@ static void find_Maximus_geometry(WWindow *wwin, WArea usableArea, int *new_x, i
int y_0 = wwin->frame_y; int y_0 = wwin->frame_y;
int width_0 = wwin->frame->core->width; int width_0 = wwin->frame->core->width;
int height_0 = wwin->frame->core->height; int height_0 = wwin->frame->core->height;
int botton_0 = y_0 + height_0; int bottom_0 = y_0 + height_0;
int right_border_0 = x_0 + width_0; int right_border_0 = x_0 + width_0;
int new_x_0, new_y_0, new_botton_0, new_right_border_0, new_height_0; int new_x_0, new_y_0, new_bottom_0, new_right_border_0, new_height_0;
int x_j, y_j, width_j, height_j, botton_j, top_j, right_border_j; int x_j, y_j, width_j, height_j, bottom_j, top_j, right_border_j;
int x_intsect, y_intsect; int x_intsect, y_intsect;
short int tbar_height_0 = 0, rbar_height_0 = 0; short int tbar_height_0 = 0, rbar_height_0 = 0;
short int bd_width_0 = 0; short int bd_width_0 = 0;
@@ -425,7 +422,7 @@ static void find_Maximus_geometry(WWindow *wwin, WArea usableArea, int *new_x, i
/* Try to fully maximize first, then readjust later */ /* Try to fully maximize first, then readjust later */
new_x_0 = usableArea.x1; new_x_0 = usableArea.x1;
new_y_0 = usableArea.y1; new_y_0 = usableArea.y1;
new_botton_0 = usableArea.y2; new_bottom_0 = usableArea.y2;
new_right_border_0 = usableArea.x2; new_right_border_0 = usableArea.x2;
if (HAS_TITLEBAR(wwin)) if (HAS_TITLEBAR(wwin))
@@ -459,7 +456,7 @@ static void find_Maximus_geometry(WWindow *wwin, WArea usableArea, int *new_x, i
y_j = tmp->frame_y; y_j = tmp->frame_y;
width_j = tmp->frame->core->width; width_j = tmp->frame->core->width;
height_j = tmp->frame->core->height; height_j = tmp->frame->core->height;
botton_j = y_j + height_j; bottom_j = y_j + height_j;
top_j = y_j; top_j = y_j;
right_border_j = x_j + width_j; right_border_j = x_j + width_j;
@@ -467,11 +464,10 @@ static void find_Maximus_geometry(WWindow *wwin, WArea usableArea, int *new_x, i
x_intsect = calcIntersectionLength(x_0, width_0, x_j, width_j); x_intsect = calcIntersectionLength(x_0, width_0, x_j, width_j);
if (x_intsect != 0) { if (x_intsect != 0) {
/* TODO: Consider the case when coords are equal */ /* TODO: Consider the case when coords are equal */
if (botton_j < y_0 && botton_j > new_y_0) { if (bottom_j < y_0 && bottom_j > new_y_0) {
/* w_0 is below the botton of w_j */ /* w_0 is below the bottom of w_j */
new_y_0 = botton_j + 1; new_y_0 = bottom_j + 1;
} }
if (bottom_0 < top_j && top_j < new_bottom_0) { if (bottom_0 < top_j && top_j < new_bottom_0) {
/* The bottom of w_0 is above the top of w_j */ /* The bottom of w_0 is above the top of w_j */
new_bottom_0 = top_j - 1; new_bottom_0 = top_j - 1;
@@ -493,7 +489,7 @@ static void find_Maximus_geometry(WWindow *wwin, WArea usableArea, int *new_x, i
y_j = tmp->frame_y; y_j = tmp->frame_y;
width_j = tmp->frame->core->width; width_j = tmp->frame->core->width;
height_j = tmp->frame->core->height; height_j = tmp->frame->core->height;
botton_j = y_j + height_j; bottom_j = y_j + height_j;
top_j = y_j; top_j = y_j;
right_border_j = x_j + width_j; right_border_j = x_j + width_j;
@@ -502,7 +498,7 @@ static void find_Maximus_geometry(WWindow *wwin, WArea usableArea, int *new_x, i
* the possibility that the new value of y_0 will have different * the possibility that the new value of y_0 will have different
* intersections with w_j * intersections with w_j
*/ */
new_height_0 = new_botton_0 - new_y_0 - adjust_height; new_height_0 = new_bottom_0 - new_y_0 - adjust_height;
y_intsect = calcIntersectionLength(new_y_0, new_height_0, y_j, height_j); y_intsect = calcIntersectionLength(new_y_0, new_height_0, y_j, height_j);
if (y_intsect != 0) { if (y_intsect != 0) {
if (right_border_j < x_0 && right_border_j > new_x_0) { if (right_border_j < x_0 && right_border_j > new_x_0) {
@@ -888,20 +884,6 @@ static void mapTransientsFor(WWindow * wwin)
} }
} }
#if 0
static void setupIconGrabs(WIcon * icon)
{
/* setup passive grabs on the icon */
XGrabButton(dpy, Button1, AnyModifier, icon->core->window, True,
ButtonPressMask, GrabModeSync, GrabModeAsync, None, None);
XGrabButton(dpy, Button2, AnyModifier, icon->core->window, True,
ButtonPressMask, GrabModeSync, GrabModeAsync, None, None);
XGrabButton(dpy, Button3, AnyModifier, icon->core->window, True,
ButtonPressMask, GrabModeSync, GrabModeAsync, None, None);
XSync(dpy, 0);
}
#endif
static WWindow *recursiveTransientFor(WWindow * wwin) static WWindow *recursiveTransientFor(WWindow * wwin)
{ {
int i; int i;
@@ -924,17 +906,6 @@ static WWindow *recursiveTransientFor(WWindow * wwin)
return wwin; return wwin;
} }
#if 0
static void removeIconGrabs(WIcon * icon)
{
/* remove passive grabs on the icon */
XUngrabButton(dpy, Button1, AnyModifier, icon->core->window);
XUngrabButton(dpy, Button2, AnyModifier, icon->core->window);
XUngrabButton(dpy, Button3, AnyModifier, icon->core->window);
XSync(dpy, 0);
}
#endif
void wIconifyWindow(WWindow * wwin) void wIconifyWindow(WWindow * wwin)
{ {
XWindowAttributes attribs; XWindowAttributes attribs;
@@ -1562,13 +1533,8 @@ void wArrangeIcons(WScreen * scr, Bool arrangeAll)
vars = (struct HeadVars *)wmalloc(sizeof(struct HeadVars) * heads); vars = (struct HeadVars *)wmalloc(sizeof(struct HeadVars) * heads);
for (head = 0; head < heads; ++head) { for (head = 0; head < heads; ++head) {
#if 0
WMRect rect = wGetRectForHead(scr, head);
#else
WArea area = wGetUsableAreaForHead(scr, head, NULL, False); WArea area = wGetUsableAreaForHead(scr, head, NULL, False);
WMRect rect = wmkrect(area.x1, area.y1, area.x2 - area.x1, area.y2 - area.y1); WMRect rect = wmkrect(area.x1, area.y1, area.x2 - area.x1, area.y2 - area.y1);
#endif
vars[head].pi = vars[head].si = 0; vars[head].pi = vars[head].si = 0;
vars[head].sx1 = rect.pos.x; vars[head].sx1 = rect.pos.x;
vars[head].sy1 = rect.pos.y; vars[head].sy1 = rect.pos.y;
@@ -1576,16 +1542,6 @@ void wArrangeIcons(WScreen * scr, Bool arrangeAll)
vars[head].sh = rect.size.height; vars[head].sh = rect.size.height;
vars[head].sx2 = vars[head].sx1 + vars[head].sw; vars[head].sx2 = vars[head].sx1 + vars[head].sw;
vars[head].sy2 = vars[head].sy1 + vars[head].sh; vars[head].sy2 = vars[head].sy1 + vars[head].sh;
#if 0
if (scr->dock) {
if (scr->dock->on_right_side)
vars[head].sx2 -= isize + DOCK_EXTRA_SPACE;
else
vars[head].sx1 += isize + DOCK_EXTRA_SPACE;
}
#endif
vars[head].sw = isize * (vars[head].sw / isize); vars[head].sw = isize * (vars[head].sw / isize);
vars[head].sh = isize * (vars[head].sh / isize); vars[head].sh = isize * (vars[head].sh / isize);
vars[head].fullW = (vars[head].sx2 - vars[head].sx1) / isize; vars[head].fullW = (vars[head].sx2 - vars[head].sx1) / isize;