diff options
author | okan <okan> | 2013-12-13 22:39:13 +0000 |
---|---|---|
committer | okan <okan> | 2013-12-13 22:39:13 +0000 |
commit | 75b69c0b04001523eb3ad64cbb1d9f1843b41c67 (patch) | |
tree | 00e3b3b5ae0b3d55a901a3bb47d8bd2b6e8254ec /screen.c | |
parent | ddb67559f63d6187921a0796f43d4c8cae6707a9 (diff) | |
parent | f98f4615c0bf2fbf3f6229ccb9cb46284f3dd18a (diff) | |
download | cwm-75b69c0b04001523eb3ad64cbb1d9f1843b41c67.tar.gz cwm-75b69c0b04001523eb3ad64cbb1d9f1843b41c67.tar.xz cwm-75b69c0b04001523eb3ad64cbb1d9f1843b41c67.zip |
cvsimport
Diffstat (limited to 'screen.c')
-rw-r--r-- | screen.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/screen.c b/screen.c index e006374..0e2c0a1 100644 --- a/screen.c +++ b/screen.c @@ -126,7 +126,7 @@ screen_updatestackingorder(struct screen_ctx *sc) * Find which xinerama screen the coordinates (x,y) is on. */ struct geom -screen_find_xinerama(struct screen_ctx *sc, int x, int y) +screen_find_xinerama(struct screen_ctx *sc, int x, int y, int flags) { XineramaScreenInfo *info; struct geom geom; @@ -141,13 +141,19 @@ screen_find_xinerama(struct screen_ctx *sc, int x, int y) info = &sc->xinerama[i]; if (x >= info->x_org && x < info->x_org + info->width && y >= info->y_org && y < info->y_org + info->height) { - geom.x = info->x_org + sc->gap.left; - geom.y = info->y_org + sc->gap.top; - geom.w = info->width - (sc->gap.left + sc->gap.right); - geom.h = info->height - (sc->gap.top + sc->gap.bottom); + geom.x = info->x_org; + geom.y = info->y_org; + geom.w = info->width; + geom.h = info->height; break; } } + if (flags & CWM_GAP) { + geom.x += sc->gap.left; + geom.y += sc->gap.top; + geom.w -= (sc->gap.left + sc->gap.right); + geom.h -= (sc->gap.top + sc->gap.bottom); + } return (geom); } |