Skip to content

Commit

Permalink
Merge pull request #46 from migueldeoleiros/bugfix/ci-set-size-flakyness
Browse files Browse the repository at this point in the history
fix regression from previous set_size fix
  • Loading branch information
migueldeoleiros authored Oct 31, 2024
2 parents c0d07ea + 02f1d40 commit 8a4b3d4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/toplevel.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "src/workspace.h"
#include "wlr/util/log.h"
#include <stdlib.h>
#include <string.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_xcursor_manager.h>
Expand Down Expand Up @@ -117,9 +118,13 @@ void toplevel_resize(
wlr_scene_node_set_position(&toplevel->scene_tree->node,
toplevel->geometry.x, toplevel->geometry.y);

if (strcmp(getenv("TURTILE_BACKEND"), "headless") != 0)
wlr_xdg_toplevel_set_size(toplevel->xdg_toplevel, toplevel->geometry.width,
toplevel->geometry.height);
const char *backend = getenv("TURTILE_BACKEND");
if(backend && strcmp(backend, "headless") == 0)
wlr_log(WLR_ERROR, "No resize on headless mode");
else
wlr_xdg_toplevel_set_size(toplevel->xdg_toplevel,
toplevel->geometry.width,
toplevel->geometry.height);
}

void xdg_toplevel_map(struct wl_listener *listener, void *data) {
Expand Down

0 comments on commit 8a4b3d4

Please sign in to comment.