cleaned up some comments + print debug statements

This commit is contained in:
William McKinnon 2024-02-07 02:20:39 -05:00
parent 9de0237b20
commit b1c8ff5f58
3 changed files with 4 additions and 8 deletions

View file

@ -765,7 +765,6 @@ static void render_view_popups(struct sway_view *view, struct sway_output *outpu
static void render_saved_view(struct sway_view *view, struct sway_output *output, static void render_saved_view(struct sway_view *view, struct sway_output *output,
pixman_region32_t *damage, struct decoration_data deco_data) { pixman_region32_t *damage, struct decoration_data deco_data) {
printf("rendering saved view\n");
struct wlr_output *wlr_output = output->wlr_output; struct wlr_output *wlr_output = output->wlr_output;
if (wl_list_empty(&view->saved_buffers)) { if (wl_list_empty(&view->saved_buffers)) {
@ -874,11 +873,8 @@ static void render_view(struct sway_output *output, pixman_region32_t *damage,
// render view // render view
if (!wl_list_empty(&view->saved_buffers)) { if (!wl_list_empty(&view->saved_buffers)) {
printf("rendering saved view\n");
render_saved_view(view, output, damage, deco_data); render_saved_view(view, output, damage, deco_data);
} else if (view->surface) { } else if (view->surface) {
printf("rendering view toplevels\n");
render_view_toplevels(view, output, damage, deco_data); render_view_toplevels(view, output, damage, deco_data);
} }
@ -1806,7 +1802,6 @@ void output_render(struct sway_output *output, struct timespec *when,
struct wlr_output *wlr_output = output->wlr_output; struct wlr_output *wlr_output = output->wlr_output;
struct fx_renderer *renderer = output->renderer; struct fx_renderer *renderer = output->renderer;
printf("rendering output\n");
struct sway_workspace *workspace = output->current.active_workspace; struct sway_workspace *workspace = output->current.active_workspace;
if (workspace == NULL) { if (workspace == NULL) {
return; return;
@ -1985,7 +1980,6 @@ void output_render(struct sway_output *output, struct timespec *when,
render_output_blur(output, damage); render_output_blur(output, damage);
} }
printf("rendering workspace\n");
render_workspace(output, damage, workspace, workspace->current.focused); render_workspace(output, damage, workspace, workspace->current.focused);
render_floating(output, damage); render_floating(output, damage);
#if HAVE_XWAYLAND #if HAVE_XWAYLAND

View file

@ -681,7 +681,7 @@ size_t container_build_representation(enum sway_container_layout layout,
} }
struct sway_container *child = children->items[i]; struct sway_container *child = children->items[i];
const char *identifier = NULL; const char *identifier = NULL;
if (child->view) { if (child->view && child->view->surface) {
identifier = view_get_class(child->view); identifier = view_get_class(child->view);
if (!identifier) { if (!identifier) {
identifier = view_get_app_id(child->view); identifier = view_get_app_id(child->view);

View file

@ -947,12 +947,14 @@ void view_unmap(struct sway_view *view) {
if (!config->animation_duration) { if (!config->animation_duration) {
view_remove_container(view); view_remove_container(view);
} else { } else {
// unfocus the view
// look at handle_seat_node_destroy
view_save_buffer(view); view_save_buffer(view);
view->container->target_alpha = 0; view->container->target_alpha = 0;
wl_event_source_timer_update(view->container->animation_present_timer, 50); wl_event_source_timer_update(view->container->animation_present_timer, 50);
} }
// TODO: deactivate input / focus
struct sway_seat *seat; struct sway_seat *seat;
wl_list_for_each(seat, &server.input->seats, link) { wl_list_for_each(seat, &server.input->seats, link) {
seat->cursor->image_surface = NULL; seat->cursor->image_surface = NULL;