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}}
|
||||
|
||||
Sets the window's cursor. Notice that setting the cursor for this window does
|
||||
not set it for its children so you'll need to explicitly call SetCursor() for
|
||||
them too if you need it.
|
||||
% VZ: the docs are correct, if the code doesn't behave like this, it must be
|
||||
% changed
|
||||
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}
|
||||
|
||||
|
@ -219,9 +219,8 @@ static void DoCleanUp()
|
||||
// continuing to use user defined log target is unsafe from now on because
|
||||
// some resources may be already unavailable, so replace it by something
|
||||
// more safe
|
||||
wxLog *oldlog = wxLog::SetActiveTarget(new wxLogStderr);
|
||||
if ( oldlog )
|
||||
delete oldlog;
|
||||
wxLog::DontCreateOnDemand();
|
||||
delete wxLog::SetActiveTarget(new wxLogStderr);
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
wxModule::CleanUpModules();
|
||||
@ -231,4 +230,9 @@ static void DoCleanUp()
|
||||
// delete the application object
|
||||
delete wxTheApp;
|
||||
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)
|
||||
{
|
||||
// don't try to set invalid cursor, always fall back to the default
|
||||
const wxCursor& cursorOk = cursor.Ok() ? cursor : *wxSTANDARD_CURSOR;
|
||||
|
||||
if ( (wxCursor&)cursorOk == m_cursor )
|
||||
// setting an invalid cursor is ok, it means that we don't have any special
|
||||
// cursor
|
||||
if ( cursor == m_cursor )
|
||||
{
|
||||
// no change
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
m_cursor = cursorOk;
|
||||
m_cursor = cursor;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ void wxSashWindow::OnMouseEvent(wxMouseEvent& event)
|
||||
SetCursor(* wxSTANDARD_CURSOR);
|
||||
#endif
|
||||
#ifdef __WXMSW__
|
||||
SetCursor(wxCursor());
|
||||
SetCursor(wxNullCursor);
|
||||
#endif
|
||||
|
||||
if (event.LeftDown())
|
||||
@ -306,7 +306,7 @@ void wxSashWindow::OnMouseEvent(wxMouseEvent& event)
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCursor(* wxSTANDARD_CURSOR);
|
||||
SetCursor(wxNullCursor);
|
||||
}
|
||||
}
|
||||
else if ( event.Dragging() &&
|
||||
|
@ -11,6 +11,14 @@
|
||||
* 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__
|
||||
#include "wx/setup.h"
|
||||
#endif
|
||||
@ -40,8 +48,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <ctype.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 */
|
||||
#ifndef SOCKLEN_T
|
||||
# define SOCKLEN_T int
|
||||
@ -1061,6 +1074,7 @@ void GAddress_destroy(GAddress *address)
|
||||
{
|
||||
assert(address != NULL);
|
||||
|
||||
free(address->m_addr);
|
||||
free(address);
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,14 @@
|
||||
* 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__
|
||||
#include "wx/setup.h"
|
||||
#endif
|
||||
@ -43,8 +51,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <winsock.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(default:4115) /* named type definition in parentheses */
|
||||
#endif
|
||||
|
||||
#define CLASSNAME "_GSocket_Internal_Window_Class"
|
||||
#define WINDOWNAME "_GSocket_Internal_Window_Name"
|
||||
|
||||
|
@ -469,20 +469,20 @@ bool wxWindow::SetCursor(const wxCursor& cursor)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
wxASSERT_MSG( m_cursor.Ok(),
|
||||
wxT("cursor must be valid after call to the base version"));
|
||||
if ( m_cursor.Ok() )
|
||||
{
|
||||
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
|
||||
POINT point;
|
||||
::GetCursorPos(&point);
|
||||
RECT rect;
|
||||
::GetWindowRect(hWnd, &rect);
|
||||
|
||||
RECT rect;
|
||||
::GetWindowRect(hWnd, &rect);
|
||||
|
||||
if ( ::PtInRect(&rect, point) && !wxIsBusy() )
|
||||
::SetCursor(GetHcursorOf(m_cursor));
|
||||
if ( ::PtInRect(&rect, point) && !wxIsBusy() )
|
||||
::SetCursor(GetHcursorOf(m_cursor));
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user