mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
wlr_wl_shell: implement all requests except set_popup
This commit is contained in:
parent
e001e40022
commit
663bfe4cd8
4 changed files with 262 additions and 40 deletions
|
|
@ -10,17 +10,30 @@
|
|||
#include "rootston/server.h"
|
||||
#include "rootston/input.h"
|
||||
|
||||
static void handle_destroy(struct wl_listener *listener, void *data) {
|
||||
struct roots_wl_shell_surface *roots_surface =
|
||||
wl_container_of(listener, roots_surface, destroy);
|
||||
wl_list_remove(&roots_surface->destroy.link);
|
||||
wl_list_remove(&roots_surface->ping_timeout.link);
|
||||
view_destroy(roots_surface->view);
|
||||
free(roots_surface);
|
||||
}
|
||||
|
||||
void handle_wl_shell_surface(struct wl_listener *listener, void *data) {
|
||||
struct roots_desktop *desktop =
|
||||
wl_container_of(listener, desktop, wl_shell_surface);
|
||||
|
||||
struct wlr_wl_shell_surface *surface = data;
|
||||
wlr_log(L_DEBUG, "new wl_shell surface");
|
||||
//wlr_wl_shell_surface_ping(surface);
|
||||
wlr_log(L_DEBUG, "new shell surface: title=%s, class=%s",
|
||||
surface->title, surface->class_);
|
||||
//wlr_wl_shell_surface_ping(surface); // TODO: segfaults
|
||||
|
||||
struct roots_wl_shell_surface *roots_surface =
|
||||
calloc(1, sizeof(struct roots_wl_shell_surface));
|
||||
// TODO: all of the trimmings
|
||||
wl_list_init(&roots_surface->destroy.link);
|
||||
roots_surface->destroy.notify = handle_destroy;
|
||||
wl_list_init(&roots_surface->ping_timeout.link);
|
||||
|
||||
struct roots_view *view = calloc(1, sizeof(struct roots_view));
|
||||
view->type = ROOTS_WL_SHELL_VIEW;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue