Add wxProcess::Activate() and implement it for MSW.
When launching child processes it can be convenient to be able to switch to them later, provide a method in wxProcess to do it. Currently this is only implemented in wxMSW but could almost certainly be done for wxOSX too (it can be done using Apple Script, so presumably there is a way to do it programmatically as well) and could be also made to work at least under some Unix systems by emulating what wmctrl does (or just launching it?).
This commit is contained in:
@@ -176,6 +176,18 @@ bool wxProcess::Exists(int pid)
|
||||
}
|
||||
}
|
||||
|
||||
bool wxProcess::Activate() const
|
||||
{
|
||||
#ifdef __WINDOWS__
|
||||
// This function is defined in src/msw/utils.cpp.
|
||||
extern bool wxMSWActivatePID(long pid);
|
||||
|
||||
return wxMSWActivatePID(m_pid);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxProcess::SetPriority(unsigned priority)
|
||||
{
|
||||
wxCHECK_RET( priority <= wxPRIORITY_MAX,
|
||||
|
||||
Reference in New Issue
Block a user