xwayland: use wlr_xwayland_surface_has_window_type()

This eliminates a bit of logic, including an extra XWayland connection.

See also:
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4553
This commit is contained in:
John Lindgren 2025-05-21 11:43:50 -04:00 committed by Johan Malm
parent a3d6226728
commit fd5031731e
4 changed files with 52 additions and 99 deletions

View file

@ -4,39 +4,12 @@
#include "config.h"
#if HAVE_XWAYLAND
#include <assert.h>
#include <stdbool.h>
#include <xcb/xcb.h>
#include "common/macros.h"
#include "view.h"
struct wlr_compositor;
struct wlr_output;
struct wlr_output_layout;
static const char * const atom_names[] = {
"_NET_WM_WINDOW_TYPE_DESKTOP",
"_NET_WM_WINDOW_TYPE_DOCK",
"_NET_WM_WINDOW_TYPE_TOOLBAR",
"_NET_WM_WINDOW_TYPE_MENU",
"_NET_WM_WINDOW_TYPE_UTILITY",
"_NET_WM_WINDOW_TYPE_SPLASH",
"_NET_WM_WINDOW_TYPE_DIALOG",
"_NET_WM_WINDOW_TYPE_DROPDOWN_MENU",
"_NET_WM_WINDOW_TYPE_POPUP_MENU",
"_NET_WM_WINDOW_TYPE_TOOLTIP",
"_NET_WM_WINDOW_TYPE_NOTIFICATION",
"_NET_WM_WINDOW_TYPE_COMBO",
"_NET_WM_WINDOW_TYPE_DND",
"_NET_WM_WINDOW_TYPE_NORMAL",
};
static_assert(
ARRAY_SIZE(atom_names) == WINDOW_TYPE_LEN,
"Xwayland atoms out of sync");
extern xcb_atom_t atoms[WINDOW_TYPE_LEN];
struct xwayland_unmanaged {
struct server *server;
struct wlr_xwayland_surface *xwayland_surface;