World View "panes"

How does one figure out which “pane” of the World View plugin is
currently active through software?

I’m not sure what QNX calls them, as there is no documentation for World
View. Other OSes call them “virtual screens” or “virtual desktops.”

Mathew Kirsch <mkirsch@ocdus.jnj.com> wrote:

How does one figure out which “pane” of the World View plugin is
currently active through software?

Create a small, invisible window with the flags to follow console
switching, and notification of that active. Then check its input
group’s offsets and compare with screen resolution to calculate the
current virtual console.

I’m not sure what QNX calls them, as there is no documentation for World
View. Other OSes call them “virtual screens” or “virtual desktops.”

I’m not sure either – I call them virtual consoles, cause I used to
use them in text mode, and they were consoles then.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

I belive you could also use PhWindowQueryVisible() wth Ph_QUERY_CONSOLE
and calculate the current console.

chris


David Gibbs <dagibbs@qnx.com> wrote:

Mathew Kirsch <> mkirsch@ocdus.jnj.com> > wrote:
How does one figure out which “pane” of the World View plugin is
currently active through software?

Create a small, invisible window with the flags to follow console
switching, and notification of that active. Then check its input
group’s offsets and compare with screen resolution to calculate the
current virtual console.

I’m not sure what QNX calls them, as there is no documentation for World
View. Other OSes call them “virtual screens” or “virtual desktops.”

I’m not sure either – I call them virtual consoles, cause I used to
use them in text mode, and they were consoles then.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

Chris McKillop <cdm@qnx.com> wrote:

I belive you could also use PhWindowQueryVisible() wth Ph_QUERY_CONSOLE
and calculate the current console.

Yeah, the docs for PhWindowQueryVisible() suggest using Ph_QUERY_GRAPHICS
to get the abs coordinates of the current console.

Since we do a 3x3 block, a bit of math should give you a virtual
console “number” as well.

Math suggested by someone else in email:

console # =
1 +
3 * rect.ul.y / ( rect.lr.y - rect.ul.y + 1 )

  • rect.ul.x / ( rect.lr.x - rect.ul.x + 1 )

(Assuming that ctr-alt-1 takes you to console 1, if you want to call that
console 0 (which might not be wrong in C), then don’t do the “1 +” bit.)

This is easier than having to have a window up, but my little window
will give you notification any time the active console is changed.

-David

David Gibbs <> dagibbs@qnx.com> > wrote:
Mathew Kirsch <> mkirsch@ocdus.jnj.com> > wrote:
How does one figure out which “pane” of the World View plugin is
currently active through software?

Create a small, invisible window with the flags to follow console
switching, and notification of that active. Then check its input
group’s offsets and compare with screen resolution to calculate the
current virtual console.

I’m not sure what QNX calls them, as there is no documentation for World
View. Other OSes call them “virtual screens” or “virtual desktops.”

I’m not sure either – I call them virtual consoles, cause I used to
use them in text mode, and they were consoles then.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.


Chris McKillop <> cdm@qnx.com> > “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/


QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

David Gibbs wrote:

I belive you could also use PhWindowQueryVisible() wth Ph_QUERY_CONSOLE
and calculate the current console.


Yeah, the docs for PhWindowQueryVisible() suggest using Ph_QUERY_GRAPHICS
to get the abs coordinates of the current console.

Too cool. This is exactly what I was looking for!

Thanks guys.

Mathew Kirsch <mkirsch@ocdus.jnj.com> wrote:

David Gibbs wrote:
I belive you could also use PhWindowQueryVisible() wth Ph_QUERY_CONSOLE
and calculate the current console.


Yeah, the docs for PhWindowQueryVisible() suggest using Ph_QUERY_GRAPHICS
to get the abs coordinates of the current console.

And someone internal tells me that Ph_QUERY_CONSOLE is, actually,
better than Ph_QUERY_GRAPHICS. (And that the docs example should
be updated.)

Too cool. This is exactly what I was looking for!

Great.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.