diff Gui/wm/ws.c @ 6967:0fa27966ac47

add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
author pontscho
date Sun, 11 Aug 2002 13:12:38 +0000
parents 77980ab4e296
children 09722d199d83
line wrap: on
line diff
--- a/Gui/wm/ws.c	Sun Aug 11 10:52:22 2002 +0000
+++ b/Gui/wm/ws.c	Sun Aug 11 13:12:38 2002 +0000
@@ -21,6 +21,7 @@
 #include "../../config.h"
 #include "ws.h"
 #include "wsconv.h"
+#include "wsxdnd.h"
 #include "../../postproc/rgb2rgb.h"
 #include "../../mp_msg.h"
 #include "../../mplayer.h"
@@ -227,6 +228,9 @@
   }
 }
 
+/* enable DND atoms */
+wsXDNDInitialize();
+ 
 { /* on remote display XShm will be disabled - LGB */
  char *dispname=DisplayString(wsDisplay);
  int localdisp=1;
@@ -557,7 +561,10 @@
            { i=wsWindowFocusIn;  wsWindowList[l]->Focused=wsFocused; goto expose; }
           if ( Event->xclient.data.l[0] == wsWindowList[l]->AtomRolle )
            { mp_msg( MSGT_GPLAYER,MSGL_STATUS,"[ws] rolled.\n" ); }
-         }
+         } else {
+	   /* try to process DND events */
+	   wsXDNDProcessClientMessage(wsWindowList[l],&Event->xclient);
+	 }
         break;
 
    case MapNotify:   i=wsWindowMapped;   wsWindowList[l]->Mapped=wsMapped;   goto expose;
@@ -681,6 +688,10 @@
 	}
         break;
 
+   case SelectionNotify:
+     /* Handle DandD */
+     wsXDNDProcessSelection(wsWindowList[l],Event);
+     break;
   }
  XFlush( wsDisplay );
  XSync( wsDisplay,False );