chamesle

chamesle.org: the site of Chamesle, a small Linux distribution
git clone https://github.com/tortr-rs/chamesle
Log | Files | Refs | README

commit 8e8d4bb2d1584286ec87061696dd1340e8e5617f
parent 8f13d1fca1237d47b95143b3abafb1e8cec565a3
Author: torter <koubbamohamedrayan@gmail.com>
Date:   Mon, 26 Oct 2026 18:08:34 -0400

ttywm 0.6-r6: windows don't jump around while dragged. the drag took our own NoExpose events for mouse moves

Diffstat:
Mtools/pkg/ttywm/files/ttywm.c | 11++++++++---
Mtools/pkg/ttywm/recipe | 2+-
2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/tools/pkg/ttywm/files/ttywm.c b/tools/pkg/ttywm/files/ttywm.c @@ -1788,9 +1788,12 @@ mousedrag(Client *c, int resizing) XQueryPointer(dpy, root, &dummy, &dummy, &px, &py, &di, &di, &dui); do { XMaskEvent(dpy, ButtonReleaseMask|PointerMotionMask|ExposureMask|SubstructureRedirectMask, &ev); - /* what it uncovers gets drawn again while it moves, not when it's let go */ - if (ev.type == Expose || ev.type == ConfigureRequest || ev.type == MapRequest) { - handler[ev.type](&ev); + /* what it uncovers gets drawn again while it moves, not when it's let go. + * anything that isn't the mouse has no place to move to: NoExpose from our own drawing would + * otherwise send the window off to wherever its garbage x and y point */ + if (ev.type != MotionNotify && ev.type != ButtonRelease) { + if (ev.type == Expose || ev.type == ConfigureRequest || ev.type == MapRequest) + handler[ev.type](&ev); continue; } /* only the newest position, no more than 60 times a second, and always where it was let go */ @@ -2391,6 +2394,8 @@ setup(void) XMapWindow(dpy, bar); setbackground(); + /* copying frames onto the screen needn't tell us when there was nothing to copy */ + XSetGraphicsExposures(dpy, DefaultGC(dpy, screen), False); XDefineCursor(dpy, root, XCreateFontCursor(dpy, XC_left_ptr)); XSelectInput(dpy, root, SubstructureRedirectMask|SubstructureNotifyMask); grabkeys(); diff --git a/tools/pkg/ttywm/recipe b/tools/pkg/ttywm/recipe @@ -1,6 +1,6 @@ name=ttywm version=0.6 -rel=5 +rel=6 desc="Floating window manager that looks like a tty" url=https://chamesle.org license="MIT AND GPL-2.0-only"