aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/PlatGTK.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/PlatGTK.cxx')
-rw-r--r--gtk/PlatGTK.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index 8a00fcdad..8b0c997da 100644
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -168,6 +168,7 @@ public:
void Init(SurfaceID sid, WindowID wid) override;
void InitPixMap(int width, int height, Surface *surface_, WindowID wid) override;
+ void Clear();
void Release() override;
bool Initialised() override;
void PenColour(ColourDesired fore) override;
@@ -276,10 +277,10 @@ x(0), y(0), inited(false), createdGC(false)
}
SurfaceImpl::~SurfaceImpl() {
- Release();
+ Clear();
}
-void SurfaceImpl::Release() {
+void SurfaceImpl::Clear() {
et = singleByte;
if (createdGC) {
createdGC = false;
@@ -303,6 +304,10 @@ void SurfaceImpl::Release() {
createdGC = false;
}
+void SurfaceImpl::Release() {
+ Clear();
+}
+
bool SurfaceImpl::Initialised() {
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 8, 0)
if (inited && context) {