Correct wxTimer bug in wxGTK.
Correct SetSize bug for certain Toplevel windows in wxMAC. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -61,6 +61,9 @@ bool wxTimer::Start( int millisecs, bool oneShot )
|
|||||||
{
|
{
|
||||||
(void)wxTimerBase::Start(millisecs, oneShot);
|
(void)wxTimerBase::Start(millisecs, oneShot);
|
||||||
|
|
||||||
|
if (m_tag != -1)
|
||||||
|
gtk_timeout_remove( m_tag );
|
||||||
|
|
||||||
m_tag = gtk_timeout_add( m_milli, timeout_callback, this );
|
m_tag = gtk_timeout_add( m_milli, timeout_callback, this );
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@@ -61,6 +61,9 @@ bool wxTimer::Start( int millisecs, bool oneShot )
|
|||||||
{
|
{
|
||||||
(void)wxTimerBase::Start(millisecs, oneShot);
|
(void)wxTimerBase::Start(millisecs, oneShot);
|
||||||
|
|
||||||
|
if (m_tag != -1)
|
||||||
|
gtk_timeout_remove( m_tag );
|
||||||
|
|
||||||
m_tag = gtk_timeout_add( m_milli, timeout_callback, this );
|
m_tag = gtk_timeout_add( m_milli, timeout_callback, this );
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@@ -349,7 +349,7 @@ void wxWindowMac::DoGetPosition(int *x, int *y) const
|
|||||||
|
|
||||||
xx = m_x ;
|
xx = m_x ;
|
||||||
yy = m_y ;
|
yy = m_y ;
|
||||||
if (GetParent())
|
if (!m_macWindowData && GetParent())
|
||||||
{
|
{
|
||||||
wxPoint pt(GetParent()->GetClientAreaOrigin());
|
wxPoint pt(GetParent()->GetClientAreaOrigin());
|
||||||
xx -= pt.x;
|
xx -= pt.x;
|
||||||
@@ -670,6 +670,7 @@ void wxWindowMac::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
|||||||
// get the current size and position...
|
// get the current size and position...
|
||||||
int currentX, currentY;
|
int currentX, currentY;
|
||||||
GetPosition(¤tX, ¤tY);
|
GetPosition(¤tX, ¤tY);
|
||||||
|
|
||||||
int currentW,currentH;
|
int currentW,currentH;
|
||||||
GetSize(¤tW, ¤tH);
|
GetSize(¤tW, ¤tH);
|
||||||
|
|
||||||
|
@@ -349,7 +349,7 @@ void wxWindowMac::DoGetPosition(int *x, int *y) const
|
|||||||
|
|
||||||
xx = m_x ;
|
xx = m_x ;
|
||||||
yy = m_y ;
|
yy = m_y ;
|
||||||
if (GetParent())
|
if (!m_macWindowData && GetParent())
|
||||||
{
|
{
|
||||||
wxPoint pt(GetParent()->GetClientAreaOrigin());
|
wxPoint pt(GetParent()->GetClientAreaOrigin());
|
||||||
xx -= pt.x;
|
xx -= pt.x;
|
||||||
@@ -670,6 +670,7 @@ void wxWindowMac::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
|||||||
// get the current size and position...
|
// get the current size and position...
|
||||||
int currentX, currentY;
|
int currentX, currentY;
|
||||||
GetPosition(¤tX, ¤tY);
|
GetPosition(¤tX, ¤tY);
|
||||||
|
|
||||||
int currentW,currentH;
|
int currentW,currentH;
|
||||||
GetSize(¤tW, ¤tH);
|
GetSize(¤tW, ¤tH);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user