decompose wl_backend.c: extract wl_xdisplay.c
This commit is contained in:
parent
bce1aaa62c
commit
dceb0cf55b
|
|
@ -177,7 +177,8 @@ wmaker_SOURCES += \
|
|||
backend/wayland/wl_focus.c \
|
||||
backend/wayland/wl_screen.c \
|
||||
backend/wayland/wl_shm.c \
|
||||
backend/wayland/wl_wings.c
|
||||
backend/wayland/wl_wings.c \
|
||||
backend/wayland/wl_xdisplay.c
|
||||
endif
|
||||
|
||||
if USE_NESTED_FUNC
|
||||
|
|
|
|||
|
|
@ -2145,14 +2145,7 @@ wl_handle_x11_events(int fd, uint32_t mask, void *data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Public accessor for the XWayland Display* — used by screen.c to create
|
||||
* an RContext for texture rendering without exposing wl_state globally. */
|
||||
Display *wl_get_x_display(void)
|
||||
{
|
||||
return wl_state.x_display;
|
||||
}
|
||||
|
||||
static void *
|
||||
void *
|
||||
wl_display_open(const char *name)
|
||||
{
|
||||
const char *sock;
|
||||
|
|
|
|||
|
|
@ -554,3 +554,4 @@ void wm_shm_surface_commit(struct wm_shm_surface *s, struct wlr_scene_tree *pare
|
|||
void wm_shm_surface_destroy(struct wm_shm_surface *s);
|
||||
WMScreen *wl_get_wmscreen(void);
|
||||
void wl_wings_dispatch(int timeout_ms, void *ud);
|
||||
Display *wl_get_x_display(void);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <X11/Xlib.h>
|
||||
#include "wl_types.h"
|
||||
|
||||
|
||||
/* Public accessor for the XWayland Display* — used by screen.c to create
|
||||
* an RContext for texture rendering without exposing wl_state globally. */
|
||||
Display *wl_get_x_display(void)
|
||||
{
|
||||
return wl_state.x_display;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue