[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-282-g8628c10)



The branch, master has been updated
       via  8628c10167df204222d77b4f18e550f7486aa2a1 (commit)
      from  f470af7a28afe423ded6171ea3c8a2b31ff56f43 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gschem/include/prototype.h |    2 +-
 gschem/src/a_pan.c         |    2 +-
 gschem/src/a_zoom.c        |    6 +++---
 gschem/src/x_basic.c       |   20 +++++++++++---------
 4 files changed, 16 insertions(+), 14 deletions(-)


=================
 Commit Messages
=================

commit 8628c10167df204222d77b4f18e550f7486aa2a1
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sat Nov 1 20:51:36 2008 +0000

    gschem: Use gdk_display_warp_pointer() rather than an X11 specific call
    
    Fixes bug #2212753
    
    gdk_display_warp_pointer() was added in GTK/GDK 2.8, and allows
    greater portability to other platforms supported by GDK.
    
    Remove the unimplemented "relative" option to x_basic_warp_cursor()

:100644 100644 51ce397... f0313e6... M	gschem/include/prototype.h
:100644 100644 88d3601... 85d2f9a... M	gschem/src/a_pan.c
:100644 100644 654e379... c112116... M	gschem/src/a_zoom.c
:100644 100644 608e46c... 59c6861... M	gschem/src/x_basic.c

=========
 Changes
=========

commit 8628c10167df204222d77b4f18e550f7486aa2a1
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sat Nov 1 20:51:36 2008 +0000

    gschem: Use gdk_display_warp_pointer() rather than an X11 specific call
    
    Fixes bug #2212753
    
    gdk_display_warp_pointer() was added in GTK/GDK 2.8, and allows
    greater portability to other platforms supported by GDK.
    
    Remove the unimplemented "relative" option to x_basic_warp_cursor()

diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index 51ce397..f0313e6 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -761,7 +761,7 @@ void x_hscrollbar_update(GSCHEM_TOPLEVEL *w_current);
 void x_vscrollbar_set_ranges(GSCHEM_TOPLEVEL *w_current);
 void x_vscrollbar_update(GSCHEM_TOPLEVEL *w_current);
 void x_scrollbars_update(GSCHEM_TOPLEVEL *w_current);
-void x_basic_warp_cursor(GtkWidget *widget, gint x, gint y, gboolean relative);
+void x_basic_warp_cursor(GtkWidget *widget, gint x, gint y);
 /* x_color.c */
 void x_color_init (void);
 void x_color_free (void);
diff --git a/gschem/src/a_pan.c b/gschem/src/a_pan.c
index 88d3601..85d2f9a 100644
--- a/gschem/src/a_pan.c
+++ b/gschem/src/a_pan.c
@@ -182,7 +182,7 @@ void a_pan(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
    * Not ready for prime time, maybe there is another way to trigger the
    * motion event without changing the cursor position (Werner)
    */
-  /* x_basic_warp_cursor(w_current->drawing_area, x, y, 0); */
+  /* x_basic_warp_cursor(w_current->drawing_area, x, y); */
 }
 
 /*! \todo Finish function documentation!!!
diff --git a/gschem/src/a_zoom.c b/gschem/src/a_zoom.c
index 654e379..c112116 100644
--- a/gschem/src/a_zoom.c
+++ b/gschem/src/a_zoom.c
@@ -125,7 +125,7 @@ void a_zoom(GSCHEM_TOPLEVEL *w_current, int dir, int selected_from, int pan_flag
   if (w_current->warp_cursor) {
      WORLDtoSCREEN(toplevel, world_pan_center_x, world_pan_center_y,
 		   &start_x, &start_y);
-     x_basic_warp_cursor(w_current->drawing_area, start_x, start_y, 0);
+     x_basic_warp_cursor (w_current->drawing_area, start_x, start_y);
   }
   else {
     /*! \bug FIXME? trigger a x_event_motion() call without moving the cursor 
@@ -133,7 +133,7 @@ void a_zoom(GSCHEM_TOPLEVEL *w_current, int dir, int selected_from, int pan_flag
      *  Find a way to trigger the x_event_motion() without moving
      *  the mouse cursor (werner) 
      */
-    /* x_basic_warp_cursor(w_current->drawing_area, mouse_x, mouse_y, 0); */
+    /* x_basic_warp_cursor(w_current->drawing_area, mouse_x, mouse_y); */
   }
 }
 
@@ -191,7 +191,7 @@ void a_zoom_extents(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int pan_flags
    *  removed!, it has side effects in the preview of the part dialog 
    *  need to find another way to trigger x_event_motion() (Werner)
    */
-  /* x_basic_warp_cursor(w_current->drawing_area, mouse_x, mouse_y, 0); */
+  /* x_basic_warp_cursor(w_current->drawing_area, mouse_x, mouse_y); */
 
 }
 
diff --git a/gschem/src/x_basic.c b/gschem/src/x_basic.c
index 608e46c..59c6861 100644
--- a/gschem/src/x_basic.c
+++ b/gschem/src/x_basic.c
@@ -28,10 +28,6 @@
 #include <dmalloc.h>
 #endif
 
-#ifndef __MINGW32__
-#include <gdk/gdkx.h>
-#endif
-
 /*! \todo Finish function documentation!!!
  *  \brief
  *  \par Function Description
@@ -199,10 +195,16 @@ void x_scrollbars_update(GSCHEM_TOPLEVEL *w_current)
  *  \par Function Description
  *
  */
-void x_basic_warp_cursor(GtkWidget* widget, gint x, gint y, gboolean relative)
+void x_basic_warp_cursor (GtkWidget* widget, gint x, gint y)
 {
-#ifndef __MINGW32__
-   XWarpPointer(GDK_WINDOW_XDISPLAY(widget->window), None, 
-                GDK_WINDOW_XWINDOW(widget->window),0,0,0,0,x,y);
-#endif
+  GdkScreen *screen;
+  GdkDisplay *display;
+  int window_x, window_y;
+
+  gdk_window_get_origin (widget->window, &window_x, &window_y);
+
+  screen = gtk_widget_get_screen (widget);
+  display = gdk_screen_get_display (screen);
+
+  gdk_display_warp_pointer (display, screen, window_x + x, window_y + y);
 }




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs