Updated code for the invisible cursor on wxGTK (fixes compilation on wxMSW 3.0).
This commit is contained in:
parent
bdd8875692
commit
f38a0d8a97
@ -151,14 +151,11 @@ MyPanel::MyPanel(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSi
|
|||||||
refreshTimer.SetOwner (this);
|
refreshTimer.SetOwner (this);
|
||||||
refreshTimer.Start (100);
|
refreshTimer.Start (100);
|
||||||
needRefresh = true;
|
needRefresh = true;
|
||||||
const char bits[1] = { 0 };
|
|
||||||
blankCursor = new wxCursor (bits, 1, 1, -1, -1, bits);
|
|
||||||
thePanel = this;
|
thePanel = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
MyPanel::~MyPanel()
|
MyPanel::~MyPanel()
|
||||||
{
|
{
|
||||||
delete blankCursor;
|
|
||||||
thePanel = NULL;
|
thePanel = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -234,7 +231,7 @@ void MyPanel::ToggleMouse(bool fromToolbar)
|
|||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
ShowCursor(0);
|
ShowCursor(0);
|
||||||
#else
|
#else
|
||||||
SetCursor(*blankCursor);
|
SetCursor(wxCURSOR_BLANK);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// $Id$
|
// $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
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
@ -157,7 +157,6 @@ public:
|
|||||||
static void OnPluginInit();
|
static void OnPluginInit();
|
||||||
void ToggleMouse(bool fromToolbar);
|
void ToggleMouse(bool fromToolbar);
|
||||||
private:
|
private:
|
||||||
wxCursor *blankCursor;
|
|
||||||
bool needRefresh;
|
bool needRefresh;
|
||||||
wxTimer refreshTimer;
|
wxTimer refreshTimer;
|
||||||
Bit16s mouseSavedX, mouseSavedY;
|
Bit16s mouseSavedX, mouseSavedY;
|
||||||
|
Loading…
Reference in New Issue
Block a user