settings->type = -1;
settings->decor = -1;
settings->shade = -1;
+ settings->monitor_type = OB_PLACE_MONITOR_ANY;
settings->monitor = -1;
settings->focus = -1;
settings->desktop = 0;
copy_if(type, (ObClientType)-1);
copy_if(decor, -1);
copy_if(shade, -1);
+ copy_if(monitor_type, OB_PLACE_MONITOR_ANY);
copy_if(monitor, -1);
copy_if(focus, -1);
copy_if(desktop, 0);
/* Manages settings for individual applications.
Some notes: monitor is the screen number in a multi monitor
- (Xinerama) setup (starting from 0) or mouse, meaning the
- monitor the pointer is on. Default: mouse.
+ (Xinerama) setup (starting from 0), or mouse: the monitor the pointer
+ is on, active: the active monitor, primary: the primary monitor.
Layer can be three values, above (Always on top), below
(Always on bottom) and everything else (normal behaviour).
Positions can be an integer value or center, which will
{
xmlNodePtr app = obt_xml_find_node(node->children, "application");
gchar *name = NULL, *class = NULL, *role = NULL, *title = NULL,
- *type_str = NULL;
- gboolean name_set, class_set, type_set, role_set, title_set;
+ *type_str = NULL, *group_name = NULL, *group_class = NULL;
+ gboolean name_set, class_set, type_set, role_set, title_set,
+ group_name_set, group_class_set;
ObClientType type;
gboolean x_pos_given;
class_set = obt_xml_attr_string(app, "class", &class);
name_set = obt_xml_attr_string(app, "name", &name);
+ group_class_set = obt_xml_attr_string(app, "groupclass", &group_class);
+ group_name_set = obt_xml_attr_string(app, "groupname", &group_name);
type_set = obt_xml_attr_string(app, "type", &type_str);
role_set = obt_xml_attr_string(app, "role", &role);
title_set = obt_xml_attr_string(app, "title", &title);
type_set = FALSE; /* not valid! */
}
- if (class_set || name_set || role_set || title_set || type_set) {
+ if (class_set || name_set || role_set || title_set || type_set ||
+ group_class_set || group_name_set)
+ {
xmlNodePtr n, c;
ObAppSettings *settings = config_create_app_settings();
if (class_set)
settings->class = g_pattern_spec_new(class);
+ if (group_name_set)
+ settings->group_name = g_pattern_spec_new(group_name);
+
+ if (group_class_set)
+ settings->group_class = g_pattern_spec_new(group_class);
+
if (role_set)
settings->role = g_pattern_spec_new(role);
settings->pos_given = TRUE;
}
- if (settings->pos_given &&
- (c = obt_xml_find_node(n->children, "monitor")))
+ /* monitor can be set without setting x or y */
+ if ((c = obt_xml_find_node(n->children, "monitor")))
if (!obt_xml_node_contains(c, "default")) {
gchar *s = obt_xml_node_string(c);
if (!g_ascii_strcasecmp(s, "mouse"))
- settings->monitor = 0;
+ settings->monitor_type =
+ OB_PLACE_MONITOR_MOUSE;
+ else if (!g_ascii_strcasecmp(s, "active"))
+ settings->monitor_type =
+ OB_PLACE_MONITOR_ACTIVE;
+ else if (!g_ascii_strcasecmp(s, "primary"))
+ settings->monitor_type =
+ OB_PLACE_MONITOR_PRIMARY;
else
settings->monitor = obt_xml_node_int(c);
g_free(s);
(gpointer) settings);
g_free(name);
g_free(class);
+ g_free(group_name);
+ g_free(group_class);
g_free(role);
g_free(title);
g_free(type_str);
- name = class = role = title = type_str = NULL;
+ name = class = group_name = group_class = role = title = type_str =
+ NULL;
}
app = obt_xml_find_node(app->next, "application");
obt_xml_register(i, "keyboard", parse_keyboard, NULL);
config_mouse_threshold = 8;
- config_mouse_dclicktime = 200;
+ config_mouse_dclicktime = 500;
config_mouse_screenedgetime = 400;
config_mouse_screenedgewarp = FALSE;
for (it = config_per_app_settings; it; it = g_slist_next(it)) {
ObAppSettings *itd = (ObAppSettings *)it->data;
- if (itd->name) g_pattern_spec_free(itd->name);
- if (itd->role) g_pattern_spec_free(itd->role);
+ if (itd->name) g_pattern_spec_free(itd->name);
+ if (itd->role) g_pattern_spec_free(itd->role);
if (itd->title) g_pattern_spec_free(itd->title);
if (itd->class) g_pattern_spec_free(itd->class);
+ if (itd->group_name) g_pattern_spec_free(itd->group_name);
+ if (itd->group_class) g_pattern_spec_free(itd->group_class);
g_slice_free(ObAppSettings, it->data);
}
g_slist_free(config_per_app_settings);