forked from speedie/spmenu
Add ClickImage click
This commit is contained in:
parent
247d5e768b
commit
7bb81a26b8
|
@ -685,6 +685,9 @@ static ClickType ctp[] = {
|
||||||
{ "ClickNumber", ClickNumber },
|
{ "ClickNumber", ClickNumber },
|
||||||
{ "ClickCaps", ClickCaps },
|
{ "ClickCaps", ClickCaps },
|
||||||
{ "ClickMode", ClickMode },
|
{ "ClickMode", ClickMode },
|
||||||
|
#if USEIMAGE
|
||||||
|
{ "ClickImage", ClickImage },
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static void conf_init(void);
|
static void conf_init(void);
|
||||||
|
|
|
@ -318,6 +318,10 @@ void buttonpress_wl(uint32_t button, double ex, double ey) {
|
||||||
click = ClickItem;
|
click = ClickItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if USEIMAGE
|
||||||
|
} else if (ey >= y && ey <= (y + h) && ex >= x + (powerlineitems ? sp.plw : 0) - MAX((imagegaps * 2) + img.imagewidth, indentitems ? sp.promptw : 0) && ex <= (x - MAX((imagegaps * 2) + img.imagewidth, indentitems ? sp.promptw : 0) + w / columns) + (powerlineitems ? sp.plw : 0)) {
|
||||||
|
click = ClickImage;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (matches) { // a single line, meaning it could be arrows too, so we check that here
|
} else if (matches) { // a single line, meaning it could be arrows too, so we check that here
|
||||||
|
|
|
@ -102,6 +102,10 @@ void buttonpress_x11(XEvent *e) {
|
||||||
click = ClickItem;
|
click = ClickItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if USEIMAGE
|
||||||
|
} else if (ev->y >= y && ev->y <= (y + h) && ev->x >= x + (powerlineitems ? sp.plw : 0) - MAX((img.imagegaps * 2) + img.imagewidth, indentitems ? sp.promptw : 0) && ev->x <= (x - MAX((img.imagegaps * 2) + img.imagewidth, indentitems ? sp.promptw : 0) + w / columns) + (powerlineitems ? sp.plw : 0)) {
|
||||||
|
click = ClickImage;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (matches) { // a single line, meaning it could be arrows too, so we check that here
|
} else if (matches) { // a single line, meaning it could be arrows too, so we check that here
|
||||||
|
|
Loading…
Reference in a new issue