event.m_x = 0;
event.m_y = 0;
event.SetEventObject( win );
- return win->ProcessEvent( event );
+
+ bool ret = win->ProcessEvent( event );
+/*
+ if (ret) printf( "found.\n") ;
+*/
+ return ret;
};
//-----------------------------------------------------------------------------
void gtk_window_drop_callback( GtkWidget *widget, GdkEvent *event, wxWindow *win )
{
+ if (!win->HasVMT()) return;
+
if (win->GetDropTarget())
{
int x = 0;
bool gtk_window_enter_callback( GtkWidget *widget, GdkEventCrossing *gdk_event, wxWindow *win )
{
if (widget->window != gdk_event->window) return TRUE;
-
- if (g_blockEventsOnDrag) return FALSE;
+ if (g_blockEventsOnDrag) return TRUE;
+ if (!win->HasVMT()) return TRUE;
if (widget->window)
gdk_window_set_cursor( widget->window, win->m_cursor->GetCursor() );
bool gtk_window_leave_callback( GtkWidget *widget, GdkEventCrossing *gdk_event, wxWindow *win )
{
if (widget->window != gdk_event->window) return TRUE;
-
- if (g_blockEventsOnDrag) return FALSE;
+ if (!win->HasVMT()) return TRUE;
+ if (g_blockEventsOnDrag) return TRUE;
if (widget->window)
gdk_window_set_cursor( widget->window, wxSTANDARD_CURSOR->GetCursor() );
const wxPoint &pos, const wxSize &size,
long style, const wxString &name )
{
+ m_cursor = NULL;
Create( parent, id, pos, size, style, name );
};
m_wxwindow = gtk_myfixed_new();
+ if (m_wxwindow) GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS );
+
if (m_windowStyle & wxTAB_TRAVERSAL == wxTAB_TRAVERSAL)
GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );
else
if (m_widget) gtk_widget_destroy( m_widget );
-// delete m_cursor;
+ wxDELETE(m_cursor);
DeleteRelatedConstraints();
if (m_constraints)
m_windowValidator = NULL;
m_windowId = id;
m_sizeSet = FALSE;
- m_cursor = new wxCursor( wxCURSOR_ARROW );
+ if (m_cursor == NULL)
+ m_cursor = new wxCursor( wxCURSOR_ARROW );
m_font = *wxSWISS_FONT;
m_backgroundColour = wxWHITE;
m_foregroundColour = wxBLACK;
void wxWindow::ImplementSetPosition(void)
{
+ if (IS_KIND_OF(this,wxFrame) || IS_KIND_OF(this,wxDialog))
+ {
+ if ((m_x != -1) || (m_y != -1))
+ gtk_widget_set_uposition( m_widget, m_x, m_y );
+ return;
+ }
+
if (!m_parent)
{
- if (IsKindOf(CLASSINFO(wxFrame)) ||
- IsKindOf(CLASSINFO(wxDialog)))
- {
- if ((m_x != -1) || (m_y != -1))
- gtk_widget_set_uposition( m_widget, m_x, m_y );
- }
- else
- {
- printf( "wxWindow::SetSize error.\n" );
- }
+ printf( "wxWindow::SetSize error.\n" );
return;
}
void wxWindow::Centre( int direction )
{
- if (this->IsKindOf(CLASSINFO(wxDialog)) || this->IsKindOf(CLASSINFO(wxFrame)))
+ if (IS_KIND_OF(this,wxDialog) || IS_KIND_OF(this,wxFrame))
{
if (direction & wxHORIZONTAL == wxHORIZONTAL) m_x = (gdk_screen_width () - m_width) / 2;
if (direction & wxVERTICAL == wxVERTICAL) m_y = (gdk_screen_height () - m_height) / 2;
void wxWindow::SetCursor( const wxCursor &cursor )
{
- if (*m_cursor == cursor) return;
+ wxASSERT(m_cursor != NULL);
+
+ if (m_cursor != NULL)
+ if (*m_cursor == cursor)
+ return;
(*m_cursor) = cursor;
if (m_widget->window)
gdk_window_set_cursor( m_widget->window, m_cursor->GetCursor() );