mirror of
https://github.com/swaywm/sway.git
synced 2024-11-22 16:01:27 +00:00
swayidle: fix stack overflow on sleep
This commit is contained in:
parent
378697b79d
commit
7ed81cfd36
|
@ -127,7 +127,8 @@ void acquire_sleep_lock() {
|
||||||
|
|
||||||
static int prepare_for_sleep(sd_bus_message *msg, void *userdata,
|
static int prepare_for_sleep(sd_bus_message *msg, void *userdata,
|
||||||
sd_bus_error *ret_error) {
|
sd_bus_error *ret_error) {
|
||||||
bool going_down = true;
|
/* "b" apparently reads into an int, not a bool */
|
||||||
|
int going_down = 1;
|
||||||
int ret = sd_bus_message_read(msg, "b", &going_down);
|
int ret = sd_bus_message_read(msg, "b", &going_down);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
wlr_log(L_ERROR, "Failed to parse D-Bus response for Inhibit: %s",
|
wlr_log(L_ERROR, "Failed to parse D-Bus response for Inhibit: %s",
|
||||||
|
|
Loading…
Reference in a new issue