X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=radiant%2Fcamwindow.cpp;h=f157b87e2bd811cfe997a7b6f0284bb6449f08b3;hb=1788dbba06c0778e0056061146a134d420cd2157;hp=04110ee7ab11f13fca10b49e36c77857ee31fe50;hpb=88624ae9e2534d8177214bd3966e0f72a49678eb;p=xonotic%2Fnetradiant.git diff --git a/radiant/camwindow.cpp b/radiant/camwindow.cpp index 04110ee7..f157b87e 100644 --- a/radiant/camwindow.cpp +++ b/radiant/camwindow.cpp @@ -171,7 +171,10 @@ struct camera_t origin( 0, 0, 0 ), angles( 0, 0, 0 ), color( 0, 0, 0 ), + projection( g_matrix4_identity ), + modelview( g_matrix4_identity ), movementflags( 0 ), + m_keycontrol_timer(), m_keymove_handler( 0 ), fieldOfView( 90.0f ), m_mouseMove( motionDelta, this ), @@ -1264,7 +1267,7 @@ void CamWnd::Cam_PositionDrag(){ CamWnd_Update( camwnd ); CameraMovedNotify(); - Sys_SetCursorPos( m_parent, m_PositionDragCursorX, m_PositionDragCursorY ); + Sys_SetCursorPos( m_gl_widget, m_PositionDragCursorX, m_PositionDragCursorY ); } } #endif @@ -1289,7 +1292,7 @@ void CamWnd::EnableFreeMove(){ gtk_window_set_focus( m_parent, m_gl_widget ); m_freemove_handle_focusout = m_gl_widget.connect( "focus_out_event", G_CALLBACK( camwindow_freemove_focusout ), this ); - m_freezePointer.freeze_pointer( m_parent, Camera_motionDelta, &m_Camera ); + m_freezePointer.freeze_pointer( m_gl_widget, Camera_motionDelta, &m_Camera ); CamWnd_Update( *this ); } @@ -1304,7 +1307,7 @@ void CamWnd::DisableFreeMove(){ CamWnd_Remove_Handlers_FreeMove( *this ); CamWnd_Add_Handlers_Move( *this ); - m_freezePointer.unfreeze_pointer( m_parent ); + m_freezePointer.unfreeze_pointer( m_gl_widget ); g_signal_handler_disconnect( G_OBJECT( m_gl_widget ), m_freemove_handle_focusout ); CamWnd_Update( *this );