Small cursor improvements

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 1999-05-27 09:34:17 +00:00
parent 3f480da37c
commit 082b27986b
6 changed files with 34 additions and 8 deletions

View File

@ -195,6 +195,11 @@ public:
bool m_delayedForegroundColour:1;
bool m_delayedBackgroundColour:1;
bool m_delayedCursor:1;
// the cursor is set in OnInternalIdle(). this fields holds
// a reference to the cursor currently set in theGdk window
// so that we don't have to set it more than once
wxCursor m_currentGdkCursor;
// contains GTK's widgets internal information about non-default widget
// font and colours. we create one for each widget that gets any

View File

@ -195,6 +195,11 @@ public:
bool m_delayedForegroundColour:1;
bool m_delayedBackgroundColour:1;
bool m_delayedCursor:1;
// the cursor is set in OnInternalIdle(). this fields holds
// a reference to the cursor currently set in theGdk window
// so that we don't have to set it more than once
wxCursor m_currentGdkCursor;
// contains GTK's widgets internal information about non-default widget
// font and colours. we create one for each widget that gets any

View File

@ -749,6 +749,10 @@ void wxFrame::OnInternalIdle()
GtkOnSize( m_x, m_y, m_width, m_height );
DoMenuUpdates();
if (m_frameMenuBar) m_frameMenuBar->OnInternalIdle();
if (m_frameToolBar) m_frameToolBar->OnInternalIdle();
if (m_frameStatusBar) m_frameStatusBar->OnInternalIdle();
}
void wxFrame::OnCloseWindow( wxCloseEvent& WXUNUSED(event) )

View File

@ -2030,10 +2030,14 @@ void wxWindow::OnInternalIdle()
GdkWindow *window = GetConnectWidget()->window;
if (window)
{
if (g_globalCursor.Ok())
gdk_window_set_cursor( window, g_globalCursor.GetCursor() );
else
gdk_window_set_cursor( window, m_cursor.GetCursor() );
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();

View File

@ -749,6 +749,10 @@ void wxFrame::OnInternalIdle()
GtkOnSize( m_x, m_y, m_width, m_height );
DoMenuUpdates();
if (m_frameMenuBar) m_frameMenuBar->OnInternalIdle();
if (m_frameToolBar) m_frameToolBar->OnInternalIdle();
if (m_frameStatusBar) m_frameStatusBar->OnInternalIdle();
}
void wxFrame::OnCloseWindow( wxCloseEvent& WXUNUSED(event) )

View File

@ -2030,10 +2030,14 @@ void wxWindow::OnInternalIdle()
GdkWindow *window = GetConnectWidget()->window;
if (window)
{
if (g_globalCursor.Ok())
gdk_window_set_cursor( window, g_globalCursor.GetCursor() );
else
gdk_window_set_cursor( window, m_cursor.GetCursor() );
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();