static void screen_workspace_callback (WnckWindow *window, WnckWorkspace *space, gpointer data) { queue_update (WNCK_ACTION_MENU (data)); }
static void actions_changed_callback (WnckWindow *window, WnckWindowActions changed_mask, WnckWindowActions new_actions, gpointer data) { queue_update (WNCK_ACTION_MENU (data)); }
static void state_changed_callback (WnckWindow *window, WnckWindowState changed_mask, WnckWindowState new_state, gpointer data) { queue_update (WNCK_ACTION_MENU (data)); }
/* * Add a new element by inserting it into the front of the hash list * and the decay queue. Recalculate the oldest element to get free space * if necessary. */ static void queue_add(void * data, const isc_netaddr_t * netaddr, uint16_t points, isc_stdtime_t now) { queue_t * d = data; uint16_t n, h = queue_makehash(data,netaddr); INSIST(data != NULL); INSIST(h < d->length); if(QUEUE_AVAIL(d) == 0) { /* full */ dns_dampening_entry_t * e; /* Check against least used element */ INSIST(QUEUE_REAR(d) != 0); e = &(d->field[QUEUE_REAR(d)].entry); update_penalty(d->conf, e, 0, now); if(e->penalty > points) { queue_update(d, &e, 0, now); return; } else queue_delete(d, QUEUE_REAR(d)); } INSIST(QUEUE_AVAIL(d) != 0); /* Allocate n */ n = QUEUE_AVAIL(d); QUEUE_AVAIL(d) = d->field[n].list_next; /* Link to hash */ d->field[n].list_next = d->hash[h]; d->hash[h] = n; /* Place in front */ d->field[n].queue_prev = d->field[QUEUE_FRONT(d)].queue_prev; d->field[QUEUE_FRONT(d)].queue_prev = n; d->field[n].queue_next = QUEUE_FRONT(d); QUEUE_FRONT(d) = n; /* Setup */ memset(&d->field[n].entry, 0, sizeof(d->field[n].entry)); memcpy(&d->field[n].entry.netaddr, netaddr, sizeof(d->field[n].entry.netaddr)); d->field[n].entry.penalty = points; d->field[n].entry.last_updated = now; }
static void viewports_changed_callback (WnckWindow *window, gpointer data) { queue_update (WNCK_ACTION_MENU (data)); }
static void workspace_changed_callback (WnckWindow *window, gpointer data) { queue_update (WNCK_ACTION_MENU (data)); }