]> Dogcows Code - chaz/openbox/blobdiff - openbox/engine.c
clean up the module if load() fails
[chaz/openbox] / openbox / engine.c
index 75446efc659704727fede7e349f9c554110b16fc..15722e3294b64bf6bd30e549ffc7c682149c546e 100644 (file)
@@ -15,6 +15,21 @@ gboolean engine_shadow;
 int engine_shadow_offset;
 int engine_shadow_tint;
 
+EngineFrameNew *engine_frame_new;
+EngineFrameGrabClient *engine_frame_grab_client;
+EngineFrameReleaseClient *engine_frame_release_client;
+EngineFrameAdjustArea *engine_frame_adjust_area;
+EngineFrameAdjustShape *engine_frame_adjust_shape;
+EngineFrameAdjustState *engine_frame_adjust_state;
+EngineFrameAdjustFocus *engine_frame_adjust_focus;
+EngineFrameAdjustTitle *engine_frame_adjust_title;
+EngineFrameAdjustIcon *engine_frame_adjust_icon;
+EngineFrameShow *engine_frame_show;
+EngineFrameHide *engine_frame_hide;
+EngineGetContext *engine_get_context;
+EngineRenderLabel *engine_render_label;
+EngineSizeLabel *engine_size_label;
+
 static GModule *module = NULL;
 static EngineStartup *estartup = NULL;
 static EngineShutdown *eshutdown = NULL;
@@ -60,6 +75,8 @@ static gboolean load(char *name)
     LOADSYM(frame_show, engine_frame_show);
     LOADSYM(frame_hide, engine_frame_hide);
     LOADSYM(get_context, engine_get_context);
+    LOADSYM(render_label, engine_render_label);
+    LOADSYM(size_label, engine_size_label);
 
     if (!estartup())
        return FALSE;
@@ -127,7 +144,7 @@ void engine_startup()
     module = NULL;
     engine_name = g_strdup(DEFAULT_ENGINE);
     engine_theme = NULL;
-    engine_layout = g_strdup("NDSLIMC");
+    engine_layout = g_strdup("NLIMC");
     engine_font = g_strdup("Sans-7");
     engine_shadow = FALSE;
     engine_shadow_offset = 1;
@@ -142,6 +159,10 @@ void engine_load()
         return;
     g_warning("Failed to load the engine '%s'", engine_name);
     g_message("Falling back to the default: '%s'", DEFAULT_ENGINE);
+    if (module != NULL) {
+       g_module_close(module);
+        module = NULL;
+    }
     if (!load(DEFAULT_ENGINE)) {
        g_critical("Failed to load the engine '%s'. Aborting", DEFAULT_ENGINE);
        exit(1);
This page took 0.028044 seconds and 4 git commands to generate.