]> Dogcows Code - chaz/openbox/blobdiff - openbox/engine.c
fallback to transients' parents when possible.
[chaz/openbox] / openbox / engine.c
index 75446efc659704727fede7e349f9c554110b16fc..66d305805a155c48f137a4e6c1c5321899edfb8d 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;
@@ -31,19 +46,21 @@ static gboolean load(char *name)
 
     g_assert(module == NULL);
 
-    path = g_build_filename(ENGINEDIR, name, NULL);
+    path = g_build_filename(g_get_home_dir(), ".openbox", "engines", name,
+                            NULL);
     module = g_module_open(path, 0);
     g_free(path);
 
     if (module == NULL) {
-       path = g_build_filename(g_get_home_dir(), ".openbox", "engines", name,
-                               NULL);
-       module = g_module_open(path, 0);
-       g_free(path);
+        path = g_build_filename(ENGINEDIR, name, NULL);
+        module = g_module_open(path, 0);
+        g_free(path);
     }
 
-    if (module == NULL)
+    if (module == NULL) {
+        g_warning(g_module_error());
        return FALSE;
+    }
 
     /* load the engine's symbols */
     LOADSYM(startup, estartup);
@@ -60,6 +77,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 +146,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 +161,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.021065 seconds and 4 git commands to generate.