From: Ryan McBride Date: Wed, 11 Feb 2009 07:24:02 +0000 (+0000) Subject: Reset xterm font sizes on startup in case we restarted with scaled fonts. X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;ds=inline;h=afeb7d22396845889defbaf6dd4a981681bd497e;p=spectrwm.git Reset xterm font sizes on startup in case we restarted with scaled fonts. --- diff --git a/scrotwm.c b/scrotwm.c index 40e7ef7..985cda1 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -2317,6 +2317,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);