]> git.mdlowis.com Git - proto/labwc.git/commitdiff
output: fix invisible cursor after wlopm --off && wlopm --on
authorJohn Lindgren <john@jlindgren.net>
Wed, 11 Oct 2023 04:08:52 +0000 (00:08 -0400)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Wed, 11 Oct 2023 18:12:34 +0000 (20:12 +0200)
Use the same fix/workaround as in output_update_for_layout_change() to
make sure that the cursor is also visible after (re-)enabling an output
in handle_output_power_manager_set_mode().

src/output.c

index c60328c32460805133a05948347763ff9e4e2e8b..9074b94fe7c9a0adcb15377ebcd2af03e394bf3f 100644 (file)
@@ -568,6 +568,8 @@ output_usable_area_in_layout_coords(struct output *output)
 void
 handle_output_power_manager_set_mode(struct wl_listener *listener, void *data)
 {
+       struct server *server = wl_container_of(listener, server,
+               output_power_manager_set_mode);
        struct wlr_output_power_v1_set_mode_event *event = data;
 
        switch (event->mode) {
@@ -581,6 +583,11 @@ handle_output_power_manager_set_mode(struct wl_listener *listener, void *data)
                        wlr_output_rollback(event->output);
                }
                wlr_output_commit(event->output);
+               /*
+                * Re-set the cursor image so that the cursor
+                * isn't invisible on the newly enabled output.
+                */
+               cursor_update_image(&server->seat);
                break;
        }
 }