示例#1
0
文件: event.c 项目: burlito/uTox
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;
    }
}
示例#2
0
文件: ui.c 项目: notadecent/uTox
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();
    }
}
示例#3
0
文件: ui.c 项目: Matsu616/uTox
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();
    }
}