decompose wl_backend.c: extract wl_atom.c
This commit is contained in:
parent
e47b44ccd0
commit
33f686c79f
|
|
@ -166,7 +166,8 @@ wmaker_SOURCES += \
|
|||
backend/wayland/wl_props.c \
|
||||
backend/wayland/wl_client.c \
|
||||
backend/wayland/wl_icccm.c \
|
||||
backend/wayland/wl_framebuf.c
|
||||
backend/wayland/wl_framebuf.c \
|
||||
backend/wayland/wl_atom.c
|
||||
endif
|
||||
|
||||
if USE_NESTED_FUNC
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <X11/Xlib.h>
|
||||
#include "wl_types.h"
|
||||
|
||||
unsigned long
|
||||
wl_atom_intern(const char *name)
|
||||
{
|
||||
/* The WM's own UI runs on XWayland — it needs real X11 atoms for
|
||||
* property operations (WM_STATE, WM_PROTOCOLS, etc.). */
|
||||
if (wl_state.x_display)
|
||||
return (unsigned long)XInternAtom(wl_state.x_display, name, False);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -3110,15 +3110,6 @@ wl_display_default_screen(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
wl_atom_intern(const char *name)
|
||||
{
|
||||
/* The WM's own UI runs on XWayland — it needs real X11 atoms for
|
||||
* property operations (WM_STATE, WM_PROTOCOLS, etc.). */
|
||||
if (wl_state.x_display)
|
||||
return (unsigned long)XInternAtom(wl_state.x_display, name, False);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
/* Phase 29+: signalfd-based signal handling */
|
||||
|
|
|
|||
|
|
@ -498,3 +498,4 @@ extern const struct wlr_buffer_impl frame_buf_impl;
|
|||
void fb_attach_tree_listener(struct wl_frame_buf *fb);
|
||||
void fb_attach_scene_buf_listener(struct wl_frame_buf *fb);
|
||||
void wl_frame_paint_button(WCoreWindow *button, WTexture *texture, unsigned long color, WPixmap *image, int pushed);
|
||||
unsigned long wl_atom_intern(const char *name);
|
||||
|
|
|
|||
Loading…
Reference in New Issue