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