On Sun, 2008-02-10 at 21:02 +0100, Tomaž Šolc wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Peter
>
> > BTW, if you're happy to continue hacking on this, I'd appreciate it.
> > (Don't take my initial investigation as any sign I'm familiar with this
> > code, or have the knowledge to fix the bug ;) !)
>
> Thanks for the info. I'll look into it tommorow.
I used git bisect on the tracker at repo.or.cz/w/geda-pcb.git to find
the point where it broke. Hope this helps:
38b911c1b09910d786328cc2d6cc344c05c362a9 is first bad commit
commit 38b911c1b09910d786328cc2d6cc344c05c362a9
Author: djdelorie <djdelorie>
Date: Mon Dec 10 04:09:33 2007 +0000
Fix enter/leave logic to avoid leaving obsolete crosshair-attached
elements on the screen when the cursor leaves the working area.
:040000 040000 929e26b6f2546a3431930384ebd733b264d8479e
5528b1cef883afde2c8e8c6b87f615ba2e7b7567 M src
http://repo.or.cz/w/geda-pcb.git?a=commitdiff;h=38b911c1b09910d786328cc2d6cc344c05c362a9
diff --git a/src/hid/gtk/gui-output-events.c b/src/hid/gtk/gui-output-events.c
index 7d2a669..32fe563 100644
--- a/src/hid/gtk/gui-output-events.c
+++ b/src/hid/gtk/gui-output-events.c
@@ -800,7 +800,9 @@ gint
ghid_port_window_enter_cb (GtkWidget * widget,
GdkEventCrossing * ev, GHidPort * out)
{
- /* printf("mode: %d type: %d\n", ev->mode, ev->detail); */
+ /* printf("enter: mode: %d type: %d\n", ev->mode, ev->detail); */
+
+ RestoreCrosshair (TRUE);
/* See comment in ghid_port_window_leave_cb() */
@@ -809,7 +811,6 @@ ghid_port_window_enter_cb (GtkWidget * widget,
return FALSE;
}
-
if (!ghidgui->command_entry_status_line_active)
{
out->has_entered = TRUE;
@@ -818,7 +819,6 @@ ghid_port_window_enter_cb (GtkWidget * widget,
gtk_widget_grab_focus (out->drawing_area);
}
ghidgui->in_popup = FALSE;
- RestoreCrosshair (TRUE);
/* Following expression is true if a you open a menu from the menu bar,
* move the mouse to the viewport and click on it. This closes the menu
@@ -850,7 +850,7 @@ ghid_port_window_leave_cb (GtkWidget * widget,
{
gint x0, y0, x, y, dx, dy, w, h;
- /* printf("mode: %d type: %d\n", ev->mode, ev->detail); */
+ /* printf("leave: mode: %d type: %d\n", ev->mode, ev->detail); */
/* Window leave events can also be triggered because of focus grabs. Some
* X applications occasionally grab the focus and so trigger this function.
@@ -859,12 +859,8 @@ ghid_port_window_leave_cb (GtkWidget * widget,
* See http://bugzilla.gnome.org/show_bug.cgi?id=102209
*/
- if(ev->mode != GDK_CROSSING_NORMAL)
- {
- return FALSE;
- }
-
- if (out->has_entered && !ghidgui->in_popup)
+ if(ev->mode == GDK_CROSSING_NORMAL
+ && out->has_entered && !ghidgui->in_popup)
{
/* if actively drawing, start scrolling */
@@ -915,6 +911,8 @@ ghid_port_window_leave_cb (GtkWidget * widget,
}
}
+ HideCrosshair (TRUE);
+
ghid_show_crosshair (FALSE);
out->has_entered = FALSE;
--
Peter Clifton
Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA
Tel: +44 (0)7729 980173 - (No signal in the lab!)
_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev