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

gEDA-cvs: pcb.git: branch: master updated (28983f2b5bdeb060916bd9956fed873b05855a40)



The branch, master has been updated
       via  28983f2b5bdeb060916bd9956fed873b05855a40 (commit)
      from  a5afa86175f36898e3916fb9754184ccee71c7fb (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
=========

 src/hid/gtk/gtkhid-gdk.c        |    8 +++-----
 src/hid/gtk/gui-output-events.c |    1 +
 2 files changed, 4 insertions(+), 5 deletions(-)


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

commit 28983f2b5bdeb060916bd9956fed873b05855a40
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Only redraw the crosshair when necessary
    
    If we're about to repaint the screen from our backing pixmap,
    there is no point un-XOR drawing our current crosshair first.

:100644 100644 2ebb1a2... ba58d5d... M	src/hid/gtk/gtkhid-gdk.c
:100644 100644 c71af06... a294777... M	src/hid/gtk/gui-output-events.c

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

commit 28983f2b5bdeb060916bd9956fed873b05855a40
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Only redraw the crosshair when necessary
    
    If we're about to repaint the screen from our backing pixmap,
    there is no point un-XOR drawing our current crosshair first.

diff --git a/src/hid/gtk/gtkhid-gdk.c b/src/hid/gtk/gtkhid-gdk.c
index 2ebb1a2..ba58d5d 100644
--- a/src/hid/gtk/gtkhid-gdk.c
+++ b/src/hid/gtk/gtkhid-gdk.c
@@ -873,7 +873,7 @@ draw_crosshair (GdkGC *xor_gc, gint x, gint y)
 #define VCD 8
 
 void
-ghid_show_crosshair (gboolean show)
+ghid_show_crosshair (gboolean paint_new_location)
 {
   gint x, y;
   static gint x_prev = -1, y_prev = -1;
@@ -897,7 +897,7 @@ ghid_show_crosshair (gboolean show)
 
   gdk_gc_set_foreground (xor_gc, &cross_color);
 
-  if (x_prev >= 0)
+  if (x_prev >= 0 && !paint_new_location)
     {
       draw_crosshair (xor_gc, x_prev, y_prev);
       if (draw_markers_prev)
@@ -913,7 +913,7 @@ ghid_show_crosshair (gboolean show)
 	}
     }
 
-  if (x >= 0 && show)
+  if (x >= 0 && paint_new_location)
     {
       draw_crosshair (xor_gc, x, y);
       draw_markers = ghidgui->auto_pan_on && have_crosshair_attachments ();
@@ -990,7 +990,6 @@ ghid_screen_update (void)
 {
   render_priv *priv = gport->render_priv;
 
-  ghid_show_crosshair (FALSE);
   gdk_draw_drawable (gport->drawing_area->window, priv->bg_gc, gport->pixmap,
 		     0, 0, 0, 0, gport->width, gport->height);
   ghid_show_crosshair (TRUE);
@@ -1003,7 +1002,6 @@ ghid_drawing_area_expose_cb (GtkWidget *widget,
 {
   render_priv *priv = port->render_priv;
 
-  ghid_show_crosshair (FALSE);
   gdk_draw_drawable (widget->window, priv->bg_gc, port->pixmap,
                     ev->area.x, ev->area.y, ev->area.x, ev->area.y,
                     ev->area.width, ev->area.height);
diff --git a/src/hid/gtk/gui-output-events.c b/src/hid/gtk/gui-output-events.c
index c71af06..a294777 100644
--- a/src/hid/gtk/gui-output-events.c
+++ b/src/hid/gtk/gui-output-events.c
@@ -695,6 +695,7 @@ ghid_port_window_motion_cb (GtkWidget * widget,
   queue_tooltip_update (out);
 #endif
 
+  ghid_show_crosshair (FALSE);
   ghid_show_crosshair (TRUE);
   if (moved && have_crosshair_attachments ())
     ghid_draw_area_update (gport, NULL);




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