static void saveprimary(void) { int len; if(!selection_src) { len = edit_active() ? edit_selection(selection_p, primary.data, sizeof(primary.data)) : 0; } else if(selection_src == 1) { len = messages_selection(selection_p, primary.data, sizeof(primary.data)); } else { memcpy(primary.data, self.id, sizeof(self.id)); len = sizeof(self.id); } if(len) { primary.len = len; } }
void panel_mdown(PANEL *p) { _Bool draw = edit_active(); PANEL **pp = p->child, *subp; if(pp) { while((subp = *pp++)) { if(!subp->disabled) { if(panel_mdown_sub(subp)) { draw = 1; break; } } } } if(draw) { redraw(); } }
void panel_mdown(PANEL *p) { if (contextmenu_mdown() || tooltip_mdown()) { redraw(); return; } bool draw = edit_active(); PANEL **pp = p->child; if (pp) { PANEL *subp; while ((subp = *pp++)) { if (!subp->disabled) { draw |= panel_mdown_sub(subp); } } } if (draw) { redraw(); } }