guint config_focus_delay;
guint config_focus_raise;
+ObPlacePolicy config_place_policy;
+
char *config_theme;
gchar *config_title_layout;
config_focus_raise = parse_bool(doc, n);
}
+static void parse_placement(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
+ void *d)
+{
+ xmlNodePtr n;
+
+ node = node->children;
+
+ if ((n = parse_find_node("policy", node)))
+ if (parse_contains("UnderMouse", doc, n))
+ config_place_policy = OB_PLACE_POLICY_MOUSE;
+}
+
static void parse_theme(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
void *d)
{
parse_register(i, "focus", parse_focus, NULL);
+ config_place_policy = OB_PLACE_POLICY_SMART;
+
+ parse_register(i, "placement", parse_placement, NULL);
+
config_theme = NULL;
config_title_layout = g_strdup("NLIMC");
#include "misc.h"
#include "stacking.h"
+#include "place.h"
#include <glib.h>
focus follows mouse */
extern guint config_focus_raise;
+extern ObPlacePolicy config_place_policy;
+
/*! When true windows' contents are refreshed while they are resized; otherwise
they are not updated until the resize is complete */
extern gboolean config_redraw_resize;
return;
if (place_transient(client, x, y) ||
place_dialog(client, x, y) ||
- ((config_focus_follow && config_focus_new) ?
+ ((config_place_policy == OB_PLACE_POLICY_MOUSE) ?
place_under_mouse(client, x, y) :
place_smart(client, x, y, SMART_FULL) ||
place_smart(client, x, y, SMART_GROUP) ||
struct _ObClient;
-void place_client(ObClient *client, gint *x, gint *y);
+typedef enum
+{
+ OB_PLACE_POLICY_SMART,
+ OB_PLACE_POLICY_MOUSE
+} ObPlacePolicy;
+
+void place_client(struct _ObClient *client, gint *x, gint *y);
#endif