Updated code for the invisible cursor on wxGTK (fixes compilation on wxMSW 3.0).

This commit is contained in:
Volker Ruppert 2017-06-03 14:32:56 +00:00
parent bdd8875692
commit f38a0d8a97
2 changed files with 2 additions and 6 deletions

View File

@ -151,14 +151,11 @@ MyPanel::MyPanel(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSi
refreshTimer.SetOwner (this);
refreshTimer.Start (100);
needRefresh = true;
const char bits[1] = { 0 };
blankCursor = new wxCursor (bits, 1, 1, -1, -1, bits);
thePanel = this;
}
MyPanel::~MyPanel()
{
delete blankCursor;
thePanel = NULL;
}
@ -234,7 +231,7 @@ void MyPanel::ToggleMouse(bool fromToolbar)
#if defined(__WXMSW__)
ShowCursor(0);
#else
SetCursor(*blankCursor);
SetCursor(wxCURSOR_BLANK);
#endif
} else {
#if defined(__WXMSW__)

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002-2016 The Bochs Project
// Copyright (C) 2002-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -157,7 +157,6 @@ public:
static void OnPluginInit();
void ToggleMouse(bool fromToolbar);
private:
wxCursor *blankCursor;
bool needRefresh;
wxTimer refreshTimer;
Bit16s mouseSavedX, mouseSavedY;