mirror of
https://github.com/labwc/labwc.git
synced 2026-02-22 01:40:25 -05:00
labwc.h: remove "extern struct server server"
This commit is contained in:
parent
84ebd2dae5
commit
e99d0bb34e
11 changed files with 62 additions and 47 deletions
|
|
@ -26,7 +26,8 @@ static void unmanaged_handle_map(struct wl_listener *listener, void *data)
|
|||
wl_container_of(listener, unmanaged, map);
|
||||
struct wlr_xwayland_surface *xsurface = unmanaged->xwayland_surface;
|
||||
|
||||
wl_list_insert(server.unmanaged_surfaces.prev, &unmanaged->link);
|
||||
wl_list_insert(unmanaged->server->unmanaged_surfaces.prev,
|
||||
&unmanaged->link);
|
||||
|
||||
wl_signal_add(&xsurface->surface->events.commit, &unmanaged->commit);
|
||||
unmanaged->commit.notify = unmanaged_handle_commit;
|
||||
|
|
@ -46,9 +47,10 @@ static void unmanaged_handle_unmap(struct wl_listener *listener, void *data)
|
|||
wl_list_remove(&unmanaged->link);
|
||||
wl_list_remove(&unmanaged->commit.link);
|
||||
|
||||
if (server.seat->keyboard_state.focused_surface == xsurface->surface) {
|
||||
if (seat_focused_surface() == xsurface->surface) {
|
||||
struct xwayland_unmanaged *u;
|
||||
wl_list_for_each (u, &server.unmanaged_surfaces, link) {
|
||||
struct wl_list *list = &unmanaged->server->unmanaged_surfaces;
|
||||
wl_list_for_each (u, list, link) {
|
||||
struct wlr_xwayland_surface *prev = u->xwayland_surface;
|
||||
if (!wlr_xwayland_or_surface_wants_focus(prev))
|
||||
continue;
|
||||
|
|
@ -68,10 +70,12 @@ static void unmanaged_handle_destroy(struct wl_listener *listener, void *data)
|
|||
free(unmanaged);
|
||||
}
|
||||
|
||||
void xwayland_unmanaged_create(struct wlr_xwayland_surface *xsurface)
|
||||
void xwayland_unmanaged_create(struct server *server,
|
||||
struct wlr_xwayland_surface *xsurface)
|
||||
{
|
||||
struct xwayland_unmanaged *unmanaged;
|
||||
unmanaged = calloc(1, sizeof(struct xwayland_unmanaged));
|
||||
unmanaged->server = server;
|
||||
unmanaged->xwayland_surface = xsurface;
|
||||
wl_signal_add(&xsurface->events.request_configure,
|
||||
&unmanaged->request_configure);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue