i3bar: Correctly handle removal of tray clients

This commit is contained in:
Michael Stapelberg
2011-08-15 15:57:52 +02:00
parent 6efa7a754d
commit 2046e4112f
5 changed files with 84 additions and 8 deletions

View File

@ -29,6 +29,7 @@ struct rect_t {
#include "outputs.h"
#include "util.h"
#include "workspaces.h"
#include "trayclients.h"
#include "xcb.h"
#include "ucs2_to_utf8.h"
#include "config.h"

View File

@ -46,9 +46,8 @@ struct i3_output {
xcb_pixmap_t buffer; /* An extra pixmap for double-buffering */
xcb_gcontext_t bargc; /* The graphical context of the bar */
int traypx; /* Amount of pixels reserved for tray icons */
struct ws_head *workspaces; /* The workspaces on this output */
struct tc_head *trayclients; /* The tray clients on this output */
SLIST_ENTRY(i3_output) slist; /* Pointer for the SLIST-Macro */
};

View File

@ -0,0 +1,24 @@
/*
* i3bar - an xcb-based status- and ws-bar for i3
*
* © 2010-2011 Axel Wagner and contributors
*
* See file LICNSE for license information
*
*/
#ifndef TRAYCLIENT_H_
#define TRAYCLIENT_H_
#include "common.h"
typedef struct trayclient trayclient;
TAILQ_HEAD(tc_head, trayclient);
struct trayclient {
xcb_window_t win; /* The window ID of the tray client */
TAILQ_ENTRY(trayclient) tailq; /* Pointer for the TAILQ-Macro */
};
#endif