GTK: work around a gtkmm<3.22 bug.
parent
29e43e67ea
commit
ec07516580
|
@ -26,9 +26,8 @@ Building on Linux
|
|||
### Building for Linux
|
||||
|
||||
You will need CMake, zlib, libpng, cairo, freetype. To build the GUI, you will need
|
||||
fontconfig, gtkmm 3.0, pangomm 1.4, OpenGL and OpenGL GLU, and optionally,
|
||||
the Space Navigator client library
|
||||
.
|
||||
fontconfig, gtkmm 3.0 (version 3.16 or later), pangomm 1.4, OpenGL and OpenGL GLU, and
|
||||
optionally, the Space Navigator client library.
|
||||
On a Debian derivative (e.g. Ubuntu) these can be installed with:
|
||||
|
||||
apt-get install cmake zlib1-dev libpng-dev libcairo2-dev libfreetype6-dev
|
||||
|
|
|
@ -341,6 +341,12 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
// Work around a bug fixed in GTKMM 3.22:
|
||||
// https://mail.gnome.org/archives/gtkmm-list/2016-April/msg00020.html
|
||||
Glib::RefPtr<Gdk::GLContext> on_create_context() override {
|
||||
return get_window()->create_gl_context();
|
||||
}
|
||||
|
||||
void on_resize(int width, int height) override {
|
||||
_w = width;
|
||||
_h = height;
|
||||
|
@ -1119,6 +1125,11 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
// See GraphicsWidget::on_create_context.
|
||||
Glib::RefPtr<Gdk::GLContext> on_create_context() override {
|
||||
return get_window()->create_gl_context();
|
||||
}
|
||||
|
||||
bool on_render(const Glib::RefPtr<Gdk::GLContext> &context) override {
|
||||
SS.TW.Paint();
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue