From 076d2575bc9b1b5a844d90fcae77988a4fd5a73e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karsten=20Ball=C3=BCder?= Date: Thu, 17 Jun 1999 17:01:53 +0000 Subject: [PATCH] Fixed the ugly cursor. global cursor no longer initialised, broken code in window.cpp fixed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/app.cpp | 3 ++- src/gtk/window.cpp | 2 +- src/gtk1/app.cpp | 3 ++- src/gtk1/window.cpp | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 2b96d69033..df4d2f0eb1 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -577,7 +577,8 @@ bool wxApp::Initialize() wxImage::InitStandardHandlers(); - g_globalCursor = wxCursor(wxCURSOR_DEFAULT); + // Not needed, leave it as default. (KB) + // g_globalCursor = wxCursor(wxCURSOR_DEFAULT); wxModule::RegisterModules(); if (!wxModule::InitializeModules()) return FALSE; diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 6ac1773a14..fc09ed7eb5 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -2069,7 +2069,7 @@ void wxWindow::OnInternalIdle() wxCursor cursor = m_cursor; if (g_globalCursor.Ok()) cursor = g_globalCursor; - if (m_currentGdkCursor != cursor) + if (cursor.Ok() && m_currentGdkCursor != cursor) { gdk_window_set_cursor( window, cursor.GetCursor() ); m_currentGdkCursor = cursor; diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index 2b96d69033..df4d2f0eb1 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -577,7 +577,8 @@ bool wxApp::Initialize() wxImage::InitStandardHandlers(); - g_globalCursor = wxCursor(wxCURSOR_DEFAULT); + // Not needed, leave it as default. (KB) + // g_globalCursor = wxCursor(wxCURSOR_DEFAULT); wxModule::RegisterModules(); if (!wxModule::InitializeModules()) return FALSE; diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 6ac1773a14..fc09ed7eb5 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -2069,7 +2069,7 @@ void wxWindow::OnInternalIdle() wxCursor cursor = m_cursor; if (g_globalCursor.Ok()) cursor = g_globalCursor; - if (m_currentGdkCursor != cursor) + if (cursor.Ok() && m_currentGdkCursor != cursor) { gdk_window_set_cursor( window, cursor.GetCursor() ); m_currentGdkCursor = cursor;