From cce06135af44660039026ea785a5ffdbfc277ea9 Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 9 Nov 2015 20:03:29 +0000 Subject: Extend region to include both view and work areas; switch to region_find() which no longer needs to recalculate gap each time a client (or menu) is created or altered. If no RandR, fall back to display dimensions while building regions instead of during execution. --- calmwm.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'calmwm.h') diff --git a/calmwm.h b/calmwm.h index 9147c65..f50b005 100644 --- a/calmwm.h +++ b/calmwm.h @@ -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: calmwm.h,v 1.305 2015/09/16 17:58:25 okan Exp $ + * $OpenBSD: calmwm.h,v 1.306 2015/11/09 20:03:29 okan Exp $ */ #ifndef _CALMWM_H_ @@ -80,9 +80,6 @@ #define CWM_TILE_HORIZ 0x0001 #define CWM_TILE_VERT 0x0002 -#define CWM_GAP 0x0001 -#define CWM_NOGAP 0x0002 - #define CWM_WIN 0x0001 #define CWM_CMD 0x0002 @@ -224,7 +221,8 @@ TAILQ_HEAD(autogroupwin_q, autogroupwin); struct region_ctx { TAILQ_ENTRY(region_ctx) entry; int num; - struct geom area; + struct geom view; /* viewable area */ + struct geom work; /* workable area, gap-applied */ }; TAILQ_HEAD(region_ctx_q, region_ctx); @@ -459,7 +457,7 @@ void search_print_group(struct menu *, int); struct geom screen_apply_gap(struct screen_ctx *, struct geom); struct screen_ctx *screen_find(Window); -struct geom screen_area(struct screen_ctx *, int, int, int); +struct region_ctx *region_find(struct screen_ctx *, int, int); void screen_init(int); void screen_update_geometry(struct screen_ctx *); void screen_updatestackingorder(struct screen_ctx *); -- cgit v1.2.3-2-gb3c3