Skip to content

Commit 50455cd

Browse files
committed
Add comments - IPC
1 parent 66fb294 commit 50455cd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

source/application.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ bool Application::OnInit()
125125
ClientVersion::loadVersions();
126126

127127
#ifdef _USE_PROCESS_COM
128-
m_single_instance_checker = newd wxSingleInstanceChecker;
128+
m_single_instance_checker = newd wxSingleInstanceChecker; //Instance checker has to stay alive throughout the applications lifetime
129129
if (g_settings.getInteger(Config::ONLY_ONE_INSTANCE) && m_single_instance_checker->IsAnotherRunning()) {
130130
RMEProcessClient client;
131131
wxConnectionBase* connection = client.MakeConnection("localhost", "rme_host", "rme_talk");
@@ -139,7 +139,7 @@ bool Application::OnInit()
139139
wxDELETE(connection);
140140
}
141141
wxDELETE(m_single_instance_checker);
142-
return false;
142+
return false; //Since we return false - OnExit is never called
143143
}
144144
// We act as server then
145145
m_proc_server = newd RMEProcessServer();

source/process_com.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ RMEProcessServer::~RMEProcessServer()
4040
wxConnectionBase* RMEProcessServer::OnAcceptConnection(const wxString& topic)
4141
{
4242
if(topic.Lower() == "rme_talk") {
43-
g_gui.root->Iconize(false);
44-
g_gui.root->Raise();
43+
g_gui.root->Iconize(false); //Show application if minimized
44+
g_gui.root->Raise(); //Request the window manager to raise this application to the top of Z-order
4545
return newd RMEProcessConnection();
4646
}
4747
return nullptr;

0 commit comments

Comments
 (0)