要らない
This commit is contained in:
20
control.c
20
control.c
@@ -275,16 +275,6 @@ void handle_button_press(SuwaWindow *window, CtrlLabels *labels, int mx, int my)
|
|||||||
if (!btn) return;
|
if (!btn) return;
|
||||||
|
|
||||||
btn->pressed = 1;
|
btn->pressed = 1;
|
||||||
XftDraw *backdraw = XftDrawCreate(window->display, window->backbuf,
|
|
||||||
DefaultVisual(window->display, DefaultScreen(window->display)),
|
|
||||||
DefaultColormap(window->display, DefaultScreen(window->display)));
|
|
||||||
if (!backdraw) {
|
|
||||||
fprintf(stderr, "Pixmap向けXftDrawの作成に失敗。\n");
|
|
||||||
XFreePixmap(window->display, window->backbuf);
|
|
||||||
window->backbuf = None;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
window->event = (XEvent){.type = Expose};
|
window->event = (XEvent){.type = Expose};
|
||||||
control_expose(window, labels, btn);
|
control_expose(window, labels, btn);
|
||||||
}
|
}
|
||||||
@@ -294,16 +284,6 @@ void handle_button_release(SuwaWindow *window, CtrlLabels *labels, int mx, int m
|
|||||||
if (!btn) return;
|
if (!btn) return;
|
||||||
|
|
||||||
btn->pressed = 0;
|
btn->pressed = 0;
|
||||||
XftDraw *backdraw = XftDrawCreate(window->display, window->backbuf,
|
|
||||||
DefaultVisual(window->display, DefaultScreen(window->display)),
|
|
||||||
DefaultColormap(window->display, DefaultScreen(window->display)));
|
|
||||||
if (!backdraw) {
|
|
||||||
fprintf(stderr, "Pixmap向けXftDrawの作成に失敗。\n");
|
|
||||||
XFreePixmap(window->display, window->backbuf);
|
|
||||||
window->backbuf = None;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *label = btn->text;
|
const char *label = btn->text;
|
||||||
if (strcmp(label, "C") == 0) {
|
if (strcmp(label, "C") == 0) {
|
||||||
clear_calculator(labels);
|
clear_calculator(labels);
|
||||||
|
|||||||
Reference in New Issue
Block a user