diff --git a/client.c b/client.c index 209d118c0..c037f3e1a 100644 --- a/client.c +++ b/client.c @@ -125,9 +125,6 @@ client_isvisible_anyscreen(client_t *c) if(!c) return false; - if(globalconf.scratch.client == c) - return globalconf.scratch.isvisible; - for(screen = 0; screen < globalconf.screens_info->nscreen; screen++) for(tag = globalconf.screens[screen].tags; tag; tag = tag->next) if(tag->selected && is_client_tagged(c, tag)) @@ -150,9 +147,6 @@ client_isvisible(client_t *c, int screen) if(!c || c->screen != screen) return false; - if(globalconf.scratch.client == c) - return globalconf.scratch.isvisible; - for(tag = globalconf.screens[screen].tags; tag; tag = tag->next) if(tag->selected && is_client_tagged(c, tag)) return true; @@ -676,8 +670,6 @@ client_unmanage(client_t *c) /* remove client everywhere */ client_list_detach(&globalconf.clients, c); focus_delete_client(c); - if(globalconf.scratch.client == c) - globalconf.scratch.client = NULL; for(tag = globalconf.screens[c->screen].tags; tag; tag = tag->next) untag_client(c, tag); diff --git a/focus.c b/focus.c index f9f34b3d5..42ff7dedc 100644 --- a/focus.c +++ b/focus.c @@ -74,9 +74,7 @@ focus_get_latest_client_for_tags(tag_t **t, int nindex) int i = 0; for(node = globalconf.focus; node; node = node->next) - if(node->client && ((!node->client->skip - && node->client != globalconf.scratch.client) - || globalconf.scratch.isvisible)) + if(node->client && !node->client->skip) for(tags = t; *tags; tags++) if(is_client_tagged(node->client, *tags)) { diff --git a/structs.h b/structs.h index 223e3ea51..b7ac2bd26 100644 --- a/structs.h +++ b/structs.h @@ -33,7 +33,7 @@ #include "common/xscreen.h" #include "common/refcount.h" -/** stacking layout */ +/** Stacking layout layers */ typedef enum { LAYER_DESKTOP, @@ -48,16 +48,24 @@ typedef enum enum { CurNormal, CurResize, CurMove, CurLast }; +/** Titlebar template structure */ typedef struct { /** Ref count */ int refcount; + /** Position */ position_t position; + /** Alignment on window */ alignment_t align; + /** Width and height */ int width, height; + /** Various text used for rendering */ char *text_normal, *text_focus, *text_urgent; } titlebar_t; +/** Delete a titlebar structure. + * \param t The titlebar to destroy. + */ static inline void titlebar_delete(titlebar_t **t) { @@ -151,6 +159,9 @@ struct widget_node_t widget_node_t *prev, *next; }; +/** Delete a widget structure. + * \param widget The widget to destroy. + */ static inline void widget_delete(widget_t **widget) { @@ -162,6 +173,9 @@ widget_delete(widget_t **widget) DO_RCNT(widget_t, widget, widget_delete) +/** Delete a widget node structure. + * \param node The node to destroy. + */ static inline void widget_node_delete(widget_node_t **node) { @@ -259,6 +273,7 @@ struct client_t typedef struct client_node_t client_node_t; struct client_node_t { + /** The client */ client_t *client; /** Next and previous client_nodes */ client_node_t *prev, *next; @@ -288,7 +303,7 @@ struct _tag_t tag_t *prev, *next; }; -/** tag_client_node type */ +/** Tag client link type */ typedef struct tag_client_node_t tag_client_node_t; struct tag_client_node_t { @@ -312,6 +327,7 @@ typedef struct } Padding; typedef area_t (FloatingPlacement)(client_t *); + typedef struct { /** true if we need to arrange() */ @@ -363,12 +379,6 @@ struct AwesomeConf xcb_cursor_t cursor[CurLast]; /** client_ts list */ client_t *clients; - /** Scratch client */ - struct - { - client_t *client; - bool isvisible; - } scratch; /** Path to config file */ char *configpath; /** Floating window placement algo */ diff --git a/widgets/taglist.c b/widgets/taglist.c index 786627d9d..3c30bb1e8 100644 --- a/widgets/taglist.c +++ b/widgets/taglist.c @@ -83,7 +83,7 @@ tag_isoccupied(tag_t *t) client_t *c; for(c = globalconf.clients; c; c = c->next) - if(is_client_tagged(c, t) && !c->skip && c != globalconf.scratch.client) + if(is_client_tagged(c, t) && !c->skip) return true; return false; diff --git a/widgets/tasklist.c b/widgets/tasklist.c index 75aff8089..0cd44dda0 100644 --- a/widgets/tasklist.c +++ b/widgets/tasklist.c @@ -160,15 +160,7 @@ tasklist_draw(widget_node_t *w, statusbar_t *statusbar, int offset, int used) p_delete(&text); - if(c == globalconf.scratch.client) - { - area.x = w->area.x + icon_width + box_width * i; - area.y = w->area.y; - area.width = (globalconf.font->height + 2) / 3; - area.height = (globalconf.font->height + 2) / 3; - draw_rectangle(statusbar->ctx, area, 1.0, c->isfloating, statusbar->colors.fg); - } - else if(c->isfloating || c->ismax) + if(c->isfloating || c->ismax) draw_circle(statusbar->ctx, w->area.x + icon_width + box_width * i, w->area.y, (globalconf.font->height + 2) / 4,