]> Dogcows Code - chaz/openbox/blobdiff - openbox/engine.c
dont focus !normal windows on enter events
[chaz/openbox] / openbox / engine.c
index f9fd2cf148111bd977bf37b7a7b1be593801b52c..c654d26380d942a287543528163b7f1fcb64d547 100644 (file)
@@ -1,4 +1,5 @@
 #include "engine.h"
+#include "config.h"
 
 #include <glib.h>
 #include <gmodule.h>
@@ -23,13 +24,13 @@ static gboolean load(char *name)
     g_assert(module == NULL);
 
     path = g_build_filename(ENGINEDIR, name, NULL);
-    module = g_module_open(path, G_MODULE_BIND_LAZY);
+    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, G_MODULE_BIND_LAZY);
+       module = g_module_open(path, 0);
        g_free(path);
     }
 
@@ -42,8 +43,7 @@ static gboolean load(char *name)
     LOADSYM(frame_new, engine_frame_new);
     LOADSYM(frame_grab_client, engine_frame_grab_client);
     LOADSYM(frame_release_client, engine_frame_release_client);
-    LOADSYM(frame_adjust_size, engine_frame_adjust_size);
-    LOADSYM(frame_adjust_position, engine_frame_adjust_position);
+    LOADSYM(frame_adjust_area, engine_frame_adjust_area);
     LOADSYM(frame_adjust_shape, engine_frame_adjust_shape);
     LOADSYM(frame_adjust_state, engine_frame_adjust_state);
     LOADSYM(frame_adjust_focus, engine_frame_adjust_focus);
@@ -52,10 +52,6 @@ static gboolean load(char *name)
     LOADSYM(frame_show, engine_frame_show);
     LOADSYM(frame_hide, engine_frame_hide);
     LOADSYM(get_context, engine_get_context);
-    LOADSYM(frame_mouse_enter, engine_mouse_enter);
-    LOADSYM(frame_mouse_leave, engine_mouse_leave);
-    LOADSYM(frame_mouse_press, engine_mouse_press);
-    LOADSYM(frame_mouse_release, engine_mouse_release);
 
     if (!estartup())
        return FALSE;
@@ -63,14 +59,16 @@ static gboolean load(char *name)
     return TRUE;
 }
 
-void engine_startup(char *engine)
+void engine_startup()
 {
+    ConfigValue engine;
+
     module = NULL;
 
-    if (engine != NULL) {
-       if (load(engine))
+    if (config_get("engine", Config_String, &engine)) {
+       if (load(engine.string))
            return;
-       g_warning("Failed to load the engine '%s'", engine);
+       g_warning("Failed to load the engine '%s'", engine.string);
        g_message("Falling back to the default: '%s'", DEFAULT_ENGINE);
     }
     if (!load(DEFAULT_ENGINE)) {
This page took 0.023873 seconds and 4 git commands to generate.