X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fopenbox.c;h=d2b66b5b08516e62d41608d42df4443ec16d8b56;hb=16433ce06c083de8c725b8dc906f47c1333e3b33;hp=800e6a210d3141a2fffd4eba1dc7b9816a167a0f;hpb=965ed8907a5dd81d5ffbc93b67a672fa78833854;p=chaz%2Fopenbox diff --git a/openbox/openbox.c b/openbox/openbox.c index 800e6a21..d2b66b5b 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -43,12 +43,12 @@ #include "ping.h" #include "prompt.h" #include "gettext.h" -#include "render/render.h" -#include "render/theme.h" +#include "obrender/render.h" +#include "obrender/theme.h" #include "obt/display.h" #include "obt/prop.h" #include "obt/keyboard.h" -#include "obt/parse.h" +#include "obt/xml.h" #ifdef HAVE_FCNTL_H # include @@ -166,6 +166,8 @@ gint main(gint argc, gchar **argv) obt_main_loop_signal_add(ob_main_loop, SIGHUP, signal_handler, NULL,NULL); obt_main_loop_signal_add(ob_main_loop, SIGPIPE, signal_handler, NULL,NULL); obt_main_loop_signal_add(ob_main_loop, SIGCHLD, signal_handler, NULL,NULL); + obt_main_loop_signal_add(ob_main_loop, SIGTTIN, signal_handler, NULL,NULL); + obt_main_loop_signal_add(ob_main_loop, SIGTTOU, signal_handler, NULL,NULL); ob_screen = DefaultScreen(obt_display); @@ -224,13 +226,15 @@ gint main(gint argc, gchar **argv) keys[OB_KEY_DOWN] = obt_keyboard_keysym_to_keycode(XK_Down); keys[OB_KEY_TAB] = obt_keyboard_keysym_to_keycode(XK_Tab); keys[OB_KEY_SPACE] = obt_keyboard_keysym_to_keycode(XK_space); + keys[OB_KEY_HOME] = obt_keyboard_keysym_to_keycode(XK_Home); + keys[OB_KEY_END] = obt_keyboard_keysym_to_keycode(XK_End); { - ObtParseInst *i; + ObtXmlInst *i; /* startup the parsing so everything can register sections of the rc */ - i = obt_parse_instance_new(); + i = obt_xml_instance_new(); /* register all the available actions */ actions_startup(reconfigure); @@ -239,12 +243,12 @@ gint main(gint argc, gchar **argv) /* parse/load user options */ if ((config_file && - obt_parse_load_file(i, config_file, "openbox_config")) || - obt_parse_load_config_file(i, "openbox", "rc.xml", - "openbox_config")) + obt_xml_load_file(i, config_file, "openbox_config")) || + obt_xml_load_config_file(i, "openbox", "rc.xml", + "openbox_config")) { - obt_parse_tree_from_root(i); - obt_parse_close(i); + obt_xml_tree_from_root(i); + obt_xml_close(i); } else { g_message(_("Unable to find a valid config file, using some simple defaults")); @@ -263,7 +267,7 @@ gint main(gint argc, gchar **argv) OBT_PROP_ERASE(obt_root(ob_screen), OB_CONFIG_FILE); /* we're done with parsing now, kill it */ - obt_parse_instance_unref(i); + obt_xml_instance_unref(i); } /* load the theme specified in the rc file */ @@ -274,7 +278,8 @@ gint main(gint argc, gchar **argv) config_font_inactivewindow, config_font_menutitle, config_font_menuitem, - config_font_osd))) + config_font_activeosd, + config_font_inactiveosd))) { RrThemeFree(ob_rr_theme); ob_rr_theme = theme; @@ -410,6 +415,8 @@ gint main(gint argc, gchar **argv) g_free(keys[OB_KEY_DOWN]); g_free(keys[OB_KEY_TAB]); g_free(keys[OB_KEY_SPACE]); + g_free(keys[OB_KEY_HOME]); + g_free(keys[OB_KEY_END]); } while (reconfigure); } @@ -499,6 +506,10 @@ static void signal_handler(gint signal, gpointer data) /* reap children */ while (waitpid(-1, NULL, WNOHANG) > 0); break; + case SIGTTIN: + case SIGTTOU: + ob_debug("Caught signal %d. Ignoring.", signal); + break; default: ob_debug("Caught signal %d. Exiting.", signal); /* TERM and INT return a 0 code */