+ j];
keycode = xcb_key_symbols_get_keycode(syms,
XK_Num_Lock);
- if (kc == *keycode)
- numlockmask = (1 << i);
- free(keycode);
+ if (keycode) {
+ if (kc == *keycode)
+ numlockmask = (1 << i);
+ free(keycode);
+ }
}
}
free(modmap_r);
void
setup_quirks(void)
{
- setquirk("MPlayer", "xv", "", SWM_Q_FLOAT | SWM_Q_FULLSCREEN | SWM_Q_FOCUSPREV);
- setquirk("OpenOffice.org 3.2", "VCLSalFrame", "", SWM_Q_FLOAT);
- setquirk("Firefox-bin", "firefox-bin", "", SWM_Q_TRANSSZ);
- setquirk("Firefox", "Dialog", "", SWM_Q_FLOAT);
- setquirk("Gimp", "gimp", "", SWM_Q_FLOAT | SWM_Q_ANYWHERE);
- setquirk("XTerm", "xterm", "", SWM_Q_XTERM_FONTADJ);
- setquirk("xine", "Xine Window", "", SWM_Q_FLOAT | SWM_Q_ANYWHERE);
- setquirk("Xitk", "Xitk Combo", "", SWM_Q_FLOAT | SWM_Q_ANYWHERE);
- setquirk("xine", "xine Panel", "", SWM_Q_FLOAT | SWM_Q_ANYWHERE);
- setquirk("Xitk", "Xine Window", "", SWM_Q_FLOAT | SWM_Q_ANYWHERE);
- setquirk("xine", "xine Video Fullscreen Window", "", SWM_Q_FULLSCREEN | SWM_Q_FLOAT);
- setquirk("pcb", "pcb", "", SWM_Q_FLOAT);
- setquirk("SDL_App", "SDL_App", "", SWM_Q_FLOAT | SWM_Q_FULLSCREEN);
+ setquirk("MPlayer", "xv", ".*", SWM_Q_FLOAT | SWM_Q_FULLSCREEN | SWM_Q_FOCUSPREV);
+ setquirk("OpenOffice.org 3.2", "VCLSalFrame", ".*", SWM_Q_FLOAT);
+ setquirk("Firefox-bin", "firefox-bin", ".*", SWM_Q_TRANSSZ);
+ setquirk("Firefox", "Dialog", ".*", SWM_Q_FLOAT);
+ setquirk("Gimp", "gimp", ".*", SWM_Q_FLOAT | SWM_Q_ANYWHERE);
+ setquirk("XTerm", "xterm", ".*", SWM_Q_XTERM_FONTADJ);
+ setquirk("xine", "Xine Window", ".*", SWM_Q_FLOAT | SWM_Q_ANYWHERE);
+ setquirk("Xitk", "Xitk Combo", ".*", SWM_Q_FLOAT | SWM_Q_ANYWHERE);
+ setquirk("xine", "xine Panel", ".*", SWM_Q_FLOAT | SWM_Q_ANYWHERE);
+ setquirk("Xitk", "Xine Window", ".*", SWM_Q_FLOAT | SWM_Q_ANYWHERE);
+ setquirk("xine", "xine Video Fullscreen Window", ".*", SWM_Q_FULLSCREEN | SWM_Q_FLOAT);
+ setquirk("pcb", "pcb", ".*", SWM_Q_FLOAT);
+ setquirk("SDL_App", "SDL_App", ".*", SWM_Q_FLOAT | SWM_Q_FULLSCREEN);
}
/* conf file stuff */
void
mappingnotify(xcb_mapping_notify_event_t *e)
{
+ struct ws_win *w;
+ int i, j, num_screens;
+
xcb_refresh_keyboard_mapping(syms, e);
- if (e->request == XCB_MAPPING_KEYBOARD)
+ if (e->request == XCB_MAPPING_KEYBOARD) {
grabkeys();
+
+ /* Regrab buttons on all managed windows. */
+ num_screens = get_screen_count();
+ for (i = 0; i < num_screens; i++)
+ for (j = 0; j < workspace_limit; j++)
+ TAILQ_FOREACH(w, &screens[i].ws[j].winlist,
+ entry)
+ grabbuttons(w);
+ }
}
void
focus_flush();
}
} else if (e->state == XCB_PROPERTY_DELETE) {
+ /* Reload floating geometry in case region changed. */
+ if (win->floating)
+ load_float_geom(win);
+
/* The window is no longer iconic, restack ws. */
if (focus_mode != SWM_FOCUS_FOLLOW)
ws->focus_pending = get_focus_magic(win);