gboolean config_resize_redraw;
gint config_resize_popup_show;
+gint config_resize_popup_pos;
ObStackingLayer config_dock_layer;
gboolean config_dock_floating;
else if (parse_contains("Nonpixel", doc, n))
config_resize_popup_show = 1;
}
+ if ((n = parse_find_node("popupPosition", node))) {
+ if (parse_contains("Top", doc, n))
+ config_resize_popup_pos = 1;
+ else if (parse_contains("Center", doc, n))
+ config_resize_popup_pos = 0;
+ }
}
static void parse_dock(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
parse_register(i, "desktops", parse_desktops, NULL);
config_resize_redraw = TRUE;
- config_resize_popup_show = 1;
+ config_resize_popup_show = 1; /* nonpixel increments */
+ config_resize_popup_pos = 0; /* center of client */
parse_register(i, "resize", parse_resize, NULL);
/*! 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;
+extern gboolean config_resize_redraw;
+/*! show move/resize popups? 0 = no, 1 = always, 2 = only
+ resizing !1 increments */
+extern gint config_resize_popup_show;
+/*! where to show the popup, currently above the window or centered */
+extern gint config_resize_popup_pos;
/*! The stacking layer the dock will reside in */
extern ObStackingLayer config_dock_layer;
gchar *text;
text = g_strdup_printf(format, a, b);
- popup_position(popup, CenterGravity,
- c->frame->area.x + c->frame->size.left +
- c->area.width / 2,
- c->frame->area.y + c->frame->size.top +
- c->area.height / 2);
+ if (config_resize_popup_pos == 1) /* == "Top" */
+ popup_position(popup, SouthGravity,
+ c->frame->area.x
+ + c->frame->area.width/2,
+ c->frame->area.y);
+ else /* == "Center" */
+ popup_position(popup, CenterGravity,
+ c->frame->area.x + c->frame->size.left +
+ c->area.width / 2,
+ c->frame->area.y + c->frame->size.top +
+ c->area.height / 2);
popup_show(popup, text);
g_free(text);
}