]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
Motif compilation fixes (now ok)
[wxWidgets.git] / src / gtk / window.cpp
index 39a203d80476d847e28443880913a74deba41e66..6a50e9e1fe31722d6de068f594e8619e15017261 100644 (file)
@@ -171,7 +171,6 @@ void debug_focus_in( GtkWidget* widget, const char* name, const char *window )
 //-----------------------------------------------------------------------------
 
 extern wxList     wxPendingDelete;
-extern wxList     wxTopLevelWindows;
 extern bool       g_blockEventsOnDrag;
 extern bool       g_blockEventsOnScroll;
 static bool       g_capturing = FALSE;
@@ -1081,6 +1080,7 @@ static void gtk_window_vscroll_callback( GtkWidget *WXUNUSED(widget), wxWindow *
 
     float diff = win->m_vAdjust->value - win->m_oldVerticalPos;
     if (fabs(diff) < 0.2) return;
+    win->m_oldVerticalPos = win->m_vAdjust->value;
 
     wxEventType command = wxEVT_NULL;
 
@@ -1128,6 +1128,7 @@ static void gtk_window_hscroll_callback( GtkWidget *WXUNUSED(widget), wxWindow *
 
     float diff = win->m_hAdjust->value - win->m_oldHorizontalPos;
     if (fabs(diff) < 0.2) return;
+    win->m_oldHorizontalPos = win->m_hAdjust->value;
 
     wxEventType command = wxEVT_NULL;
 
@@ -2748,7 +2749,7 @@ void wxWindow::InitDialog()
 static void SetInvokingWindow( wxMenu *menu, wxWindow *win )
 {
     menu->SetInvokingWindow( win );
-    wxNode *node = menu->m_items.First();
+    wxNode *node = menu->GetItems().First();
     while (node)
     {
         wxMenuItem *menuitem = (wxMenuItem*)node->Data();
@@ -2835,7 +2836,9 @@ bool wxWindow::IsOwnGtkWindow( GdkWindow *window )
 void wxWindow::SetFont( const wxFont &font )
 {
     wxCHECK_RET( m_widget != NULL, "invalid window" );
-
+    
+    if (m_font == font) return;
+    
     if (((wxFont*)&font)->Ok())
         m_font = font;
     else