]> git.sesse.net Git - vlc/commitdiff
* GTK2 events work even better
authorEmmanuel Puig <karibu@videolan.org>
Tue, 15 Apr 2003 20:54:58 +0000 (20:54 +0000)
committerEmmanuel Puig <karibu@videolan.org>
Tue, 15 Apr 2003 20:54:58 +0000 (20:54 +0000)
modules/gui/skins/gtk2/gtk2_api.cpp
modules/gui/skins/gtk2/gtk2_event.cpp

index 0efe53c3ea9fbaadce45aa713fc6567aee454508..bfa17b4a6c6831141ea114d5192e2b38c5f2b392 100644 (file)
@@ -2,7 +2,7 @@
  * gtk2_api.cpp: Various gtk2-specific functions
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: gtk2_api.cpp,v 1.7 2003/04/15 20:33:58 karibu Exp $
+ * $Id: gtk2_api.cpp,v 1.8 2003/04/15 20:54:58 karibu Exp $
  *
  * Authors: Cyril Deguet  <asmax@videolan.org>
  *
@@ -121,11 +121,7 @@ void OSAPI_GetScreenSize( int &w, int &h )
 //---------------------------------------------------------------------------
 void OSAPI_GetMousePos( int &x, int &y )
 {
-/*    LPPOINT MousePos = new POINT;
-    GetCursorPos( MousePos );
-    x = MousePos->x;
-    y = MousePos->y;
-    delete MousePos;*/
+    gdk_window_get_pointer( gdk_get_default_root_window(), &x, &y, NULL );
 }
 //---------------------------------------------------------------------------
 string OSAPI_GetWindowTitle( Window *win )
index 031bf3d3c2ae8c44176d897b26b3de5290da9138..91fe2d597d871372fb68b94d7ccc058a61b7360b 100644 (file)
@@ -2,7 +2,7 @@
  * gtk2_event.cpp: GTK2 implementation of the Event class
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: gtk2_event.cpp,v 1.6 2003/04/15 20:33:58 karibu Exp $
+ * $Id: gtk2_event.cpp,v 1.7 2003/04/15 20:54:58 karibu Exp $
  *
  * Authors: Cyril Deguet     <asmax@videolan.org>
  *
@@ -80,12 +80,14 @@ bool GTK2Event::SendEvent()
             {
                 OSAPI_PostMessage( *win, Message, Param1, Param2 );
                 PostSynchroMessage();
+                return true;
             }
         }
+        OSAPI_PostMessage( NULL, Message, Param1, Param2 );
+        return true;
     }
 
-    OSAPI_PostMessage( NULL, Message, Param1, Param2 );
-    return true;
+    return false;
 }
 //---------------------------------------------------------------------------
 bool GTK2Event::IsEqual( Event *evt )