[add support for synchronous resizing via the window manager
John Meacham <john@repetae.net>**20050731115505] {
hunk ./Makefile.am 7
-seven_LDADD=  @X_LIBS@ @X_EXTRA_LIBS@ @Xft_LIBS@ -lX11 -lutil 
+seven_LDADD=  @X_LIBS@ @X_EXTRA_LIBS@ @Xft_LIBS@ -lX11 -lutil -lXext
hunk ./seven.c 210
+        ioctl(pty->fd, TIOCSWINSZ, &pty->winsize);
+        do_redraw();
+        if (!XSyncValueIsZero(win.syncValue)) {
+                XSyncSetCounter(conn->dpy, win.syncCounter,win.syncValue);
+                XSyncIntToValue(&win.syncValue,0);
+        }
+
hunk ./seven.c 315
-                                XSendEvent(conn->dpy, DefaultRootWindow(conn->dpy), False,SubstructureRedirectMask | SubstructureNotifyMask, &ev); 
+                                XSendEvent(conn->dpy, DefaultRootWindow(conn->dpy), False,SubstructureRedirectMask | SubstructureNotifyMask, &ev);
+                        } else if((Atom)ev.xclient.data.l[0]==XA__NET_WM_SYNC_REQUEST) {
+                                printf("_NET_WM_SYNC_REQUEST: %4.4lx%4.4lx\n", (unsigned long)ev.xclient.data.l[3],(unsigned long)ev.xclient.data.l[2]);
+                                XSyncIntsToValue((&win.syncValue), ev.xclient.data.l[2], ev.xclient.data.l[3]);
hunk ./x11.c 9
+#include <X11/Xlib.h>
+#include <X11/extensions/sync.h>
hunk ./x11.c 261
-        Atom protocols[] = { XA_WM_DELETE_WINDOW, XA__NET_WM_PING };
+        Atom protocols[] = { XA_WM_DELETE_WINDOW, XA__NET_WM_PING, XA__NET_WM_SYNC_REQUEST };
hunk ./x11.c 263
+
+        XSyncValue v;
+        XSyncIntToValue(&v, 42);
+        win.syncCounter  = XSyncCreateCounter(conn->dpy, v);
+        XSyncIntToValue(&win.syncValue,0);
+        XChangeProperty(conn->dpy, win.w, XA__NET_WM_SYNC_REQUEST_COUNTER, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&win.syncCounter, 1);
+
+
+
hunk ./x11.h 4
-/* arch-tag: 7af43533-ce5d-4431-9871-f27aa778ec10 */
-
hunk ./x11.h 6
+#include <X11/extensions/sync.h>
hunk ./x11.h 47
+        XSyncCounter syncCounter;
+        XSyncValue syncValue;
hunk ./xatoms.atoms 5
+_NET_WM_SYNC_REQUEST_COUNTER
}
