summaryrefslogtreecommitdiff
path: root/redo/area_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-09 10:33:38 -0400
committerPietro Gagliardi <[email protected]>2014-08-09 10:33:38 -0400
commit6c1bf7aabd859c27f26898ead8572dd00f419d57 (patch)
tree25e012396edc1c09c4252ac12c1e4d5a5a47d51a /redo/area_unix.go
parentb4a97e871a5c6c390927f5bac9b84b0fe6b40c20 (diff)
Big change: with the current event model, it's safe to call Area.RepaintAll() (and the future Area.Repaint()) from within AreaHandler.Key() and AreaHandler.Mouse(); get rid of the bool returns from each. The future Area.Repaint() is important; the bool returns repainted the whole Area, which may not be optimal.
Diffstat (limited to 'redo/area_unix.go')
-rw-r--r--redo/area_unix.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/redo/area_unix.go b/redo/area_unix.go
index 8b96ff0..3a6ce68 100644
--- a/redo/area_unix.go
+++ b/redo/area_unix.go
@@ -190,10 +190,7 @@ func finishMouseEvent(widget *C.GtkWidget, data C.gpointer, me MouseEvent, mb ui
if me.Up >= 8 {
me.Up -= 4
}
- repaint := a.handler.Mouse(me)
- if repaint {
- C.gtk_widget_queue_draw(widget)
- }
+ a.handler.Mouse(me)
}
// convenience name to make our intent clear
@@ -298,10 +295,7 @@ func doKeyEvent(widget *C.GtkWidget, event *C.GdkEvent, data C.gpointer, up bool
return
}
ke.Up = up
- repaint := a.handler.Key(ke)
- if repaint {
- C.gtk_widget_queue_draw(widget)
- }
+ a.handler.Key(ke)
}
//export our_area_key_press_event_callback