mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 05:53:40 +00:00
[client] x11: fix failure to paste clipboard into the guest
The clipboard atoms may not exist yet and as such we must create them if this is the case. Failure to do so results in `SEL_DATA` being zero breaking the clipboard paste mechanics
This commit is contained in:
parent
ec81a353c2
commit
9015706fcb
@ -24,7 +24,8 @@ struct X11DSAtoms x11atoms = { 0 };
|
||||
|
||||
void X11AtomsInit(void)
|
||||
{
|
||||
#define DEF_ATOM(x) x11atoms.x = XInternAtom(x11.display, #x, True);
|
||||
#define DEF_ATOM(x, onlyIfExists) \
|
||||
x11atoms.x = XInternAtom(x11.display, #x, onlyIfExists);
|
||||
DEF_ATOMS()
|
||||
#undef DEF_ATOM
|
||||
}
|
||||
|
@ -21,26 +21,26 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#define _H_X11DS_ATOMS_
|
||||
|
||||
#define DEF_ATOMS() \
|
||||
DEF_ATOM(_NET_REQUEST_FRAME_EXTENTS) \
|
||||
DEF_ATOM(_NET_FRAME_EXTENTS) \
|
||||
DEF_ATOM(_NET_WM_STATE) \
|
||||
DEF_ATOM(_NET_WM_STATE_FULLSCREEN) \
|
||||
DEF_ATOM(_NET_WM_STATE_MAXIMIZED_HORZ) \
|
||||
DEF_ATOM(_NET_WM_STATE_MAXIMIZED_VERT) \
|
||||
DEF_ATOM(_NET_WM_WINDOW_TYPE) \
|
||||
DEF_ATOM(_NET_WM_WINDOW_TYPE_NORMAL) \
|
||||
DEF_ATOM(_NET_WM_WINDOW_TYPE_UTILITY) \
|
||||
DEF_ATOM(WM_DELETE_WINDOW) \
|
||||
DEF_ATOM(_MOTIF_WM_HINTS) \
|
||||
DEF_ATOM(_NET_REQUEST_FRAME_EXTENTS, True) \
|
||||
DEF_ATOM(_NET_FRAME_EXTENTS, True) \
|
||||
DEF_ATOM(_NET_WM_STATE, True) \
|
||||
DEF_ATOM(_NET_WM_STATE_FULLSCREEN, True) \
|
||||
DEF_ATOM(_NET_WM_STATE_MAXIMIZED_HORZ, True) \
|
||||
DEF_ATOM(_NET_WM_STATE_MAXIMIZED_VERT, True) \
|
||||
DEF_ATOM(_NET_WM_WINDOW_TYPE, True) \
|
||||
DEF_ATOM(_NET_WM_WINDOW_TYPE_NORMAL, True) \
|
||||
DEF_ATOM(_NET_WM_WINDOW_TYPE_UTILITY, True) \
|
||||
DEF_ATOM(WM_DELETE_WINDOW, True) \
|
||||
DEF_ATOM(_MOTIF_WM_HINTS, True) \
|
||||
\
|
||||
DEF_ATOM(CLIPBOARD) \
|
||||
DEF_ATOM(TARGETS) \
|
||||
DEF_ATOM(SEL_DATA) \
|
||||
DEF_ATOM(INCR)
|
||||
DEF_ATOM(CLIPBOARD, False) \
|
||||
DEF_ATOM(TARGETS, False) \
|
||||
DEF_ATOM(SEL_DATA, False) \
|
||||
DEF_ATOM(INCR, False)
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#define DEF_ATOM(x) Atom x;
|
||||
#define DEF_ATOM(x, onlyIfExists) Atom x;
|
||||
struct X11DSAtoms
|
||||
{
|
||||
DEF_ATOMS()
|
||||
|
Loading…
Reference in New Issue
Block a user