feat(client): add client_update_scale and layersurface_update_scale

- client_update_scale(): re-notifies clients when output scale changes
  using current_outputs max scale (avoids stale c->mon for floating windows)
- layersurface_update_scale(): same logic for layer shell surfaces (static)
- Initialize current_scale on initial commit for both surface types
- Uses 0.001f tolerance for float comparison to prevent redundant events
- Falls back to c->mon->wlr_output->scale if no current_outputs
This commit is contained in:
2026-07-05 21:36:41 -04:00
parent 8b91bc939c
commit 4e388d9f4f
3 changed files with 61 additions and 0 deletions
+1
View File
@@ -130,6 +130,7 @@ void client_send_close(Client *c);
void client_set_border_color(Client *c, const float color[static 4]);
void client_set_fullscreen(Client *c, int fullscreen);
void client_set_scale(struct wlr_surface *s, float scale);
void client_update_scale(Client *c);
uint32_t client_set_size(Client *c, uint32_t width, uint32_t height);
void client_set_tiled(Client *c, uint32_t edges);
void client_set_suspended(Client *c, int suspended);