GTK: work around a gtkmm<3.22 bug.

pull/168/head
whitequark 2017-01-14 01:43:11 +00:00
parent 29e43e67ea
commit ec07516580
2 changed files with 13 additions and 3 deletions

View File

@ -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

View File

@ -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;