commit 7371d39
uint
·
2026-06-13 12:40:32 +0000 UTC
parent 2c59a66
No flashing when resizing, fix bug: resize window even even if width OR height == 0
1 files changed,
+3,
-1
+3,
-1
1@@ -480,6 +480,8 @@ bool maus_create_window(Maus* mw)
2 ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask |
3 ButtonReleaseMask | PointerMotionMask | StructureNotifyMask
4 );
5+ /* no black flashing when resizing */
6+ XSetWindowBackgroundPixmap(dpy, *win, None);
7
8 /* atoms */
9 be->atoms[MAUS_ATOM_WM_DELETE_WINDOW] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
10@@ -603,7 +605,7 @@ bool maus_resize(Maus* mw, uint32_t width, uint32_t height)
11 {
12 MausBackend* be = &mw->backend;
13 if (width == 0 || height == 0 ||
14- mw->width == width || mw->height == height)
15+ (mw->width == width && mw->height == height))
16 return false;
17
18 fb_destroy(mw);