From: Mikael Magnusson Date: Sat, 8 Mar 2008 16:43:32 +0000 (+0100) Subject: Merge branch 'backport' into work X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=ec328fc04fe6e8d8c3d1ee386d4964963eb2ee17;p=chaz%2Fopenbox Merge branch 'backport' into work Conflicts: obt/keyboard.c openbox/actions/cyclewindows.c openbox/actions/directionalwindows.c openbox/frame.c openbox/openbox.c --- ec328fc04fe6e8d8c3d1ee386d4964963eb2ee17 diff --cc openbox/actions/cyclewindows.c index 44d87cf6,6fba17ff..5354f087 --- a/openbox/actions/cyclewindows.c +++ b/openbox/actions/cyclewindows.c @@@ -47,36 -49,32 +47,36 @@@ static gpointer setup_func(xmlNodePtr n Options *o; o = g_new0(Options, 1); - o->dialog = TRUE; o->bar = TRUE; - - if ((n = parse_find_node("linear", node))) - o->linear = parse_bool(doc, n); - if ((n = parse_find_node("dialog", node))) - o->dialog = parse_bool(doc, n); - if ((n = parse_find_node("bar", node))) - o->bar = parse_bool(doc, n); - if ((n = parse_find_node("raise", node))) - o->raise = parse_bool(doc, n); - if ((n = parse_find_node("panels", node))) - o->dock_windows = parse_bool(doc, n); - if ((n = parse_find_node("desktop", node))) - o->desktop_windows = parse_bool(doc, n); - if ((n = parse_find_node("allDesktops", node))) - o->all_desktops = parse_bool(doc, n); - - if ((n = parse_find_node("finalactions", node))) { + o->dialog_mode = OB_FOCUS_CYCLE_POPUP_MODE_LIST; + + if ((n = obt_parse_find_node(node, "linear"))) + o->linear = obt_parse_node_bool(n); + if ((n = obt_parse_find_node(node, "dialog"))) { + if (obt_parse_node_contains(n, "none")) + o->dialog_mode = OB_FOCUS_CYCLE_POPUP_MODE_NONE; + else if (obt_parse_node_contains(n, "icons")) + o->dialog_mode = OB_FOCUS_CYCLE_POPUP_MODE_ICONS; + } + if ((n = obt_parse_find_node(node, "bar"))) + o->bar = obt_parse_node_bool(n); + if ((n = obt_parse_find_node(node, "raise"))) + o->raise = obt_parse_node_bool(n); + if ((n = obt_parse_find_node(node, "panels"))) + o->dock_windows = obt_parse_node_bool(n); + if ((n = obt_parse_find_node(node, "desktop"))) + o->desktop_windows = obt_parse_node_bool(n); + if ((n = obt_parse_find_node(node, "allDesktops"))) + o->all_desktops = obt_parse_node_bool(n); + + if ((n = obt_parse_find_node(node, "finalactions"))) { xmlNodePtr m; - m = parse_find_node("action", n->xmlChildrenNode); + m = obt_parse_find_node(n->children, "action"); while (m) { - ObActionsAct *action = actions_parse(i, doc, m); + ObActionsAct *action = actions_parse(m); - if (action) o->actions = g_slist_prepend(o->actions, action); + if (action) o->actions = g_slist_append(o->actions, action); - m = parse_find_node("action", m->next); + m = obt_parse_find_node(m->next, "action"); } } else { diff --cc openbox/actions/directionalwindows.c index c5c25c11,d9f24d61..d3633d50 --- a/openbox/actions/directionalwindows.c +++ b/openbox/actions/directionalwindows.c @@@ -85,14 -87,14 +85,14 @@@ static gpointer setup_func(xmlNodePtr n g_free(s); } - if ((n = parse_find_node("finalactions", node))) { + if ((n = obt_parse_find_node(node, "finalactions"))) { xmlNodePtr m; - m = parse_find_node("action", n->xmlChildrenNode); + m = obt_parse_find_node(n->children, "action"); while (m) { - ObActionsAct *action = actions_parse(i, doc, m); + ObActionsAct *action = actions_parse(m); - if (action) o->actions = g_slist_prepend(o->actions, action); + if (action) o->actions = g_slist_append(o->actions, action); - m = parse_find_node("action", m->next); + m = obt_parse_find_node(m->next, "action"); } } else { diff --cc openbox/client.c index a055e632,7062cabd..0ccb343b --- a/openbox/client.c +++ b/openbox/client.c @@@ -577,13 -650,12 +576,12 @@@ void client_manage(Window window, ObPro /* free the ObAppSettings shallow copy */ g_free(settings); - ob_debug("Managed window 0x%lx plate 0x%x (%s)\n", + ob_debug("Managed window 0x%lx plate 0x%x (%s)", window, self->frame->window, self->class); - return; + hooks_queue(OB_HOOK_WIN_NEW, self); } - ObClient *client_fake_manage(Window window) { ObClient *self; @@@ -2124,9 -2188,8 +2121,8 @@@ void client_update_icons(ObClient *self (hints->flags & IconMaskHint ? hints->icon_mask : None), (gint*)&w, (gint*)&h, &data); - xerror_set_ignore(FALSE); + obt_display_ignore_errors(FALSE); - if (xicon) { if (w > 0 && h > 0) { /* is this icon in the cache yet? */ diff --cc openbox/frame.c index 25c47048,235dd30b..8a7b1aef --- a/openbox/frame.c +++ b/openbox/frame.c @@@ -1235,54 -1230,53 +1227,53 @@@ static void layout_title(ObFrame *self /* position and map the elements */ if (self->icon_on) { - XMapWindow(ob_display, self->icon); - XMoveWindow(ob_display, self->icon, self->icon_x, + XMapWindow(obt_display, self->icon); + XMoveWindow(obt_display, self->icon, self->icon_x, ob_rr_theme->paddingy); } else - XUnmapWindow(ob_display, self->icon); + XUnmapWindow(obt_display, self->icon); if (self->desk_on) { - XMapWindow(ob_display, self->desk); - XMoveWindow(ob_display, self->desk, self->desk_x, + XMapWindow(obt_display, self->desk); + XMoveWindow(obt_display, self->desk, self->desk_x, ob_rr_theme->paddingy + 1); } else - XUnmapWindow(ob_display, self->desk); + XUnmapWindow(obt_display, self->desk); if (self->shade_on) { - XMapWindow(ob_display, self->shade); - XMoveWindow(ob_display, self->shade, self->shade_x, + XMapWindow(obt_display, self->shade); + XMoveWindow(obt_display, self->shade, self->shade_x, ob_rr_theme->paddingy + 1); } else - XUnmapWindow(ob_display, self->shade); + XUnmapWindow(obt_display, self->shade); if (self->iconify_on) { - XMapWindow(ob_display, self->iconify); - XMoveWindow(ob_display, self->iconify, self->iconify_x, + XMapWindow(obt_display, self->iconify); + XMoveWindow(obt_display, self->iconify, self->iconify_x, ob_rr_theme->paddingy + 1); } else - XUnmapWindow(ob_display, self->iconify); + XUnmapWindow(obt_display, self->iconify); if (self->max_on) { - XMapWindow(ob_display, self->max); - XMoveWindow(ob_display, self->max, self->max_x, + XMapWindow(obt_display, self->max); + XMoveWindow(obt_display, self->max, self->max_x, ob_rr_theme->paddingy + 1); } else - XUnmapWindow(ob_display, self->max); + XUnmapWindow(obt_display, self->max); if (self->close_on) { - XMapWindow(ob_display, self->close); - XMoveWindow(ob_display, self->close, self->close_x, + XMapWindow(obt_display, self->close); + XMoveWindow(obt_display, self->close, self->close_x, ob_rr_theme->paddingy + 1); } else - XUnmapWindow(ob_display, self->close); + XUnmapWindow(obt_display, self->close); - if (self->label_on) { - self->label_width = MAX(1, self->label_width); /* no lower than 1 */ + if (self->label_on && self->label_width > 0) { - XMapWindow(ob_display, self->label); - XMoveWindow(ob_display, self->label, self->label_x, + XMapWindow(obt_display, self->label); + XMoveWindow(obt_display, self->label, self->label_x, ob_rr_theme->paddingy); } else - XUnmapWindow(ob_display, self->label); + XUnmapWindow(obt_display, self->label); } ObFrameContext frame_context_from_string(const gchar *name) diff --cc openbox/menuframe.c index 7b4c872b,a9b54408..1e767e96 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@@ -695,13 -690,12 +695,12 @@@ void menu_frame_render(ObMenuFrame *sel } RECT_SET_POINT(e->area, 0, h+e->border); - XMoveWindow(ob_display, e->window, + XMoveWindow(obt_display, e->window, e->area.x-e->border, e->area.y-e->border); - XSetWindowBorderWidth(ob_display, e->window, e->border); - XSetWindowBorder(ob_display, e->window, + XSetWindowBorderWidth(obt_display, e->window, e->border); + XSetWindowBorder(obt_display, e->window, RrColorPixel(ob_rr_theme->menu_border_color)); - text_a = (e->entry->type == OB_MENU_ENTRY_TYPE_NORMAL && !e->entry->data.normal.enabled ? /* disabled */