1. fixed memory leak in GAddress
2. fixed memory leak with wxLogStderr in wxBase 3. updated tmake files/makefiles for wxBase with wxSocket under MSW 4. fixed wxSashWindow cursor bug by allowing SetCursor(wxNullCursor) 5. fixed warning in gsock*.c git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
9eb662e94c
commit
8a9c22462a
@ -1832,9 +1832,13 @@ implements the following methods:\par
|
|||||||
|
|
||||||
\func{virtual void}{SetCursor}{\param{const wxCursor\&}{cursor}}
|
\func{virtual void}{SetCursor}{\param{const wxCursor\&}{cursor}}
|
||||||
|
|
||||||
Sets the window's cursor. Notice that setting the cursor for this window does
|
% VZ: the docs are correct, if the code doesn't behave like this, it must be
|
||||||
not set it for its children so you'll need to explicitly call SetCursor() for
|
% changed
|
||||||
them too if you need it.
|
Sets the window's cursor. Notice that the window cursor also sets it for the
|
||||||
|
children of the window implicitly.
|
||||||
|
|
||||||
|
The {\it cursor} may be {\tt wxNullCursor} in which case the window cursor will
|
||||||
|
be reset back to default.
|
||||||
|
|
||||||
\wxheading{Parameters}
|
\wxheading{Parameters}
|
||||||
|
|
||||||
|
@ -219,9 +219,8 @@ static void DoCleanUp()
|
|||||||
// continuing to use user defined log target is unsafe from now on because
|
// continuing to use user defined log target is unsafe from now on because
|
||||||
// some resources may be already unavailable, so replace it by something
|
// some resources may be already unavailable, so replace it by something
|
||||||
// more safe
|
// more safe
|
||||||
wxLog *oldlog = wxLog::SetActiveTarget(new wxLogStderr);
|
wxLog::DontCreateOnDemand();
|
||||||
if ( oldlog )
|
delete wxLog::SetActiveTarget(new wxLogStderr);
|
||||||
delete oldlog;
|
|
||||||
#endif // wxUSE_LOG
|
#endif // wxUSE_LOG
|
||||||
|
|
||||||
wxModule::CleanUpModules();
|
wxModule::CleanUpModules();
|
||||||
@ -231,4 +230,9 @@ static void DoCleanUp()
|
|||||||
// delete the application object
|
// delete the application object
|
||||||
delete wxTheApp;
|
delete wxTheApp;
|
||||||
wxTheApp = (wxApp *)NULL;
|
wxTheApp = (wxApp *)NULL;
|
||||||
|
|
||||||
|
#if wxUSE_LOG
|
||||||
|
// and now delete the last logger as well
|
||||||
|
delete wxLog::SetActiveTarget(NULL);
|
||||||
|
#endif // wxUSE_LOG
|
||||||
}
|
}
|
||||||
|
@ -586,16 +586,15 @@ bool wxWindowBase::SetForegroundColour( const wxColour &colour )
|
|||||||
|
|
||||||
bool wxWindowBase::SetCursor(const wxCursor& cursor)
|
bool wxWindowBase::SetCursor(const wxCursor& cursor)
|
||||||
{
|
{
|
||||||
// don't try to set invalid cursor, always fall back to the default
|
// setting an invalid cursor is ok, it means that we don't have any special
|
||||||
const wxCursor& cursorOk = cursor.Ok() ? cursor : *wxSTANDARD_CURSOR;
|
// cursor
|
||||||
|
if ( cursor == m_cursor )
|
||||||
if ( (wxCursor&)cursorOk == m_cursor )
|
|
||||||
{
|
{
|
||||||
// no change
|
// no change
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_cursor = cursorOk;
|
m_cursor = cursor;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ void wxSashWindow::OnMouseEvent(wxMouseEvent& event)
|
|||||||
SetCursor(* wxSTANDARD_CURSOR);
|
SetCursor(* wxSTANDARD_CURSOR);
|
||||||
#endif
|
#endif
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
SetCursor(wxCursor());
|
SetCursor(wxNullCursor);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (event.LeftDown())
|
if (event.LeftDown())
|
||||||
@ -306,7 +306,7 @@ void wxSashWindow::OnMouseEvent(wxMouseEvent& event)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetCursor(* wxSTANDARD_CURSOR);
|
SetCursor(wxNullCursor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( event.Dragging() &&
|
else if ( event.Dragging() &&
|
||||||
|
@ -11,6 +11,14 @@
|
|||||||
* PLEASE don't put C++ comments here - this is a C source file.
|
* PLEASE don't put C++ comments here - this is a C source file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* including rasasync.h (included from windows.h itself included from
|
||||||
|
* wx/setup.h and/or winsock.h results in this warning for
|
||||||
|
* RPCNOTIFICATION_ROUTINE
|
||||||
|
*/
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# pragma warning(disable:4115) /* named type definition in parentheses */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __GSOCKET_STANDALONE__
|
#ifndef __GSOCKET_STANDALONE__
|
||||||
#include "wx/setup.h"
|
#include "wx/setup.h"
|
||||||
#endif
|
#endif
|
||||||
@ -40,8 +48,13 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# pragma warning(default:4115) /* named type definition in parentheses */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* if we use configure for MSW SOCKLEN_T will be already defined */
|
/* if we use configure for MSW SOCKLEN_T will be already defined */
|
||||||
#ifndef SOCKLEN_T
|
#ifndef SOCKLEN_T
|
||||||
# define SOCKLEN_T int
|
# define SOCKLEN_T int
|
||||||
@ -1061,6 +1074,7 @@ void GAddress_destroy(GAddress *address)
|
|||||||
{
|
{
|
||||||
assert(address != NULL);
|
assert(address != NULL);
|
||||||
|
|
||||||
|
free(address->m_addr);
|
||||||
free(address);
|
free(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,6 +11,14 @@
|
|||||||
* PLEASE don't put C++ comments here - this is a C source file.
|
* PLEASE don't put C++ comments here - this is a C source file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* including rasasync.h (included from windows.h itself included from
|
||||||
|
* wx/setup.h and/or winsock.h results in this warning for
|
||||||
|
* RPCNOTIFICATION_ROUTINE
|
||||||
|
*/
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# pragma warning(disable:4115) /* named type definition in parentheses */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __GSOCKET_STANDALONE__
|
#ifndef __GSOCKET_STANDALONE__
|
||||||
#include "wx/setup.h"
|
#include "wx/setup.h"
|
||||||
#endif
|
#endif
|
||||||
@ -43,8 +51,13 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# pragma warning(default:4115) /* named type definition in parentheses */
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CLASSNAME "_GSocket_Internal_Window_Class"
|
#define CLASSNAME "_GSocket_Internal_Window_Class"
|
||||||
#define WINDOWNAME "_GSocket_Internal_Window_Name"
|
#define WINDOWNAME "_GSocket_Internal_Window_Name"
|
||||||
|
|
||||||
|
@ -469,20 +469,20 @@ bool wxWindow::SetCursor(const wxCursor& cursor)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxASSERT_MSG( m_cursor.Ok(),
|
if ( m_cursor.Ok() )
|
||||||
wxT("cursor must be valid after call to the base version"));
|
{
|
||||||
|
HWND hWnd = GetHwnd();
|
||||||
|
|
||||||
HWND hWnd = GetHwnd();
|
// Change the cursor NOW if we're within the correct window
|
||||||
|
POINT point;
|
||||||
|
::GetCursorPos(&point);
|
||||||
|
|
||||||
// Change the cursor NOW if we're within the correct window
|
RECT rect;
|
||||||
POINT point;
|
::GetWindowRect(hWnd, &rect);
|
||||||
::GetCursorPos(&point);
|
|
||||||
|
|
||||||
RECT rect;
|
if ( ::PtInRect(&rect, point) && !wxIsBusy() )
|
||||||
::GetWindowRect(hWnd, &rect);
|
::SetCursor(GetHcursorOf(m_cursor));
|
||||||
|
}
|
||||||
if ( ::PtInRect(&rect, point) && !wxIsBusy() )
|
|
||||||
::SetCursor(GetHcursorOf(m_cursor));
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user