/* dialog windows */
double dialog_ratio = .6;
/* status bar */
-#define SWM_BAR_MAX (128)
+#define SWM_BAR_MAX (256)
char *bar_argv[] = { NULL, NULL };
int bar_pipe[2];
char bar_ext[SWM_BAR_MAX];
{ "OpenOffice.org 2.4", "VCLSalFrame", SWM_Q_FLOAT },
{ "OpenOffice.org 3.0", "VCLSalFrame", SWM_Q_FLOAT },
{ "Firefox-bin", "firefox-bin", SWM_Q_TRANSSZ },
+ { "Firefox", "Dialog", SWM_Q_FLOAT },
{ "Gimp", "gimp", SWM_Q_FLOAT | SWM_Q_ANYWHERE },
{ "XTerm", "xterm", SWM_Q_XTERM_FONTADJ },
{ "xine", "Xine Window", SWM_Q_FLOAT | SWM_Q_ANYWHERE },
case SWM_ARG_ID_FOCUSMAIN:
winfocus = TAILQ_FIRST(wl);
+ if (winfocus == cur_focus)
+ winfocus = cur_focus->ws->focus_prev;
+ if (winfocus == NULL)
+ return;
break;
default:
}
}
+void
+workaround(void)
+{
+ int i;
+ Atom netwmcheck, netwmname, utf8_string;
+ Window root;
+
+ /* work around sun jdk bugs, code from wmname */
+ netwmcheck = XInternAtom(display, "_NET_SUPPORTING_WM_CHECK", False);
+ netwmname = XInternAtom(display, "_NET_WM_NAME", False);
+ utf8_string = XInternAtom(display, "UTF8_STRING", False);
+ for (i = 0; i < ScreenCount(display); i++) {
+ root = screens[i].root;
+ XChangeProperty(display, root, netwmcheck, XA_WINDOW, 32,
+ PropModeReplace, (unsigned char *)&root, 1);
+ XChangeProperty(display, root, netwmname, utf8_string, 8,
+ PropModeReplace, "LG3D", strlen("LG3D"));
+ }
+}
+
int
main(int argc, char *argv[])
{
TAILQ_FOREACH(r, &screens[i].rl, entry)
bar_setup(r);
- /* ws[0].focus = TAILQ_FIRST(&ws[0].winlist); */
+ /* set some values to work around bad programs */
+ workaround();
grabkeys();
stack();