On Thu, Nov 19, 2015 at 4:44 PM, Sebastien Binet <
seb....@gmail.com> wrote:
> hi there,
>
> For fun, I started to play a bit with
golang.org/x/exp/shiny, looking
> at the examples and the doc.
> To make things more concrete, I tried to reimplement parts of
>
github.com/BurntSushi/imgv using exp/shiny.
>
> This solidified as:
https://github.com/sbinet/iview
>
> so far so good, but I hit 2 snags:
> - how to programmatically resize an existing screen.Window? (ie: I'd
> like for the window to take the dimensions of the current image when I
> hit 'r')
> - also connected to resizing: when I resize the window with the mouse,
> the performances (time to redraw) are quite low...
somewhat related: looking at the documentation of event/paint.Event:
https://godoc.org/golang.org/x/mobile/event/paint
type Event struct {
// External is true for paint events sent by the screen driver.
//
// An external event may be sent at any time in response to an
// operating system event, for example the window opened, was
// resized, or the screen memory was lost.
//
// Programs actively drawing to the screen as fast as vsync allows
// should ignore external paint events to avoid a backlog of paint
// events building up.
External bool
}
I would have expected for e.g. the x11driver to send a
paint.Event{External:true} here:
https://github.com/golang/exp/blob/master/shiny/driver/x11driver/window.go#L102
https://github.com/golang/exp/blob/master/shiny/driver/gldriver/x11.go#L155
am I mistaken?
-s