r5770 - trunk/eda/fped
werner at docs.openmoko.org
werner at docs.openmoko.org
Sat Jan 2 16:47:47 CET 2010
Author: werner
Date: 2010-01-02 16:47:46 +0100 (Sat, 02 Jan 2010)
New Revision: 5770
Modified:
trunk/eda/fped/gui_canvas.c
trunk/eda/fped/gui_tool.c
Log:
Canvas tooltips now work. The problem was that expose events set the paint
region to only cover the newly exposed area. This prevented the general
redrawing from clearing areas that still contained hovering and dragging
items. However,the paint region has no effect on reading from the drawable.
Thus when rebuilding the hover and drag stack, the still tainted image was
stored.
This issue could be solved by either introducing a separate mode where the
stack is redrawn instead of rebuilt, or by turning off double-buffering.
The former would complicate the already fickle logic of overlays, and not
having double-buffering doesn't seem to cause any ill effects.
- gui_canvas.c (make_canvas): disable double-buffering of canvas so that the
paint region is not restricted in expose events
- gui_tool.c (tool_tip): enabled canvas tooltips
Modified: trunk/eda/fped/gui_canvas.c
===================================================================
--- trunk/eda/fped/gui_canvas.c 2010-01-02 12:55:34 UTC (rev 5769)
+++ trunk/eda/fped/gui_canvas.c 2010-01-02 15:47:46 UTC (rev 5770)
@@ -522,6 +522,8 @@
GDK_SCROLL |
GDK_POINTER_MOTION_MASK);
+ gtk_widget_set_double_buffered(canvas, FALSE);
+
draw_ctx.widget = canvas;
return canvas;
Modified: trunk/eda/fped/gui_tool.c
===================================================================
--- trunk/eda/fped/gui_tool.c 2010-01-02 12:55:34 UTC (rev 5769)
+++ trunk/eda/fped/gui_tool.c 2010-01-02 15:47:46 UTC (rev 5770)
@@ -849,14 +849,6 @@
return NULL;
/*
- * Tooltips don't work properly yet, so we return NULL here. The
- * tooltips themselves are fine, but the expose event generated when
- * removing the tooltip window upsets the overlay logic for some yet
- * unknown reason.
- */
- return NULL;
-
- /*
* The logic below follows exactly what happens in get_hover_inst.
*/
More information about the commitlog
mailing list