- if (!g_ascii_strcasecmp(name, "focusnew")) {
- if (value->type != TOKEN_BOOL)
- yyerror("invalid value");
- else {
- focus_new = value->data.bool;
- }
- } else if (!g_ascii_strcasecmp(name, "followmouse")) {
- if (value->type != TOKEN_BOOL)
- yyerror("invalid value");
- else {
- focus_follow = value->data.bool;
- }
- } else if (!g_ascii_strcasecmp(name, "focuslast")) {
- if (value->type != TOKEN_BOOL)
- yyerror("invalid value");
- else {
- focus_last = value->data.bool;
- }
- } else if (!g_ascii_strcasecmp(name, "focuslastondesktop")) {
- if (value->type != TOKEN_BOOL)
- yyerror("invalid value");
- else {
- focus_last_on_desktop = value->data.bool;
- }
- } else
- yyerror("invalid option");
- parse_free_token(value);
-}
-
-void focus_startup()
-{
- /* create the window which gets focus when no clients get it. Have to
- make it override-redirect so we don't try manage it, since it is
- mapped. */
- XSetWindowAttributes attrib;
-
- focus_client = NULL;
- focus_new = TRUE;
- focus_follow = FALSE;
- focus_last = TRUE;
- focus_last_on_desktop = TRUE;
-
- attrib.override_redirect = TRUE;
- focus_backup = XCreateWindow(ob_display, ob_root,
- -100, -100, 1, 1, 0,
- CopyFromParent, InputOutput, CopyFromParent,
- CWOverrideRedirect, &attrib);
- XMapRaised(ob_display, focus_backup);