X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fdd3ed7a8f5e43d44fffef5c7f857f6256dcc67a..aadbdf11bda695e2ca135ef1e4dc09d6c01d2521:/src/gtk1/window.cpp diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 1f40d20ec1..ee5fd3142d 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -131,9 +131,16 @@ static gint gtk_debug_focus_in_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), const wxChar *name ) { - wxPrintf( _T("FOCUS NOW AT: ") ); - wxPrintf( name ); - wxPrintf( _T("\n") ); + // to enable logging of the focus events replace 0 with 1 +#if 0 + static bool s_done = FALSE; + if ( !s_done ) + { + wxLog::AddTraceMask("focus"); + s_done = TRUE; + } +#endif + wxLogTrace(_T("FOCUS NOW AT: %s"), name); return FALSE; } @@ -1092,7 +1099,7 @@ static gint gtk_window_enter_callback( GtkWidget *widget, GdkEventCrossing *gdk_ if (!win->HasVMT()) return FALSE; if (g_blockEventsOnDrag) return FALSE; - if (widget->window != gdk_event->window) return FALSE; + if (!win->IsOwnGtkWindow( gdk_event->window )) return FALSE; if ((widget->window) && (win->m_cursor.Ok())) gdk_window_set_cursor( widget->window, win->m_cursor.GetCursor() ); @@ -1144,16 +1151,16 @@ static gint gtk_window_leave_callback( GtkWidget *widget, GdkEventCrossing *gdk_ if (!win->HasVMT()) return FALSE; if (g_blockEventsOnDrag) return FALSE; - if (widget->window != gdk_event->window) return FALSE; + if (!win->IsOwnGtkWindow( gdk_event->window )) return FALSE; if (widget->window) gdk_window_set_cursor( widget->window, wxSTANDARD_CURSOR->GetCursor() ); /* - printf( "OnLeave from " ); + wxPrintf( _T("OnLeave from ") ); if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); + wxPrintf( win->GetClassInfo()->GetClassName() ); + wxPrintf( _T(".\n") ); */ wxMouseEvent event( wxEVT_LEAVE_WINDOW ); @@ -2002,9 +2009,6 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags ) } else { - int old_width = m_width; - int old_height = m_height; - if ((sizeFlags & wxSIZE_USE_EXISTING) == wxSIZE_USE_EXISTING) { if (x != -1) m_x = x;