aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorokan2012-07-13 15:21:35 +0000
committerokan2012-07-13 15:21:35 +0000
commita4c958a3f89733566a15f47d5ddc0167fe5e85d4 (patch)
treec389a5df0d1eac207d889d53e01760717fb24f45 /client.c
parent5e6e2b31dc906e221316757e7b05b680209148b1 (diff)
downloadcwm-a4c958a3f89733566a15f47d5ddc0167fe5e85d4.tar.gz
convert xmax/ymax uses to view geometry.
Diffstat (limited to 'client.c')
-rw-r--r--client.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/client.c b/client.c
index 1aa46fe..fbc1ee4 100644
--- a/client.c
+++ b/client.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: client.c,v 1.96 2012/07/04 18:00:13 okan Exp $
+ * $OpenBSD: client.c,v 1.97 2012/07/13 15:21:35 okan Exp $
*/
#include <sys/param.h>
@@ -256,7 +256,7 @@ void
client_maximize(struct client_ctx *cc)
{
struct screen_ctx *sc = cc->sc;
- int xmax = sc->xmax, ymax = sc->ymax;
+ int xmax = sc->view.w, ymax = sc->view.h;
int x_org = 0, y_org = 0;
if (cc->flags & CLIENT_FREEZE)
@@ -312,7 +312,7 @@ void
client_vertmaximize(struct client_ctx *cc)
{
struct screen_ctx *sc = cc->sc;
- int y_org = 0, ymax = sc->ymax;
+ int y_org = 0, ymax = sc->view.h;
if (cc->flags & CLIENT_FREEZE)
return;
@@ -360,7 +360,7 @@ void
client_horizmaximize(struct client_ctx *cc)
{
struct screen_ctx *sc = cc->sc;
- int x_org = 0, xmax = sc->xmax;
+ int x_org = 0, xmax = sc->view.w;
if (cc->flags & CLIENT_FREEZE)
return;
@@ -670,8 +670,8 @@ client_placecalc(struct client_ctx *cc)
* XRandR bits mean that {x,y}max shouldn't be outside what's
* currently there.
*/
- xslack = sc->xmax - cc->geom.width - cc->bwidth * 2;
- yslack = sc->ymax - cc->geom.height - cc->bwidth * 2;
+ xslack = sc->view.w - cc->geom.width - cc->bwidth * 2;
+ yslack = sc->view.h - cc->geom.height - cc->bwidth * 2;
if (cc->size->x > 0)
cc->geom.x = MIN(cc->size->x, xslack);
if (cc->size->y > 0)
@@ -693,8 +693,8 @@ client_placecalc(struct client_ctx *cc)
} else {
noxine:
xorig = yorig = 0;
- xmax = sc->xmax;
- ymax = sc->ymax;
+ xmax = sc->view.w;
+ ymax = sc->view.h;
}
xmouse = MAX(xmouse, xorig) - cc->geom.width / 2;
ymouse = MAX(ymouse, yorig) - cc->geom.height / 2;