diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-09-14 15:58:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-14 15:58:09 -0400 |
commit | d549dc327e7670a54ed7f4e09f4abe062abf28a5 (patch) | |
tree | 110100d8ba1fcb662739d96bb1f6773dc103e06f | |
parent | 769a8e9917ab0f04404843fb712a6b0b0434c966 (diff) | |
parent | 524702eb162e5c5cb6198bb7c1e4bb38ce50a090 (diff) |
Merge pull request #1240 from emersion/no-hardware-cursors
output: introduce WLR_NO_HARDWARE_CURSORS
-rw-r--r-- | docs/env_vars.md | 2 | ||||
-rw-r--r-- | types/wlr_output.c | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/docs/env_vars.md b/docs/env_vars.md index b28849cc..34d91579 100644 --- a/docs/env_vars.md +++ b/docs/env_vars.md @@ -14,6 +14,8 @@ wlroots specific * *WLR_X11_OUTPUTS*: when using the X11 backend specifies the number of outputs * *WLR_HEADLESS_OUTPUTS*: when using the headless backend specifies the number of outputs +* *WLR_NO_HARDWARE_CURSORS*: set to 1 to use software cursors instead of + hardware cursors rootston specific ------------------ diff --git a/types/wlr_output.c b/types/wlr_output.c index abbdab9c..3a911f4b 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -720,6 +720,13 @@ static bool output_cursor_attempt_hardware(struct wlr_output_cursor *cursor) { transform = cursor->surface->current.transform; } + const char *no_hardware_cursors = getenv("WLR_NO_HARDWARE_CURSORS"); + if (no_hardware_cursors != NULL && strcmp(no_hardware_cursors, "1") == 0) { + wlr_log(WLR_DEBUG, + "WLR_NO_HARDWARE_CURSORS set, forcing software cursors"); + return false; + } + struct wlr_output_cursor *hwcur = cursor->output->hardware_cursor; if (cursor->output->impl->set_cursor && (hwcur == NULL || hwcur == cursor)) { // If the cursor was hidden or was a software cursor, the hardware |