Files
absinthe/src/xdg-toplevel.c
T

30 lines
893 B
C
Raw Normal View History

2026-04-01 17:42:16 +07:00
#include <assert.h>
#include <stdlib.h>
2026-01-02 22:53:34 +07:00
#include <wayland-server-core.h>
2026-01-07 20:35:41 +07:00
#include <wlr/util/log.h>
2026-01-02 22:53:34 +07:00
2026-01-06 01:41:46 +07:00
#include "absinthe-toplevel.h"
2026-04-03 17:13:34 +07:00
#include "layout.h"
#include "output.h"
#include "types.h"
2026-04-03 17:13:34 +07:00
#include "xdg-decoration.h"
2026-01-04 18:07:28 +07:00
void xdg_toplevel_commit(struct wl_listener *listener, void *data)
{
2026-04-26 14:31:03 +07:00
UNUSED(data);
2026-04-25 14:09:14 +07:00
struct absinthe_toplevel *toplevel = wl_container_of(listener, toplevel, commit);
2026-01-04 18:07:28 +07:00
2026-04-25 14:09:14 +07:00
if (toplevel->toplevel.xdg->base->initial_commit) {
2026-04-25 18:37:08 +07:00
wlr_xdg_toplevel_set_activated(toplevel->toplevel.xdg, false);
2026-01-08 22:44:24 +07:00
2026-04-25 14:09:14 +07:00
/* Forse server side decoration mode */
if (toplevel->decoration)
xdg_decoration_request_mode(&toplevel->decoration_request_mode, toplevel->decoration);
toplevel->resizing = wlr_xdg_toplevel_set_size(toplevel->toplevel.xdg, 0, 0);
return;
}
2026-04-21 19:05:37 +07:00
2026-04-25 14:09:14 +07:00
if (toplevel->resizing && toplevel->resizing <= toplevel->toplevel.xdg->base->current.configure_serial)
toplevel->resizing = 0;
2026-01-04 18:07:28 +07:00
}