extern wxList wxPendingDelete;
extern bool g_blockEventsOnDrag;
extern bool g_blockEventsOnScroll;
+extern wxCursor g_globalCursor;
static bool g_capturing = FALSE;
static wxWindow *g_focusWindow = (wxWindow*) NULL;
}
}
- // win is a control: tab can be propagated up
+ /* win is a control: tab can be propagated up */
if ( (!ret) &&
((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab)) &&
(win->HasFlag(wxTE_PROCESS_TAB) == 0))
if (!win->IsOwnGtkWindow( gdk_event->window )) return FALSE;
- if (widget->window && win->GetCursor().Ok() )
- gdk_window_set_cursor( widget->window, win->GetCursor().GetCursor() );
-
wxMouseEvent event( wxEVT_ENTER_WINDOW );
#if (GTK_MINOR_VERSION > 0)
event.SetTimestamp( gdk_event->time );
if (!win->IsOwnGtkWindow( gdk_event->window )) return FALSE;
- if (widget->window && win->GetCursor().Ok() )
- gdk_window_set_cursor( widget->window, wxSTANDARD_CURSOR->GetCursor() );
-
wxMouseEvent event( wxEVT_LEAVE_WINDOW );
#if (GTK_MINOR_VERSION > 0)
event.SetTimestamp( gdk_event->time );
win->SetForegroundColour( win->GetForegroundColour() );
win->SetCursor( win->GetCursor() );
+
+ wxWindowCreateEvent event( win );
+ event.SetEventObject( win );
+ win->GetEventHandler()->ProcessEvent( event );
return FALSE;
}
if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight;
int border = 0;
+ int bottom_border = 0;
- if (GTK_WIDGET_HAS_DEFAULT(m_widget))
+ if (GTK_WIDGET_CAN_DEFAULT(m_widget))
{
/* the default button has a border around it */
- border = 5;
+ border = 6;
+ bottom_border = 5;
}
/* this is the result of hours of debugging: the following code
m_x-border,
m_y-border,
m_width+2*border,
- m_height+2*border );
+ m_height+border+bottom_border );
}
m_sizeSet = TRUE;
void wxWindow::OnInternalIdle()
{
+ GdkWindow *window = GetConnectWidget()->window;
+ if (window)
+ {
+ wxCursor cursor = m_cursor;
+ if (g_globalCursor.Ok()) cursor = g_globalCursor;
+
+ if (m_currentGdkCursor != cursor)
+ {
+ gdk_window_set_cursor( window, cursor.GetCursor() );
+ m_currentGdkCursor = cursor;
+ }
+ }
+
UpdateWindowUI();
}
return TRUE;
}
- if ((m_widget) && (m_widget->window))
- gdk_window_set_cursor( m_widget->window, GetCursor().GetCursor() );
-
- if ((m_wxwindow) && (m_wxwindow->window))
- gdk_window_set_cursor( m_wxwindow->window, GetCursor().GetCursor() );
+// gdk_window_set_cursor( connect_widget->window, GetCursor().GetCursor() );
// cursor was set
return TRUE;