mirror of
https://github.com/wizbright/waybox.git
synced 2025-10-29 05:40:20 -04:00
react to wlroots changes
This commit is contained in:
parent
f967bfae17
commit
3a64d3955c
5 changed files with 13 additions and 5 deletions
|
|
@ -29,9 +29,9 @@ inc_dir = include_directories('include')
|
||||||
libevdev = dependency('libevdev')
|
libevdev = dependency('libevdev')
|
||||||
libinput = dependency('libinput', version: '>=1.21.0')
|
libinput = dependency('libinput', version: '>=1.21.0')
|
||||||
libxml2 = dependency('libxml-2.0')
|
libxml2 = dependency('libxml-2.0')
|
||||||
wlroots = dependency('wlroots', version: '>=0.17.0')
|
|
||||||
wayland_server = dependency('wayland-server', version: '>=1.15')
|
|
||||||
wayland_protos = dependency('wayland-protocols', version: '>=1.27')
|
wayland_protos = dependency('wayland-protocols', version: '>=1.27')
|
||||||
|
wayland_server = dependency('wayland-server', version: '>=1.15')
|
||||||
|
wlroots = dependency('wlroots', version: '>=0.17.0')
|
||||||
xkbcommon = dependency('xkbcommon')
|
xkbcommon = dependency('xkbcommon')
|
||||||
|
|
||||||
msgfmt = find_program('msgfmt', required: false)
|
msgfmt = find_program('msgfmt', required: false)
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ protocols = [
|
||||||
[wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'],
|
[wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'],
|
||||||
[wl_protocol_dir, 'staging/ext-idle-notify/ext-idle-notify-v1.xml'],
|
[wl_protocol_dir, 'staging/ext-idle-notify/ext-idle-notify-v1.xml'],
|
||||||
[wl_protocol_dir, 'unstable/idle-inhibit/idle-inhibit-unstable-v1.xml'],
|
[wl_protocol_dir, 'unstable/idle-inhibit/idle-inhibit-unstable-v1.xml'],
|
||||||
[wl_protocol_dir, 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml'],
|
|
||||||
[wl_protocol_dir, 'unstable/primary-selection/primary-selection-unstable-v1.xml'],
|
[wl_protocol_dir, 'unstable/primary-selection/primary-selection-unstable-v1.xml'],
|
||||||
[wl_protocol_dir, 'unstable/xdg-decoration/xdg-decoration-unstable-v1.xml'],
|
[wl_protocol_dir, 'unstable/xdg-decoration/xdg-decoration-unstable-v1.xml'],
|
||||||
[wl_protocol_dir, 'unstable/xdg-output/xdg-output-unstable-v1.xml'],
|
[wl_protocol_dir, 'unstable/xdg-output/xdg-output-unstable-v1.xml'],
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,11 @@ static void handle_cursor_button(struct wl_listener *listener, void *data) {
|
||||||
struct wlr_surface *surface = NULL;
|
struct wlr_surface *surface = NULL;
|
||||||
struct wb_toplevel *toplevel = get_toplevel_at(cursor->server,
|
struct wb_toplevel *toplevel = get_toplevel_at(cursor->server,
|
||||||
cursor->server->cursor->cursor->x, cursor->server->cursor->cursor->y, &surface, &sx, &sy);
|
cursor->server->cursor->cursor->x, cursor->server->cursor->cursor->y, &surface, &sx, &sy);
|
||||||
|
#if WLR_CHECK_VERSION(0, 18, 0)
|
||||||
|
if (event->state == WL_POINTER_BUTTON_STATE_RELEASED) {
|
||||||
|
#else
|
||||||
if (event->state == WLR_BUTTON_RELEASED) {
|
if (event->state == WLR_BUTTON_RELEASED) {
|
||||||
|
#endif
|
||||||
/* If you released any buttons, we exit interactive move/resize mode. */
|
/* If you released any buttons, we exit interactive move/resize mode. */
|
||||||
reset_cursor_mode(cursor->server);
|
reset_cursor_mode(cursor->server);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,9 @@ bool wb_terminate(struct wb_server* server) {
|
||||||
deinit_config(server->config);
|
deinit_config(server->config);
|
||||||
wl_display_destroy_clients(server->wl_display);
|
wl_display_destroy_clients(server->wl_display);
|
||||||
wlr_output_layout_destroy(server->output_layout);
|
wlr_output_layout_destroy(server->output_layout);
|
||||||
|
wlr_allocator_destroy(server->allocator);
|
||||||
|
wlr_renderer_destroy(server->renderer);
|
||||||
|
wlr_backend_destroy(server->backend);
|
||||||
wl_display_destroy(server->wl_display);
|
wl_display_destroy(server->wl_display);
|
||||||
wb_seat_destroy(server->seat);
|
wb_seat_destroy(server->seat);
|
||||||
wlr_scene_node_destroy(&server->scene->tree.node);
|
wlr_scene_node_destroy(&server->scene->tree.node);
|
||||||
|
|
|
||||||
|
|
@ -330,9 +330,10 @@ static void xdg_toplevel_request_resize(
|
||||||
|
|
||||||
static void xdg_popup_commit(struct wl_listener *listener, void *data) {
|
static void xdg_popup_commit(struct wl_listener *listener, void *data) {
|
||||||
struct wb_popup *popup = wl_container_of(listener, popup, commit);
|
struct wb_popup *popup = wl_container_of(listener, popup, commit);
|
||||||
|
if (!popup->xdg_popup) return;
|
||||||
struct wlr_xdg_surface *base = popup->xdg_popup->base;
|
struct wlr_xdg_surface *base = popup->xdg_popup->base;
|
||||||
|
|
||||||
if (base->initial_commit) {
|
if (base && base->initial_commit) {
|
||||||
update_fractional_scale(base->surface);
|
update_fractional_scale(base->surface);
|
||||||
wlr_xdg_surface_schedule_configure(base);
|
wlr_xdg_surface_schedule_configure(base);
|
||||||
}
|
}
|
||||||
|
|
@ -340,7 +341,8 @@ static void xdg_popup_commit(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
static void xdg_popup_destroy(struct wl_listener *listener, void *data) {
|
static void xdg_popup_destroy(struct wl_listener *listener, void *data) {
|
||||||
struct wb_popup *popup = wl_container_of(listener, popup, destroy);
|
struct wb_popup *popup = wl_container_of(listener, popup, destroy);
|
||||||
update_fractional_scale(popup->xdg_popup->base->surface);
|
if (popup->xdg_popup)
|
||||||
|
update_fractional_scale(popup->xdg_popup->base->surface);
|
||||||
|
|
||||||
wl_list_remove(&popup->commit.link);
|
wl_list_remove(&popup->commit.link);
|
||||||
wl_list_remove(&popup->destroy.link);
|
wl_list_remove(&popup->destroy.link);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue