Emitting To Front Event to Other Task's window

We have an application that handles ‘global’ hotkey, i.e. hotkeys like
print-screen that have a system wide effect. Usually, such keys are used to
select (give focus to) another photon application.

If I emit only a ‘Focus’ event, the windows doesn’t come forward, so I emit
a ToFront event first then I emit the ‘Focus’ event. But that’s ok.

The problem is that Photon doesn’t switch to the console on which the
program’s window is located like I want to.

I tried the ‘SUPERSELECT’ pseudo-event but it breaks something else in some
of our application because it seems that the Superselect makes the window
Loose the focus and gain it back again afterwards but I don’t want to get
into these details too much.

Also, Superselect does not perform exactly what I want because it actually
bring the task’s window into the current console which is not what I want.

Is there a way to simulate the action of selection an application in the
task bar, which perform’s exactly what I want ?

P.s. I’m Using Photon 1.14 A or B (can’t recall and I can’t check from where
I am now)…

Thanks in advance.

marclupien@hotmail.com

Let me give a little bit more details…

“Marc Lupien” <marclupien@hotmail.com> wrote in message
news:9eit2q$et9$1@inn.qnx.com

We have an application that handles ‘global’ hotkey, i.e. hotkeys like
print-screen that have a system wide effect. Usually, such keys are used
to
select (give focus to) another photon application.

This app opens a region and receives ALL keyboard input. If the key pressed
has no special action associated with it, it re-emits it so it can be
processed normally. If the key has an ‘activate’ action defined, the app
tries to locate the task name from the task list on the current node, when
it finds it, it tries to activate that task by sending a Focus window event
to it (given it’s pid). We call it the ‘target’ process.

If I emit only a ‘Focus’ event, the windows doesn’t come forward, so I
emit
a ToFront event first then I emit the ‘Focus’ event. But that’s ok.

The problem is that Photon doesn’t switch to the console on which the
program’s window is located like I want to.

If the target process’ window is located on a console that is not the
current console, the window gets selected but it is not visible to the user.

I tried the ‘SUPERSELECT’ pseudo-event but it breaks something else in
some
of our application because it seems that the Superselect makes the window
Loose the focus and gain it back again afterwards but I don’t want to get
into these details too much.

Also, Superselect does not perform exactly what I want because it actually
bring the task’s window into the current console which is not what I want.

Is there a way to simulate the action of selection an application in the
task bar, which perform’s exactly what I want ?

This is exactly what the global-hotkey app needs to emulate. I thought that
sending a ToFront event to it would switch the current console to the
console on which the window is located but it’s not…

P.s. I’m Using Photon 1.14 A or B (can’t recall and I can’t check from
where
I am now)…

Thanks in advance.

marclupien@hotmail.com