Don't do anything in WaitForPaint class under non-GTK platforms
Under MSW the tests pass even without it, so don't make them take longer unnecessarily.
This commit is contained in:
parent
8534ec4699
commit
94bdb7402d
1 changed files with 22 additions and 1 deletions
|
|
@ -12,7 +12,11 @@
|
|||
#include "wx/stopwatch.h"
|
||||
#include "wx/window.h"
|
||||
|
||||
// Class used to check if we received the (first) paint event.
|
||||
// Class used to check if we received the (first) paint event: this is
|
||||
// currently used under GTK only, as MSW doesn't seem to need to wait for the
|
||||
// things to work, while under Mac nothing works anyhow.
|
||||
#ifdef __WXGTK__
|
||||
|
||||
class WaitForPaint
|
||||
{
|
||||
public:
|
||||
|
|
@ -72,4 +76,21 @@ private:
|
|||
} m_handler;
|
||||
};
|
||||
|
||||
#else // !__WXGTK__
|
||||
|
||||
class WaitForPaint
|
||||
{
|
||||
public:
|
||||
explicit WaitForPaint(wxWindow* WXUNUSED(win))
|
||||
{
|
||||
}
|
||||
|
||||
bool YieldUntilPainted(int WXUNUSED(timeoutInMS) = 250) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // __WXGTK__/!__WXGTK__
|
||||
|
||||
#endif // _WX_TESTS_WAITFORPAINT_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue