X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=scrotwm.c;h=f6e507048af90fdf0415862c9f935ee066b5fbb5;hb=b324240783c83e88aa8212112cd887448dbd14f2;hp=40e7ef7667bfa2bbe7395fb7e8bae43a4f105344;hpb=14120c68fd2561f01f6154163909e8e8bd4e715f;p=spectrwm.git diff --git a/scrotwm.c b/scrotwm.c index 40e7ef7..f6e5070 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -360,6 +360,7 @@ struct quirk { { "xine", "xine Panel", SWM_Q_FLOAT | SWM_Q_ANYWHERE }, { "Xitk", "Xine Window", SWM_Q_FLOAT | SWM_Q_ANYWHERE }, { "xine", "xine Video Fullscreen Window", SWM_Q_FULLSCREEN | SWM_Q_FLOAT }, + { "pcb", "pcb", SWM_Q_FLOAT }, { NULL, NULL, 0}, }; @@ -2317,6 +2318,14 @@ manage_window(Window id) XConfigureWindow(display, win->id, mask, &wc); } + /* Reset font sizes (the bruteforce way; no default keybinding). */ + if (win->quirks & SWM_Q_XTERM_FONTADJ) { + for (i = 0; i < SWM_MAX_FONT_STEPS; i++) + fake_keypress(win, XK_KP_Subtract, ShiftMask); + for (i = 0; i < SWM_MAX_FONT_STEPS; i++) + fake_keypress(win, XK_KP_Add, ShiftMask); + } + XSelectInput(display, id, EnterWindowMask | FocusChangeMask | PropertyChangeMask | StructureNotifyMask); @@ -2618,13 +2627,12 @@ getstate(Window w) unsigned long n, extra; Atom real; - astate = XInternAtom(display, "WM_STATE", False); status = XGetWindowProperty(display, w, astate, 0L, 2L, False, astate, &real, &format, &n, &extra, (unsigned char **)&p); if (status != Success) return (-1); if (n != 0) - result = *p; + result = *((long *)p); XFree(p); return (result); }