don't allow drawing images until KeyRelease event

This commit is contained in:
speedie 2023-05-11 19:53:23 +02:00
parent ee7419704d
commit 9032af968d
3 changed files with 5 additions and 14 deletions

View file

@ -314,9 +314,6 @@ issues!</p>
MD5() is deprecated as of OpenSSL 3.0, but this would also make it very
easy to have LibreSSL compatibility.</li>
<li>Image support: Ability to display icons, similar to rofi</li>
<li>Image support: Images take a long time to load sometimes,
particularly when items are selected using the cursor so what we really
need is a way to skip over images after a set time limit.</li>
<li>Text drawing: Use cairo for text drawing over Xft.</li>
<li>Lines: Rofi-like newlines in the same entry
<ul>

View file

@ -122,9 +122,6 @@ Pull requests would be greatly appreciated for any of these issues!
is deprecated as of OpenSSL 3.0, but this would also make it very easy to
have LibreSSL compatibility.
- Image support: Ability to display icons, similar to rofi
- Image support: Images take a long time to load sometimes, particularly when
items are selected using the cursor so what we really need is a way to
skip over images after a set time limit.
- Text drawing: Use cairo for text drawing over Xft.
- Lines: Rofi-like newlines in the same entry
- Just need to `XMoveResizeWindow()` as well as `mh += bh` and `y += bh`

View file

@ -1,8 +1,6 @@
void eventloop(void) {
XEvent ev;
#if USEIMAGE
int noimg = 0;
#endif
while (!XNextEvent(dpy, &ev)) {
if (XFilterEvent(&ev, None))
@ -16,9 +14,7 @@ void eventloop(void) {
exit(1);
case ButtonPress:
buttonpress(&ev);
#if USEIMAGE
noimg = 0;
#endif
break;
case MotionNotify: // currently does nothing
break;
@ -38,6 +34,7 @@ void eventloop(void) {
}
keypress(&ev);
noimg = 1;
break;
case SelectionNotify: // paste selection
if (ev.xselection.property == utf8)
@ -50,6 +47,7 @@ void eventloop(void) {
case KeyRelease:
getcapsstate();
drawmenu();
noimg = 0;
break;
}
@ -70,12 +68,11 @@ void eventloop(void) {
}
// redraw image on X11 event
if (!noimg)
#if USEIMAGE
if (!noimg) {
drawimage();
} else {
noimg = 0; // draw it next time
}
#else
;
#endif
}
}