Skip to content
Snippets Groups Projects
Commit 37c79a65 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Count flushes to disable resize hack.

Instead of strictly using "first resize", also count flushes and
assume the hack isn't needed after five.  Experimentation on my
ChromeBook shows 3 to be sufficient, so I'm sing five for now.

Odds are that this will still mess with tiling WMs, but I don't use
one, so I don't mind yet.  I expect this will be better, but likely
still not great.
parent bd1c91e6
No related branches found
No related tags found
No related merge requests found
Pipeline #5910 passed
...@@ -2203,6 +2203,7 @@ void x11_event_thread(void *args) ...@@ -2203,6 +2203,7 @@ void x11_event_thread(void *args)
XEvent ev; XEvent ev;
static struct timeval tv; static struct timeval tv;
int mode = (int)(intptr_t)args; int mode = (int)(intptr_t)args;
int flush_count = 0;
SetThreadName("X11 Events"); SetThreadName("X11 Events");
if (mode == CIOLIB_MODE_X_FULLSCREEN) if (mode == CIOLIB_MODE_X_FULLSCREEN)
...@@ -2321,6 +2322,10 @@ void x11_event_thread(void *args) ...@@ -2321,6 +2322,10 @@ void x11_event_thread(void *args)
break; break;
case X11_LOCAL_FLUSH: case X11_LOCAL_FLUSH:
x11.XFlush(dpy); x11.XFlush(dpy);
if (!got_first_resize) {
if (++flush_count > 5)
got_first_resize = true;
}
break; break;
case X11_LOCAL_BEEP: case X11_LOCAL_BEEP:
x11.XBell(dpy, 100); x11.XBell(dpy, 100);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment