Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] config: use automatic placement by default #1772

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/labwc-config.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,12 @@ this is for compatibility with Openbox.

## PLACEMENT

*<placement><policy>* [center|automatic|cursor]
Specify a placement policy for new windows. The "center" policy will
always place windows at the center of the active output. The "automatic"
policy will try to place new windows in such a way that they will
have minimal overlap with existing windows. The "cursor" policy will
center new windows under the cursor. Default is "center".
*<placement><policy>* [automatic|center|cursor]
Specify a placement policy for new windows. The "automatic" policy will
try to place new windows in such a way that they will have minimal
overlap with existing windows. The "center" policy will always place
windows at the center of the active output. The "cursor" policy will
center new windows under the cursor. Default is "automatic".

## WINDOW SWITCHER

Expand Down
2 changes: 1 addition & 1 deletion docs/rc.xml.all
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</core>

<placement>
<policy>center</policy>
<policy>automatic</policy>
</placement>

<!-- <font><theme> can be defined without an attribute to set all places -->
Expand Down
6 changes: 3 additions & 3 deletions src/config/rcxml.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,12 +871,12 @@ entry(xmlNode *node, char *nodename, char *content)
} else if (!strcasecmp(nodename, "reuseOutputMode.core")) {
set_bool(content, &rc.reuse_output_mode);
} else if (!strcmp(nodename, "policy.placement")) {
if (!strcmp(content, "automatic")) {
rc.placement_policy = LAB_PLACE_AUTOMATIC;
if (!strcmp(content, "center")) {
rc.placement_policy = LAB_PLACE_CENTER;
} else if (!strcmp(content, "cursor")) {
rc.placement_policy = LAB_PLACE_CURSOR;
} else {
rc.placement_policy = LAB_PLACE_CENTER;
rc.placement_policy = LAB_PLACE_AUTOMATIC;
}
} else if (!strcmp(nodename, "name.theme")) {
rc.theme_name = xstrdup(content);
Expand Down