]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/dcscreen.cpp
Add doc for wxGraphicsContext.Create(), which is a lightweight context with no target...
[wxWidgets.git] / src / gtk / dcscreen.cpp
index e32427f51ebc85b92e72e04d1af082f5ac0d490b..0cf5e2a09781526819003e37090b658c3bab8ffa 100644 (file)
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#include "wx/dcscreen.h"
 #include "wx/gtk/dcscreen.h"
 
-#ifndef WX_PRECOMP
-    #include "wx/window.h"
-#endif
-
-#include <gdk/gdk.h>
-#include <gdk/gdkx.h>
 #include <gtk/gtk.h>
 
 //-----------------------------------------------------------------------------
 
 IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxWindowDCImpl)
 
-wxScreenDCImpl::wxScreenDCImpl( wxScreenDC *owner ) 
+wxScreenDCImpl::wxScreenDCImpl( wxScreenDC *owner )
   : wxWindowDCImpl( owner )
-{ 
-    Init(); 
+{
+    Init();
 }
 
 void wxScreenDCImpl::Init()
@@ -58,6 +51,8 @@ void wxScreenDCImpl::Init()
 
 wxScreenDCImpl::~wxScreenDCImpl()
 {
+    g_object_unref(m_context);
+
     gdk_gc_set_subwindow( m_penGC, GDK_CLIP_BY_CHILDREN );
     gdk_gc_set_subwindow( m_brushGC, GDK_CLIP_BY_CHILDREN );
     gdk_gc_set_subwindow( m_textGC, GDK_CLIP_BY_CHILDREN );