Commit 54d15553 authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz

Merge branch 'fixes' into 'librem5'

Interim fixes

See merge request !39
parents 71d11894 71a3031d
Pipeline #2166 passed with stage
in 1 minute and 18 seconds
......@@ -423,7 +423,8 @@ static void render_output(struct roots_output *output) {
output_box->y;
view_move(view, view_x, view_y);
if (has_standalone_surface(view)) {
if (has_standalone_surface(view) &&
wl_list_empty(&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY])) {
wlr_output_set_fullscreen_surface(wlr_output, view->wlr_surface);
} else {
wlr_output_set_fullscreen_surface(wlr_output, NULL);
......
......@@ -27,6 +27,9 @@ static void idle_timeout_destroy(struct wlr_idle_timeout *timer) {
static int idle_notify(void *data) {
struct wlr_idle_timeout *timer = data;
if (timer->idle_state) {
return 0;
}
timer->idle_state = true;
org_kde_kwin_idle_timeout_send_idle(timer->resource);
return 1;
......@@ -36,13 +39,18 @@ static void handle_activity(struct wlr_idle_timeout *timer) {
if (!timer->enabled) {
return;
}
// rearm the timer
wl_event_source_timer_update(timer->idle_source, timer->timeout);
// in case the previous state was sleeping send a resume event and switch state
if (timer->idle_state) {
timer->idle_state = false;
org_kde_kwin_idle_timeout_send_resumed(timer->resource);
}
// rearm the timer
wl_event_source_timer_update(timer->idle_source, timer->timeout);
if (timer->timeout == 0) {
idle_notify(timer);
}
}
static void handle_timer_resource_destroy(struct wl_resource *timer_resource) {
......@@ -142,6 +150,9 @@ static void create_idle_timer(struct wl_client *client,
if (timer->enabled) {
// arm the timer
wl_event_source_timer_update(timer->idle_source, timer->timeout);
if (timer->timeout == 0) {
idle_notify(timer);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment