X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fresist.c;h=49875fbb7ca02153b7f2d9c8dfbb75af20e298d3;hb=6c538915c86b0330bd78e8d8f3e77d78cf0c5680;hp=e4596840f79ed7b93338d1c6c75a53acccf9160c;hpb=7a6a516b8e3d8ad6b15379eabf6652a6f43eab27;p=chaz%2Fopenbox diff --git a/openbox/resist.c b/openbox/resist.c index e4596840..49875fbb 100644 --- a/openbox/resist.c +++ b/openbox/resist.c @@ -36,7 +36,7 @@ void resist_move_windows(ObClient *c, gint resist, gint *x, gint *y) if (!resist) return; - frame_client_gravity(c->frame, x, y, c->area.width, c->area.height); + frame_client_gravity(c->frame, x, y); w = c->frame->area.width; h = c->frame->area.height; @@ -61,6 +61,8 @@ void resist_move_windows(ObClient *c, gint resist, gint *x, gint *y) /* don't snap to self or non-visibles */ if (!target->frame->visible || target == c) continue; + /* don't snap to windows set to below and skip_taskbar (desklets) */ + if (target->below && !c->below && target->skip_taskbar) continue; tl = RECT_LEFT(target->frame->area) - 1; tt = RECT_TOP(target->frame->area) - 1; @@ -111,7 +113,7 @@ void resist_move_windows(ObClient *c, gint resist, gint *x, gint *y) if (snapx && snapy) break; } - frame_frame_gravity(c->frame, x, y, c->area.width, c->area.height); + frame_frame_gravity(c->frame, x, y); } void resist_move_monitors(ObClient *c, gint resist, gint *x, gint *y) @@ -127,7 +129,7 @@ void resist_move_monitors(ObClient *c, gint resist, gint *x, gint *y) if (!resist) return; - frame_client_gravity(c->frame, x, y, c->area.width, c->area.height); + frame_client_gravity(c->frame, x, y); w = c->frame->area.width; h = c->frame->area.height; @@ -152,7 +154,8 @@ void resist_move_monitors(ObClient *c, gint resist, gint *x, gint *y) continue; } - area = screen_area_monitor(c->desktop, i, &desired_area); + area = screen_area(c->desktop, SCREEN_AREA_ALL_MONITORS, + &desired_area); al = RECT_LEFT(*area); at = RECT_TOP(*area); @@ -185,7 +188,7 @@ void resist_move_monitors(ObClient *c, gint resist, gint *x, gint *y) g_free(parea); } - frame_frame_gravity(c->frame, x, y, c->area.width, c->area.height); + frame_frame_gravity(c->frame, x, y); } void resist_size_windows(ObClient *c, gint resist, gint *w, gint *h, @@ -216,6 +219,8 @@ void resist_size_windows(ObClient *c, gint resist, gint *w, gint *h, /* don't snap to invisibles or ourself */ if (!target->frame->visible || target == c) continue; + /* don't snap to windows set to below and skip_taskbar (desklets) */ + if (target->below && !c->below && target->skip_taskbar) continue; tl = RECT_LEFT(target->frame->area); tr = RECT_RIGHT(target->frame->area); @@ -307,7 +312,8 @@ void resist_size_monitors(ObClient *c, gint resist, gint *w, gint *h, continue; } - area = screen_area_monitor(c->desktop, i, &desired_area); + area = screen_area(c->desktop, SCREEN_AREA_ALL_MONITORS, + &desired_area); /* get the screen boundaries */ al = RECT_LEFT(*area);