Commit 032bdc9f authored by Ulrich Czekalla's avatar Ulrich Czekalla Committed by Alexandre Julliard

Initial implementation to support XDND protocol.

parent 5a2f3c1f
......@@ -35,6 +35,7 @@ C_SRCS = \
winpos.c \
x11ddraw.c \
x11drv_main.c \
xdnd.c \
xrandr.c \
xrender.c \
xvidmode.c
......
......@@ -1227,7 +1227,8 @@ static void EVENT_ClientMessage( HWND hWnd, XClientMessageEvent *event )
else if (event->data.l[0] == DndURL)
EVENT_DropURLs(hWnd, event);
}
else {
else if (!X11DRV_XDND_Event(hWnd, event))
{
#if 0
/* enable this if you want to see the message */
unsigned char* p_data = NULL;
......
......@@ -81,7 +81,24 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
"_NET_WM_PID",
"_NET_WM_PING",
"_NET_WM_NAME",
"XdndAware",
"XdndEnter",
"XdndPosition",
"XdndStatus",
"XdndLeave",
"XdndFinished",
"XdndDrop",
"XdndActionCopy",
"XdndActionMove",
"XdndActionLink",
"XdndActionAsk",
"XdndActionPrivate",
"XdndSelection",
"XdndTarget",
"XdndTypeList",
"image/gif",
"text/html",
"text/plain",
"text/rtf",
"text/richtext"
};
......@@ -356,6 +373,7 @@ void X11DRV_set_wm_hints( Display *display, WND *win )
XWMHints* wm_hints;
Atom protocols[3];
MwmHints mwm_hints;
Atom dndVersion = 4;
int i;
wine_tsx11_lock();
......@@ -428,6 +446,9 @@ void X11DRV_set_wm_hints( Display *display, WND *win )
x11drv_atom(_MOTIF_WM_HINTS), 32, PropModeReplace,
(char*)&mwm_hints, sizeof(mwm_hints)/sizeof(long) );
XChangeProperty( display, data->whole_window, x11drv_atom(XdndAware),
XA_ATOM, 32, PropModeReplace, (unsigned char*)&dndVersion, 1 );
wm_hints = XAllocWMHints();
wine_tsx11_unlock();
......
......@@ -231,6 +231,8 @@ extern void X11DRV_XRender_UpdateDrawable(X11DRV_PDEVICE *physDev);
extern void X11DRV_OpenGL_Init(Display *display);
extern XVisualInfo *X11DRV_setup_opengl_visual(Display *display);
extern int X11DRV_XDND_Event(HWND hWnd, XClientMessageEvent *event);
/* exported dib functions for now */
/* Additional info for DIB section objects */
......@@ -390,7 +392,24 @@ enum x11drv_atoms
XATOM__NET_WM_PID,
XATOM__NET_WM_PING,
XATOM__NET_WM_NAME,
XATOM_XdndAware,
XATOM_XdndEnter,
XATOM_XdndPosition,
XATOM_XdndStatus,
XATOM_XdndLeave,
XATOM_XdndFinished,
XATOM_XdndDrop,
XATOM_XdndActionCopy,
XATOM_XdndActionMove,
XATOM_XdndActionLink,
XATOM_XdndActionAsk,
XATOM_XdndActionPrivate,
XATOM_XdndSelection,
XATOM_XdndTarget,
XATOM_XdndTypeList,
XATOM_image_gif,
XATOM_text_html,
XATOM_text_plain,
XATOM_text_rtf,
XATOM_text_richtext,
NB_XATOMS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment