Tried to find a non-existing bug in the cursor-code

Removed Karsten's third Makefile.in attempt


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 1998-09-09 09:57:24 +00:00
parent ab346a0c3f
commit d8c838755a
5 changed files with 104 additions and 40 deletions

View File

@ -48,11 +48,13 @@ install::
@echo " "
@echo " Creating directories.."
@$(WXBASEDIR)/mkinstalldirs \
@prefix@/include/wx \
@prefix@/include/wx/gtk \
@prefix@/include/wx/common \
@prefix@/include/wx/generic \
@prefix@/include/wx/protocol \
$(includedir)/wx \
$(includedir)/wx/gtk \
$(includedir)/wx/common \
$(includedir)/wx/generic \
$(includedir)/wx/protocol \
$(libdir) \
$(bindir)
@echo " Copying headers from /include/wx"
@cd $(WXBASEDIR)/include/wx ; \
$(INSTALL) -d $(includedir)/wx ; \
@ -66,9 +68,7 @@ install::
for f in *.h ; do \
rm -f $(includedir)/wx/gtk/$$f ; \
$(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \
done ; \
$(INSTALL) -d $(includedir)/wx/@host@/wx/gtk ;\
mv $(includedir)/wx/gtk/setup.h $(includedir)/wx/@host@/wx/gtk/setup.h ;\
done ;
@echo " Copying headers from /include/wx/generic"
@cd $(WXBASEDIR)/include/wx/generic ; \
$(INSTALL) -d $(includedir)/wx/generic ; \
@ -88,21 +88,21 @@ install::
rm -f $(bindir)/wx-config ; \
$(INSTALL_PROGRAM) wx-config $(bindir)/wx-config
@echo " Copying static library"
$(INSTALL) -d $(libdir) ;\
@cd $(WXBASEDIR)/lib/$(OS) ; \
rm -f $(libdir)/$(STATIC_LIBRARY) ; \
$(INSTALL_DATA) $(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY)
@echo " Copying shared library"
@cd $(WXBASEDIR)/lib/$(OS) ; \
rm -f $(libdir)/$(SHARED_LIBRARY) ; \
$(INSTALL_PROGRAM) $(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \
$(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \
$(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so
@if test -d $(SHARED_LIBRARY); then \
echo " Copying shared library" \
cd $(WXBASEDIR)/lib/$(OS) ; \
rm -f $(libdir)/$(SHARED_LIBRARY) ; \
$(INSTALL_PROGRAM) $(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \
$(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \
$(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \
fi
@echo " "
@echo "Installation complete. You may have to run ldconfig!"
@echo " "
clean::
$(RM) -rf gtk
$(RM) -rf qt

View File

@ -133,7 +133,7 @@ bool wxCursor::operator != ( const wxCursor& cursor )
bool wxCursor::Ok(void) const
{
return TRUE;
return (m_refData != NULL);
}
GdkCursor *wxCursor::GetCursor(void) const

View File

@ -134,6 +134,13 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
if (gdk_event->count > 0) return;
/*
printf( "OnExpose from " );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
printf( win->GetClassInfo()->GetClassName() );
printf( ".\n" );
*/
wxPaintEvent event( win->GetId() );
event.SetEventObject( win );
win->GetEventHandler()->ProcessEvent( event );
@ -616,7 +623,14 @@ static gint gtk_window_enter_callback( GtkWidget *widget, GdkEventCrossing *gdk_
if (!win->HasVMT()) return TRUE;
if (widget->window)
/*
printf( "OnEnter from " );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
printf( win->GetClassInfo()->GetClassName() );
printf( ".\n" );
*/
if ((widget->window) && (win->m_cursor))
gdk_window_set_cursor( widget->window, win->m_cursor->GetCursor() );
wxMouseEvent event( wxEVT_ENTER_WINDOW );
@ -640,7 +654,14 @@ static gint gtk_window_leave_callback( GtkWidget *widget, GdkEventCrossing *gdk_
if (!win->HasVMT()) return TRUE;
if (widget->window)
/*
printf( "OnLeave from " );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
printf( win->GetClassInfo()->GetClassName() );
printf( ".\n" );
*/
if ((widget->window) && (win->m_cursor))
gdk_window_set_cursor( widget->window, wxSTANDARD_CURSOR->GetCursor() );
wxMouseEvent event( wxEVT_LEAVE_WINDOW );
@ -831,7 +852,7 @@ wxWindow::wxWindow()
m_eventHandler = this;
m_windowValidator = (wxValidator *) NULL;
m_windowId = -1;
m_cursor = new wxCursor( wxCURSOR_ARROW );
m_cursor = (wxCursor *) NULL;
m_font = *wxSWISS_FONT;
m_windowStyle = 0;
m_windowName = "noname";
@ -1063,7 +1084,7 @@ void wxWindow::PostCreation(void)
gdk_gc_set_exposures( m_wxwindow->style->fg_gc[0], TRUE );
}
SetCursor( wxSTANDARD_CURSOR );
SetCursor( *wxSTANDARD_CURSOR );
m_hasVMT = TRUE;
}
@ -1704,15 +1725,26 @@ wxWindowID wxWindow::GetId(void)
void wxWindow::SetCursor( const wxCursor &cursor )
{
wxASSERT(m_cursor != NULL);
if (m_cursor == NULL)
{
wxFAIL_MSG( "wxWindow::SetCursor m_cursor == NULL" );
m_cursor = new wxCursor( wxCURSOR_ARROW );
}
if (cursor.Ok())
{
if (*((wxCursor*)&cursor) == m_cursor) return;
*m_cursor = cursor;
}
else
{
*m_cursor = *wxSTANDARD_CURSOR;
}
if (m_cursor != NULL)
if (*m_cursor == cursor)
return;
(*m_cursor) = cursor;
if (m_widget->window)
if ((m_widget) && (m_widget->window))
gdk_window_set_cursor( m_widget->window, m_cursor->GetCursor() );
if (m_wxwindow && m_wxwindow->window)
if ((m_wxwindow) && (m_wxwindow->window))
gdk_window_set_cursor( m_wxwindow->window, m_cursor->GetCursor() );
}

View File

@ -133,7 +133,7 @@ bool wxCursor::operator != ( const wxCursor& cursor )
bool wxCursor::Ok(void) const
{
return TRUE;
return (m_refData != NULL);
}
GdkCursor *wxCursor::GetCursor(void) const

View File

@ -134,6 +134,13 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
if (gdk_event->count > 0) return;
/*
printf( "OnExpose from " );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
printf( win->GetClassInfo()->GetClassName() );
printf( ".\n" );
*/
wxPaintEvent event( win->GetId() );
event.SetEventObject( win );
win->GetEventHandler()->ProcessEvent( event );
@ -616,7 +623,14 @@ static gint gtk_window_enter_callback( GtkWidget *widget, GdkEventCrossing *gdk_
if (!win->HasVMT()) return TRUE;
if (widget->window)
/*
printf( "OnEnter from " );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
printf( win->GetClassInfo()->GetClassName() );
printf( ".\n" );
*/
if ((widget->window) && (win->m_cursor))
gdk_window_set_cursor( widget->window, win->m_cursor->GetCursor() );
wxMouseEvent event( wxEVT_ENTER_WINDOW );
@ -640,7 +654,14 @@ static gint gtk_window_leave_callback( GtkWidget *widget, GdkEventCrossing *gdk_
if (!win->HasVMT()) return TRUE;
if (widget->window)
/*
printf( "OnLeave from " );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
printf( win->GetClassInfo()->GetClassName() );
printf( ".\n" );
*/
if ((widget->window) && (win->m_cursor))
gdk_window_set_cursor( widget->window, wxSTANDARD_CURSOR->GetCursor() );
wxMouseEvent event( wxEVT_LEAVE_WINDOW );
@ -831,7 +852,7 @@ wxWindow::wxWindow()
m_eventHandler = this;
m_windowValidator = (wxValidator *) NULL;
m_windowId = -1;
m_cursor = new wxCursor( wxCURSOR_ARROW );
m_cursor = (wxCursor *) NULL;
m_font = *wxSWISS_FONT;
m_windowStyle = 0;
m_windowName = "noname";
@ -1063,7 +1084,7 @@ void wxWindow::PostCreation(void)
gdk_gc_set_exposures( m_wxwindow->style->fg_gc[0], TRUE );
}
SetCursor( wxSTANDARD_CURSOR );
SetCursor( *wxSTANDARD_CURSOR );
m_hasVMT = TRUE;
}
@ -1704,15 +1725,26 @@ wxWindowID wxWindow::GetId(void)
void wxWindow::SetCursor( const wxCursor &cursor )
{
wxASSERT(m_cursor != NULL);
if (m_cursor == NULL)
{
wxFAIL_MSG( "wxWindow::SetCursor m_cursor == NULL" );
m_cursor = new wxCursor( wxCURSOR_ARROW );
}
if (cursor.Ok())
{
if (*((wxCursor*)&cursor) == m_cursor) return;
*m_cursor = cursor;
}
else
{
*m_cursor = *wxSTANDARD_CURSOR;
}
if (m_cursor != NULL)
if (*m_cursor == cursor)
return;
(*m_cursor) = cursor;
if (m_widget->window)
if ((m_widget) && (m_widget->window))
gdk_window_set_cursor( m_widget->window, m_cursor->GetCursor() );
if (m_wxwindow && m_wxwindow->window)
if ((m_wxwindow) && (m_wxwindow->window))
gdk_window_set_cursor( m_wxwindow->window, m_cursor->GetCursor() );
}