~brandontschaefer/nux/xim-tests

« back to all changes in this revision

Viewing changes to NuxGraphics/GraphicsDisplayX11.cpp

  • Committer: Brandon Schaefer
  • Date: 2012-08-31 16:35:33 UTC
  • Revision ID: brandon.schaefer@canonical.com-20120831163533-xl6pxo4peoy05e6k
* Switched to boost::shared_ptr for m_xim_controller

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
#include <X11/extensions/shape.h>
37
37
 
 
38
 
38
39
namespace nux
39
40
{
40
41
  int GraphicsDisplay::double_click_time_delay = 400; // milliseconds
42
43
  GraphicsDisplay::GraphicsDisplay()
43
44
    : m_X11Display(NULL)
44
45
    , m_X11Screen(0)
45
 
    , m_xim_controller(NULL)
46
46
    , m_ParentWindow(0)
47
47
    , m_GLCtx(0)
48
48
#ifndef NUX_OPENGLES_20
106
106
    NUX_SAFE_DELETE( m_GraphicsContext );
107
107
    NUX_SAFE_DELETE( m_DeviceFactory );
108
108
 
109
 
    if (m_xim_controller)
110
 
    {
111
 
      delete m_xim_controller;
112
 
    }
113
 
 
114
109
    if (m_CreatedFromForeignWindow == false)
115
110
    {
116
111
      DestroyOpenGLWindow();
584
579
      //XMapRaised(m_X11Display, m_X11Window);
585
580
    }
586
581
 
587
 
    m_xim_controller = new XIMController(m_X11Display);
 
582
    m_xim_controller.reset(new XIMController(m_X11Display));
588
583
    m_xim_controller->SetFocusedWindow(m_X11Window);
589
584
 
590
585
    if (m_xim_controller->IsXICValid())
699
694
 
700
695
    m_GfxInterfaceCreated = true;
701
696
 
702
 
    m_xim_controller = new XIMController(m_X11Display);
 
697
    m_xim_controller.reset(new XIMController(m_X11Display));
703
698
 
704
699
    // m_DeviceFactory = new GpuDevice(m_ViewportSize.GetWidth(), m_ViewportSize.GetHeight(), BITFMT_R8G8B8A8);
705
700
    m_DeviceFactory = new GpuDevice(m_ViewportSize.width, m_ViewportSize.height, BITFMT_R8G8B8A8,