Fix some bugs with clicks and images
This commit is contained in:
parent
ebd625ba1e
commit
62b15fab28
|
@ -281,6 +281,13 @@ void buttonpress_wl(uint32_t button, double ex, double ey) {
|
|||
|
||||
y += h;
|
||||
|
||||
#if USEIMAGE
|
||||
if (!hideimage && longestedge != 0) {
|
||||
x += MAX((imagegaps * 2) + imagewidth, indentitems ? promptw : 0);
|
||||
ex += MAX((imagegaps * 2) + imagewidth, indentitems ? promptw : 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
// ClickSelItem, called function doesn't matter
|
||||
if (ey >= y && ey <= (y + h) && ex + (powerlineitems ? plw : 0) >= x + (powerlineitems ? plw : 0) && ex + (powerlineitems ? plw : 0) <= (x + w / columns) + (powerlineitems ? plw : 0)) {
|
||||
for (i = 0; i < LENGTH(wl_buttons); i++) {
|
||||
|
|
|
@ -66,6 +66,13 @@ void buttonpress_x11(XEvent *e) {
|
|||
|
||||
y += h;
|
||||
|
||||
#if USEIMAGE
|
||||
if (!hideimage && longestedge != 0) {
|
||||
x += MAX((imagegaps * 2) + imagewidth, indentitems ? promptw : 0);
|
||||
ev->x += MAX((imagegaps * 2) + imagewidth, indentitems ? promptw : 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
// ClickSelItem, called function doesn't matter
|
||||
if (ev->y >= y && ev->y <= (y + h) && ev->x + (powerlineitems ? plw : 0) >= x + (powerlineitems ? plw : 0) && ev->x + (powerlineitems ? plw : 0) <= (x + w / columns) + (powerlineitems ? plw : 0)) {
|
||||
for (i = 0; i < LENGTH(buttons); i++) {
|
||||
|
|
2
spmenu.1
2
spmenu.1
|
@ -1,5 +1,5 @@
|
|||
'\" t
|
||||
.\" Automatically generated by Pandoc 3.1.1
|
||||
.\" Automatically generated by Pandoc 3.1.2
|
||||
.\"
|
||||
.\" Define V font for inline verbatim, using C font in formats
|
||||
.\" that render this, and otherwise B font.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" Automatically generated by Pandoc 3.1.1
|
||||
.\" Automatically generated by Pandoc 3.1.2
|
||||
.\"
|
||||
.\" Define V font for inline verbatim, using C font in formats
|
||||
.\" that render this, and otherwise B font.
|
||||
|
|
Loading…
Reference in a new issue