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.
This commit is contained in:
okan
2015-11-09 20:03:29 +00:00
parent 5fcf251672
commit d7bd299819
6 changed files with 84 additions and 77 deletions

View File

@ -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 *);