fix gl canvas created after parent is shown
Merge to 5.1.1
(cherry picked from commit 546faf8b34
)
This commit is contained in:
parent
d82bc3f455
commit
34678b6f72
|
@ -345,6 +345,10 @@
|
||||||
(let ([client-gtk (as-gtk-allocation (gtk_drawing_area_new))])
|
(let ([client-gtk (as-gtk-allocation (gtk_drawing_area_new))])
|
||||||
(values client-gtk client-gtk client-gtk #f #f #f #f #f #f 0))])))
|
(values client-gtk client-gtk client-gtk #f #f #f #f #f #f 0))])))
|
||||||
|
|
||||||
|
(define for-gl? (memq 'gl style))
|
||||||
|
(when for-gl?
|
||||||
|
(prepare-widget-gl-context client-gtk gl-config))
|
||||||
|
|
||||||
(super-new [parent parent]
|
(super-new [parent parent]
|
||||||
[gtk gtk]
|
[gtk gtk]
|
||||||
[client-gtk client-gtk]
|
[client-gtk client-gtk]
|
||||||
|
@ -369,10 +373,6 @@
|
||||||
|
|
||||||
(define dc (new dc% [canvas this] [transparent? (memq 'transparent style)]))
|
(define dc (new dc% [canvas this] [transparent? (memq 'transparent style)]))
|
||||||
|
|
||||||
(define for-gl? (memq 'gl style))
|
|
||||||
(when for-gl?
|
|
||||||
(prepare-widget-gl-context client-gtk gl-config))
|
|
||||||
|
|
||||||
(gtk_widget_realize gtk)
|
(gtk_widget_realize gtk)
|
||||||
(gtk_widget_realize client-gtk)
|
(gtk_widget_realize client-gtk)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user