mirror of
https://github.com/labwc/labwc.git
synced 2026-03-26 07:58:08 -04:00
xwayland: Add xwayland.h and move more things to xwayland.c
- Move xwayland-specific struct definitions to new xwayland.h header - Move xwayland_move_sub_views_to_front() from desktop.c to xwayland.c - Split out xwayland_server_init/finish() from server_init/finish() - Rename new_xwayland_surface -> xwayland_new_surface and xwayland_surface_new() -> handle_new_surface() for consistency - Add "mapped" argument to xwayland_unmanaged_create() so that we can make unmanaged_handle_map() private to xwayland-unmanaged.c
This commit is contained in:
parent
b62159fe06
commit
45e0a4f48c
8 changed files with 179 additions and 152 deletions
|
|
@ -1,8 +1,10 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#include <assert.h>
|
||||
#include <wlr/xwayland.h>
|
||||
#include "common/list.h"
|
||||
#include "common/mem.h"
|
||||
#include "labwc.h"
|
||||
#include "xwayland.h"
|
||||
|
||||
static void
|
||||
unmanaged_handle_request_configure(struct wl_listener *listener, void *data)
|
||||
|
|
@ -30,7 +32,7 @@ unmanaged_handle_set_geometry(struct wl_listener *listener, void *data)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
unmanaged_handle_map(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct xwayland_unmanaged *unmanaged =
|
||||
|
|
@ -140,9 +142,9 @@ unmanaged_handle_request_activate(struct wl_listener *listener, void *data)
|
|||
wlr_log(WLR_DEBUG, "request_activate not handled\n");
|
||||
}
|
||||
|
||||
struct xwayland_unmanaged *
|
||||
void
|
||||
xwayland_unmanaged_create(struct server *server,
|
||||
struct wlr_xwayland_surface *xsurface)
|
||||
struct wlr_xwayland_surface *xsurface, bool mapped)
|
||||
{
|
||||
struct xwayland_unmanaged *unmanaged = znew(*unmanaged);
|
||||
unmanaged->server = server;
|
||||
|
|
@ -170,5 +172,7 @@ xwayland_unmanaged_create(struct server *server,
|
|||
&unmanaged->request_activate);
|
||||
unmanaged->request_activate.notify = unmanaged_handle_request_activate;
|
||||
|
||||
return unmanaged;
|
||||
if (mapped) {
|
||||
unmanaged_handle_map(&unmanaged->map, xsurface);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue