clean up and simplify
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQT/foVVmI9pK13hPWFohAcXSWbK8wUCZvoTygAKCRBohAcXSWbK 8+ihAQCNS0XmyWsB7otTHHAu+Wn2PpFmk1+9awDytXk97o+fXwEAlscHlq0BrEc3 f03Q5jDQ9ixHFtyDeJCgbNrBd4/0oQQ= =IFdf -----END PGP SIGNATURE-----
M
event.c
→
event.c
@@ -563,14 +563,12 @@ void enter(XCrossingEvent* e) {
Client* c; curtime = e->time; - if (!ffm) - if (e->mode != NotifyGrab || e->detail != NotifyNonlinearVirtual) - return; + if (e->mode != NotifyGrab || e->detail != NotifyNonlinearVirtual) + return; c = getclient(e->window, 0); if (c != 0 && c != current) { /* someone grabbed the pointer; make them current */ - if (!ffm) - XMapRaised(dpy, c->parent); + XMapRaised(dpy, c->parent); top(c); active(c); }
M
key.c
→
key.c
@@ -95,10 +95,6 @@ #endif
#ifdef PREVVIRT_KEY int leftcode = XKeysymToKeycode(dpy, PREVVIRT_KEY); #endif -#ifdef DEVEL - int tcode = XKeysymToKeycode(dpy, STICKYTOFRONT_KEY); - int bcode = XKeysymToKeycode(dpy, STICKYTOBACK_KEY); -#endif for (i = 0; i < num_screens; i++) { XGrabKey(@@ -561,12 +557,6 @@ 0,
GrabModeSync, GrabModeAsync); #endif - /* XGrabKey(dpy, pgupcode, Mod1Mask, screens[i].root, 0, GrabModeSync, - * GrabModeAsync); */ - /* XGrabKey(dpy, pgdowncode, Mod1Mask, screens[i].root, 0, GrabModeSync, - * GrabModeAsync); */ - /* XGrabKey(dpy, altcode, 0, screens[i].root, 0, GrabModeSync, - * GrabModeAsync); */ } }@@ -894,10 +884,7 @@ else if (e->keycode == slcode && (e->state & SHORTCUTMOD) == (MODBITS)) {
kbLaunch = 1; if (fork() == 0) { if (fork() == 0) { - // this code doesn't seem necessary - // close(ConnectionNumber(dpy)); - // if (dpy != '\0') - // putenv(dpy); + close(ConnectionNumber(dpy)); signal(SIGINT, SIG_DFL); signal(SIGTERM, SIG_DFL); signal(SIGHUP, SIG_DFL);@@ -1001,20 +988,3 @@ }
shuffleonmonitor(monitor); } } - -#ifdef DEVEL -void stickystack(int toTop) { - Client* c; - if (toTop) { - for (c = clients; c->next; c = c->next) { - if (c && isautostick(c)) - top(c); - } - } else { - for (c = clients; c->next; c = c->next) { - if (c && !isautostick(c)) - top(c); - } - } -} -#endif
M
main.c
→
main.c
@@ -22,7 +22,7 @@ #include "fns.h"
#include "patchlevel.h" char* version[] = { - "ryudo version 1.5.0\nCopyright (c) 1994-1996 David Hogan,\n(c) 2004 Russ " + "ryudo version 1.6.0\nCopyright (c) 1994-1996 David Hogan,\n(c) 2004 Russ " "Cox,\n(c) 2019-2024 Iris Lightshard", 0};@@ -42,7 +42,6 @@ int scrolling;
int num_screens; int solidsweep = 0; int numvirtuals = 0; -int ffm = 0; int kbLaunch = 0; int zoom = 0;@@ -65,7 +64,7 @@
void usage(void) { fprintf( stderr, - "usage: ryudo [-ffm] [-font fname] [-s] [-term prog] [-version] [-virtuals " + "usage: ryudo [-font fname] [-s] [-term prog] [-version] [-virtuals " "num] [exit|restart]\n"); exit(1); }@@ -88,9 +87,6 @@ for (i = 1; i < argc; i++)
if (strcmp(argv[i], "-debug") == 0) debug++; - else if (strcmp(argv[i], "-ffm") == 0) - ffm++; - else if (strcmp(argv[i], "-font") == 0 && i + 1 < argc) { i++; fname = argv[i];@@ -158,9 +154,6 @@ sendcmessage(DefaultRootWindow(dpy), restart_rio, 0L, 1, 1);
XSync(dpy, False); exit(0); } - - if (0) - XSynchronize(dpy, True); wm_state = XInternAtom(dpy, "WM_STATE", False); wm_change_state = XInternAtom(dpy, "WM_CHANGE_STATE", False);