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:
@@ -48,11 +48,13 @@ install::
|
|||||||
@echo " "
|
@echo " "
|
||||||
@echo " Creating directories.."
|
@echo " Creating directories.."
|
||||||
@$(WXBASEDIR)/mkinstalldirs \
|
@$(WXBASEDIR)/mkinstalldirs \
|
||||||
@prefix@/include/wx \
|
$(includedir)/wx \
|
||||||
@prefix@/include/wx/gtk \
|
$(includedir)/wx/gtk \
|
||||||
@prefix@/include/wx/common \
|
$(includedir)/wx/common \
|
||||||
@prefix@/include/wx/generic \
|
$(includedir)/wx/generic \
|
||||||
@prefix@/include/wx/protocol \
|
$(includedir)/wx/protocol \
|
||||||
|
$(libdir) \
|
||||||
|
$(bindir)
|
||||||
@echo " Copying headers from /include/wx"
|
@echo " Copying headers from /include/wx"
|
||||||
@cd $(WXBASEDIR)/include/wx ; \
|
@cd $(WXBASEDIR)/include/wx ; \
|
||||||
$(INSTALL) -d $(includedir)/wx ; \
|
$(INSTALL) -d $(includedir)/wx ; \
|
||||||
@@ -66,9 +68,7 @@ install::
|
|||||||
for f in *.h ; do \
|
for f in *.h ; do \
|
||||||
rm -f $(includedir)/wx/gtk/$$f ; \
|
rm -f $(includedir)/wx/gtk/$$f ; \
|
||||||
$(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \
|
$(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \
|
||||||
done ; \
|
done ;
|
||||||
$(INSTALL) -d $(includedir)/wx/@host@/wx/gtk ;\
|
|
||||||
mv $(includedir)/wx/gtk/setup.h $(includedir)/wx/@host@/wx/gtk/setup.h ;\
|
|
||||||
@echo " Copying headers from /include/wx/generic"
|
@echo " Copying headers from /include/wx/generic"
|
||||||
@cd $(WXBASEDIR)/include/wx/generic ; \
|
@cd $(WXBASEDIR)/include/wx/generic ; \
|
||||||
$(INSTALL) -d $(includedir)/wx/generic ; \
|
$(INSTALL) -d $(includedir)/wx/generic ; \
|
||||||
@@ -88,21 +88,21 @@ install::
|
|||||||
rm -f $(bindir)/wx-config ; \
|
rm -f $(bindir)/wx-config ; \
|
||||||
$(INSTALL_PROGRAM) wx-config $(bindir)/wx-config
|
$(INSTALL_PROGRAM) wx-config $(bindir)/wx-config
|
||||||
@echo " Copying static library"
|
@echo " Copying static library"
|
||||||
$(INSTALL) -d $(libdir) ;\
|
|
||||||
@cd $(WXBASEDIR)/lib/$(OS) ; \
|
@cd $(WXBASEDIR)/lib/$(OS) ; \
|
||||||
rm -f $(libdir)/$(STATIC_LIBRARY) ; \
|
rm -f $(libdir)/$(STATIC_LIBRARY) ; \
|
||||||
$(INSTALL_DATA) $(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY)
|
$(INSTALL_DATA) $(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY)
|
||||||
@echo " Copying shared library"
|
@if test -d $(SHARED_LIBRARY); then \
|
||||||
@cd $(WXBASEDIR)/lib/$(OS) ; \
|
echo " Copying shared library" \
|
||||||
rm -f $(libdir)/$(SHARED_LIBRARY) ; \
|
cd $(WXBASEDIR)/lib/$(OS) ; \
|
||||||
$(INSTALL_PROGRAM) $(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \
|
rm -f $(libdir)/$(SHARED_LIBRARY) ; \
|
||||||
$(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \
|
$(INSTALL_PROGRAM) $(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \
|
||||||
$(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so
|
$(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \
|
||||||
|
$(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \
|
||||||
|
fi
|
||||||
@echo " "
|
@echo " "
|
||||||
@echo "Installation complete. You may have to run ldconfig!"
|
@echo "Installation complete. You may have to run ldconfig!"
|
||||||
@echo " "
|
@echo " "
|
||||||
|
|
||||||
|
|
||||||
clean::
|
clean::
|
||||||
$(RM) -rf gtk
|
$(RM) -rf gtk
|
||||||
$(RM) -rf qt
|
$(RM) -rf qt
|
||||||
|
@@ -133,7 +133,7 @@ bool wxCursor::operator != ( const wxCursor& cursor )
|
|||||||
|
|
||||||
bool wxCursor::Ok(void) const
|
bool wxCursor::Ok(void) const
|
||||||
{
|
{
|
||||||
return TRUE;
|
return (m_refData != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
GdkCursor *wxCursor::GetCursor(void) const
|
GdkCursor *wxCursor::GetCursor(void) const
|
||||||
|
@@ -134,6 +134,13 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
|
|||||||
|
|
||||||
if (gdk_event->count > 0) return;
|
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() );
|
wxPaintEvent event( win->GetId() );
|
||||||
event.SetEventObject( win );
|
event.SetEventObject( win );
|
||||||
win->GetEventHandler()->ProcessEvent( event );
|
win->GetEventHandler()->ProcessEvent( event );
|
||||||
@@ -616,7 +623,14 @@ static gint gtk_window_enter_callback( GtkWidget *widget, GdkEventCrossing *gdk_
|
|||||||
|
|
||||||
if (!win->HasVMT()) return TRUE;
|
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() );
|
gdk_window_set_cursor( widget->window, win->m_cursor->GetCursor() );
|
||||||
|
|
||||||
wxMouseEvent event( wxEVT_ENTER_WINDOW );
|
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 (!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() );
|
gdk_window_set_cursor( widget->window, wxSTANDARD_CURSOR->GetCursor() );
|
||||||
|
|
||||||
wxMouseEvent event( wxEVT_LEAVE_WINDOW );
|
wxMouseEvent event( wxEVT_LEAVE_WINDOW );
|
||||||
@@ -831,7 +852,7 @@ wxWindow::wxWindow()
|
|||||||
m_eventHandler = this;
|
m_eventHandler = this;
|
||||||
m_windowValidator = (wxValidator *) NULL;
|
m_windowValidator = (wxValidator *) NULL;
|
||||||
m_windowId = -1;
|
m_windowId = -1;
|
||||||
m_cursor = new wxCursor( wxCURSOR_ARROW );
|
m_cursor = (wxCursor *) NULL;
|
||||||
m_font = *wxSWISS_FONT;
|
m_font = *wxSWISS_FONT;
|
||||||
m_windowStyle = 0;
|
m_windowStyle = 0;
|
||||||
m_windowName = "noname";
|
m_windowName = "noname";
|
||||||
@@ -1063,7 +1084,7 @@ void wxWindow::PostCreation(void)
|
|||||||
gdk_gc_set_exposures( m_wxwindow->style->fg_gc[0], TRUE );
|
gdk_gc_set_exposures( m_wxwindow->style->fg_gc[0], TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
SetCursor( wxSTANDARD_CURSOR );
|
SetCursor( *wxSTANDARD_CURSOR );
|
||||||
|
|
||||||
m_hasVMT = TRUE;
|
m_hasVMT = TRUE;
|
||||||
}
|
}
|
||||||
@@ -1704,15 +1725,26 @@ wxWindowID wxWindow::GetId(void)
|
|||||||
|
|
||||||
void wxWindow::SetCursor( const wxCursor &cursor )
|
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_widget) && (m_widget->window))
|
||||||
if (*m_cursor == cursor)
|
|
||||||
return;
|
|
||||||
(*m_cursor) = cursor;
|
|
||||||
if (m_widget->window)
|
|
||||||
gdk_window_set_cursor( m_widget->window, m_cursor->GetCursor() );
|
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() );
|
gdk_window_set_cursor( m_wxwindow->window, m_cursor->GetCursor() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -133,7 +133,7 @@ bool wxCursor::operator != ( const wxCursor& cursor )
|
|||||||
|
|
||||||
bool wxCursor::Ok(void) const
|
bool wxCursor::Ok(void) const
|
||||||
{
|
{
|
||||||
return TRUE;
|
return (m_refData != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
GdkCursor *wxCursor::GetCursor(void) const
|
GdkCursor *wxCursor::GetCursor(void) const
|
||||||
|
@@ -134,6 +134,13 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
|
|||||||
|
|
||||||
if (gdk_event->count > 0) return;
|
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() );
|
wxPaintEvent event( win->GetId() );
|
||||||
event.SetEventObject( win );
|
event.SetEventObject( win );
|
||||||
win->GetEventHandler()->ProcessEvent( event );
|
win->GetEventHandler()->ProcessEvent( event );
|
||||||
@@ -616,7 +623,14 @@ static gint gtk_window_enter_callback( GtkWidget *widget, GdkEventCrossing *gdk_
|
|||||||
|
|
||||||
if (!win->HasVMT()) return TRUE;
|
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() );
|
gdk_window_set_cursor( widget->window, win->m_cursor->GetCursor() );
|
||||||
|
|
||||||
wxMouseEvent event( wxEVT_ENTER_WINDOW );
|
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 (!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() );
|
gdk_window_set_cursor( widget->window, wxSTANDARD_CURSOR->GetCursor() );
|
||||||
|
|
||||||
wxMouseEvent event( wxEVT_LEAVE_WINDOW );
|
wxMouseEvent event( wxEVT_LEAVE_WINDOW );
|
||||||
@@ -831,7 +852,7 @@ wxWindow::wxWindow()
|
|||||||
m_eventHandler = this;
|
m_eventHandler = this;
|
||||||
m_windowValidator = (wxValidator *) NULL;
|
m_windowValidator = (wxValidator *) NULL;
|
||||||
m_windowId = -1;
|
m_windowId = -1;
|
||||||
m_cursor = new wxCursor( wxCURSOR_ARROW );
|
m_cursor = (wxCursor *) NULL;
|
||||||
m_font = *wxSWISS_FONT;
|
m_font = *wxSWISS_FONT;
|
||||||
m_windowStyle = 0;
|
m_windowStyle = 0;
|
||||||
m_windowName = "noname";
|
m_windowName = "noname";
|
||||||
@@ -1063,7 +1084,7 @@ void wxWindow::PostCreation(void)
|
|||||||
gdk_gc_set_exposures( m_wxwindow->style->fg_gc[0], TRUE );
|
gdk_gc_set_exposures( m_wxwindow->style->fg_gc[0], TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
SetCursor( wxSTANDARD_CURSOR );
|
SetCursor( *wxSTANDARD_CURSOR );
|
||||||
|
|
||||||
m_hasVMT = TRUE;
|
m_hasVMT = TRUE;
|
||||||
}
|
}
|
||||||
@@ -1704,15 +1725,26 @@ wxWindowID wxWindow::GetId(void)
|
|||||||
|
|
||||||
void wxWindow::SetCursor( const wxCursor &cursor )
|
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_widget) && (m_widget->window))
|
||||||
if (*m_cursor == cursor)
|
|
||||||
return;
|
|
||||||
(*m_cursor) = cursor;
|
|
||||||
if (m_widget->window)
|
|
||||||
gdk_window_set_cursor( m_widget->window, m_cursor->GetCursor() );
|
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() );
|
gdk_window_set_cursor( m_wxwindow->window, m_cursor->GetCursor() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user