- gint x, y, w, h;
- gint wt, wl, wr, wb;
-
- wt = wl = wr = wb = MAX(3,
- ob_rr_theme->handle_height +
- ob_rr_theme->bwidth * 2);
-
- x = focus_cycle_target->frame->area.x;
- y = focus_cycle_target->frame->area.y;
- w = focus_cycle_target->frame->area.width;
- h = wt;
-
- XMoveResizeWindow(ob_display, focus_indicator.top.win,
- x, y, w, h);
- a_focus_indicator->texture[0].data.lineart.x1 = 0;
- a_focus_indicator->texture[0].data.lineart.y1 = h-1;
- a_focus_indicator->texture[0].data.lineart.x2 = 0;
- a_focus_indicator->texture[0].data.lineart.y2 = 0;
- a_focus_indicator->texture[1].data.lineart.x1 = 0;
- a_focus_indicator->texture[1].data.lineart.y1 = 0;
- a_focus_indicator->texture[1].data.lineart.x2 = w-1;
- a_focus_indicator->texture[1].data.lineart.y2 = 0;
- a_focus_indicator->texture[2].data.lineart.x1 = w-1;
- a_focus_indicator->texture[2].data.lineart.y1 = 0;
- a_focus_indicator->texture[2].data.lineart.x2 = w-1;
- a_focus_indicator->texture[2].data.lineart.y2 = h-1;
- a_focus_indicator->texture[3].data.lineart.x1 = (wl-1);
- a_focus_indicator->texture[3].data.lineart.y1 = h-1;
- a_focus_indicator->texture[3].data.lineart.x2 = w - wr;
- a_focus_indicator->texture[3].data.lineart.y2 = h-1;
- RrPaint(a_focus_indicator, focus_indicator.top.win,
- w, h);
-
- x = focus_cycle_target->frame->area.x;
- y = focus_cycle_target->frame->area.y;
- w = wl;
- h = focus_cycle_target->frame->area.height;
-
- XMoveResizeWindow(ob_display, focus_indicator.left.win,
- x, y, w, h);
- a_focus_indicator->texture[0].data.lineart.x1 = w-1;
- a_focus_indicator->texture[0].data.lineart.y1 = 0;
- a_focus_indicator->texture[0].data.lineart.x2 = 0;
- a_focus_indicator->texture[0].data.lineart.y2 = 0;
- a_focus_indicator->texture[1].data.lineart.x1 = 0;
- a_focus_indicator->texture[1].data.lineart.y1 = 0;
- a_focus_indicator->texture[1].data.lineart.x2 = 0;
- a_focus_indicator->texture[1].data.lineart.y2 = h-1;
- a_focus_indicator->texture[2].data.lineart.x1 = 0;
- a_focus_indicator->texture[2].data.lineart.y1 = h-1;
- a_focus_indicator->texture[2].data.lineart.x2 = w-1;
- a_focus_indicator->texture[2].data.lineart.y2 = h-1;
- a_focus_indicator->texture[3].data.lineart.x1 = w-1;
- a_focus_indicator->texture[3].data.lineart.y1 = wt-1;
- a_focus_indicator->texture[3].data.lineart.x2 = w-1;
- a_focus_indicator->texture[3].data.lineart.y2 = h - wb;
- RrPaint(a_focus_indicator, focus_indicator.left.win,
- w, h);
-
- x = focus_cycle_target->frame->area.x +
- focus_cycle_target->frame->area.width - wr;
- y = focus_cycle_target->frame->area.y;
- w = wr;
- h = focus_cycle_target->frame->area.height ;
-
- XMoveResizeWindow(ob_display, focus_indicator.right.win,
- x, y, w, h);
- a_focus_indicator->texture[0].data.lineart.x1 = 0;
- a_focus_indicator->texture[0].data.lineart.y1 = 0;
- a_focus_indicator->texture[0].data.lineart.x2 = w-1;
- a_focus_indicator->texture[0].data.lineart.y2 = 0;
- a_focus_indicator->texture[1].data.lineart.x1 = w-1;
- a_focus_indicator->texture[1].data.lineart.y1 = 0;
- a_focus_indicator->texture[1].data.lineart.x2 = w-1;
- a_focus_indicator->texture[1].data.lineart.y2 = h-1;
- a_focus_indicator->texture[2].data.lineart.x1 = w-1;
- a_focus_indicator->texture[2].data.lineart.y1 = h-1;
- a_focus_indicator->texture[2].data.lineart.x2 = 0;
- a_focus_indicator->texture[2].data.lineart.y2 = h-1;
- a_focus_indicator->texture[3].data.lineart.x1 = 0;
- a_focus_indicator->texture[3].data.lineart.y1 = wt-1;
- a_focus_indicator->texture[3].data.lineart.x2 = 0;
- a_focus_indicator->texture[3].data.lineart.y2 = h - wb;
- RrPaint(a_focus_indicator, focus_indicator.right.win,
- w, h);
-
- x = focus_cycle_target->frame->area.x;
- y = focus_cycle_target->frame->area.y +
- focus_cycle_target->frame->area.height - wb;
- w = focus_cycle_target->frame->area.width;
- h = wb;
-
- XMoveResizeWindow(ob_display, focus_indicator.bottom.win,
- x, y, w, h);
- a_focus_indicator->texture[0].data.lineart.x1 = 0;
- a_focus_indicator->texture[0].data.lineart.y1 = 0;
- a_focus_indicator->texture[0].data.lineart.x2 = 0;
- a_focus_indicator->texture[0].data.lineart.y2 = h-1;
- a_focus_indicator->texture[1].data.lineart.x1 = 0;
- a_focus_indicator->texture[1].data.lineart.y1 = h-1;
- a_focus_indicator->texture[1].data.lineart.x2 = w-1;
- a_focus_indicator->texture[1].data.lineart.y2 = h-1;
- a_focus_indicator->texture[2].data.lineart.x1 = w-1;
- a_focus_indicator->texture[2].data.lineart.y1 = h-1;
- a_focus_indicator->texture[2].data.lineart.x2 = w-1;
- a_focus_indicator->texture[2].data.lineart.y2 = 0;
- a_focus_indicator->texture[3].data.lineart.x1 = wl-1;
- a_focus_indicator->texture[3].data.lineart.y1 = 0;
- a_focus_indicator->texture[3].data.lineart.x2 = w - wr;
- a_focus_indicator->texture[3].data.lineart.y2 = 0;
- RrPaint(a_focus_indicator, focus_indicator.bottom.win,
- w, h);
-
- XMapWindow(ob_display, focus_indicator.top.win);
- XMapWindow(ob_display, focus_indicator.left.win);
- XMapWindow(ob_display, focus_indicator.right.win);
- XMapWindow(ob_display, focus_indicator.bottom.win);
- }
-}
-
-static gboolean valid_focus_target(ObClient *ft)
-{
- /* we don't use client_can_focus here, because that doesn't let you
- focus an iconic window, but we want to be able to, so we just check
- if the focus flags on the window allow it, and its on the current
- desktop */
- if ((ft->type == OB_CLIENT_TYPE_NORMAL ||
- ft->type == OB_CLIENT_TYPE_DIALOG ||
- (!client_has_group_siblings(ft) &&
- (ft->type == OB_CLIENT_TYPE_TOOLBAR ||
- ft->type == OB_CLIENT_TYPE_MENU ||
- ft->type == OB_CLIENT_TYPE_UTILITY))) &&
- ((ft->can_focus || ft->focus_notify) &&
- !ft->skip_taskbar &&
- (ft->desktop == screen_desktop || ft->desktop == DESKTOP_ALL)) &&
- ft == client_focus_target(ft))
- return TRUE;
-/*
- {
- GSList *it;
-
- for (it = ft->transients; it; it = g_slist_next(it)) {
- ObClient *c = it->data;
-
- if (c->frame->visible)
- return FALSE;