mirror of
https://github.com/labwc/labwc.git
synced 2026-02-10 04:27:47 -05:00
config: add <core><adaptiveSync>
This commit is contained in:
parent
d9253331cd
commit
c48b9d44d1
6 changed files with 10 additions and 7 deletions
|
|
@ -28,6 +28,9 @@ Configuration must be wrapped in a <labwc_config> root-node.
|
|||
The distance in pixels between views and output edges when using
|
||||
movement actions, for example MoveToEdge. Default is 0.
|
||||
|
||||
*<core><adaptiveSync>* [yes|no]
|
||||
Enable adaptive sync. Default is no.
|
||||
|
||||
# FOCUS
|
||||
|
||||
*<focus><followMouse>* [yes|no]
|
||||
|
|
|
|||
|
|
@ -23,11 +23,6 @@ For example, this sets keyboard layout to Swedish:
|
|||
XKB_DEFAULT_LAYOUT=se
|
||||
```
|
||||
|
||||
The following environment variables are supported by labwc:
|
||||
|
||||
*LABWC_ADAPTIVE_SYNC*
|
||||
Set to 1 enable adaptive sync
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
labwc(1)
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
<core>
|
||||
<decoration>server</decoration>
|
||||
<gap>0</gap>
|
||||
<adaptiveSync>no</adaptiveSync>
|
||||
</core>
|
||||
|
||||
<!--
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
struct rcxml {
|
||||
bool xdg_shell_server_side_deco;
|
||||
int gap;
|
||||
bool adaptive_sync;
|
||||
bool focus_follow_mouse;
|
||||
bool raise_on_focus;
|
||||
char *theme_name;
|
||||
|
|
|
|||
|
|
@ -292,6 +292,8 @@ entry(xmlNode *node, char *nodename, char *content)
|
|||
}
|
||||
} else if (!strcmp(nodename, "gap.core")) {
|
||||
rc.gap = atoi(content);
|
||||
} else if (!strcmp(nodename, "adaptiveSync.core")) {
|
||||
rc.adaptive_sync = get_bool(content);
|
||||
} else if (!strcmp(nodename, "name.theme")) {
|
||||
rc.theme_name = strdup(content);
|
||||
} else if (!strcmp(nodename, "cornerradius.theme")) {
|
||||
|
|
|
|||
|
|
@ -994,8 +994,9 @@ new_output_notify(struct wl_listener *listener, void *data)
|
|||
* TODO: support configuration in run-time
|
||||
*/
|
||||
|
||||
if (getenv("LABWC_ADAPTIVE_SYNC")) {
|
||||
wlr_log(WLR_INFO, "enable adaptive sync on %s", wlr_output->name);
|
||||
if (rc.adaptive_sync) {
|
||||
wlr_log(WLR_INFO, "enable adaptive sync on %s",
|
||||
wlr_output->name);
|
||||
wlr_output_enable_adaptive_sync(wlr_output, true);
|
||||
}
|
||||
wlr_output_layout_add_auto(server->output_layout, wlr_output);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue