// switches parent focus to c. will switch it accordingly // TODO: Everything needs a handle, so we can set front/back position properly static void update_focus(swayc_t *c) { // Handle if focus switches swayc_t *parent = c->parent; if (parent->focused != c) { // Get previous focus swayc_t *prev = parent->focused; // Set new focus parent->focused = c; switch (c->type) { // Shouldnt happen case C_ROOT: return; // Case where output changes case C_OUTPUT: wlc_output_focus(c->handle); break; // Case where workspace changes case C_WORKSPACE: if (prev) { // update visibility of old workspace update_visibility(prev); destroy_workspace(prev); } // Update visibility of newly focused workspace update_visibility(c); break; default: case C_VIEW: case C_CONTAINER: // TODO whatever to do when container changes // for example, stacked and tabbing change stuff. break; } } }
void closeup () { unsigned int thread; for(thread = 0; thread<3;thread++) { top[thread].running = FALSE; top[thread].susp = TRUE; //Sleep (96); ringb_float_free (top[thread].jack.auxr.i.l); ringb_float_free (top[thread].jack.auxr.i.r); ringb_float_free (top[thread].jack.auxr.o.l); ringb_float_free (top[thread].jack.auxr.o.r); ringb_float_free (top[thread].jack.ring.o.r); ringb_float_free (top[thread].jack.ring.o.l); ringb_float_free (top[thread].jack.ring.i.r); ringb_float_free (top[thread].jack.ring.i.l); destroy_workspace (thread); } //Sleep(100); //fprintf(stderr,"Done with destructor\n"),fflush(stderr); }