[xiph-cvs] cvs commit: win32-tools/oggdrop main.c

Chris Wolf cwolf at xiph.org
Thu Aug 30 09:44:50 PDT 2001



cwolf       01/08/30 09:44:50

  Modified:    oggdrop  main.c
  Log:
  Fix disappearing act.  Contibuted by Anish Dave.

Revision  Changes    Path
1.5       +7 -0      win32-tools/oggdrop/main.c

Index: main.c
===================================================================
RCS file: /usr/local/cvsroot/win32-tools/oggdrop/main.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- main.c	2001/08/12 20:18:02	1.4
+++ main.c	2001/08/30 16:44:49	1.5
@@ -6,6 +6,9 @@
 #include "encthread.h"
 #include "audio.h"
 
+#define LOSHORT(l)           ((SHORT)(l))
+#define HISHORT(l)           ((SHORT)(((DWORD)(l) >> 16) & 0xFFFF))
+
 HANDLE event = NULL;
 int width = 120, height = 120;
 RECT bar1, bar2;
@@ -203,8 +206,12 @@
 
         case WM_MOUSEMOVE:
                 if (dragging) {
+      point.x = LOSHORT(lParam);
+      point.y = HISHORT(lParam);
+      /* lParam can contain negative coordinates !
                         point.x = LOWORD(lParam);
                         point.y = HIWORD(lParam);
+      */
                         ClientToScreen(hwnd, &point);
                         SetWindowPos(hwnd, 0, point.x - start.x, point.y - start.y, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW);
                 }

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list