Re: How to judge if GtkWindow is on top of hildon desktop or NOT

2007-07-25 Thread Simon Budig
Zhu, Peter J ([EMAIL PROTECTED]) wrote:
> I used differnt solution. Hildon library has a special function of
> hildon_window_get_is_topmost() to address this very elegantly.

Yeah, I read your second mail after I replied  :)

It probably depends on what you want. If you just want to check if your
application is running in the foreground then this probably is the right
thing to do.

On the other hand if you really need the visibility state, then my
approach probably works better, for example to test if a dialog or
something else is on top of the window.

Bye,
Simon
-- 
  [EMAIL PROTECTED]  http://simon.budig.de/
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


RE: How to judge if GtkWindow is on top of hildon desktop or NOT

2007-07-25 Thread Zhu, Peter J
Simon,

Thanks for response. You get me a new way looking at this issue. 

I used differnt solution. Hildon library has a special function of
hildon_window_get_is_topmost() to address this very elegantly.


Peter

Simon Budig wrote:
> Zhu, Peter J ([EMAIL PROTECTED]) wrote:
>> I tried to use both gdk_window_is_visible and gtk_window_is_active to
>> judge if GtkWindow is on top of hildon desktop or not. But
>> unfortunately both fail to get correct result.
> 
> Well, the result probably is correct, but does not describe the
> visibility in your sense  :)
> 
> To track the effective visibility state connect a callback to the
> visibility-notify-event signal. This gets invoked whenever the
> visibility changes and you'll get a GdkVisibilityState, indicating if
> your widget is fully visible, partially obscured or fully obscured.
> 
> Hope this helps,
> Simon
> --
>   [EMAIL PROTECTED]  http://simon.budig.de/
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to judge if GtkWindow is on top of hildon desktop or NOT

2007-07-25 Thread Simon Budig
Zhu, Peter J ([EMAIL PROTECTED]) wrote:
> I tried to use both gdk_window_is_visible and gtk_window_is_active to
> judge if GtkWindow is on top of hildon desktop or not. But unfortunately
> both fail to get correct result. 

Well, the result probably is correct, but does not describe the
visibility in your sense  :)

To track the effective visibility state connect a callback to the
visibility-notify-event signal. This gets invoked whenever the
visibility changes and you'll get a GdkVisibilityState, indicating if
your widget is fully visible, partially obscured or fully obscured.

Hope this helps,
Simon
-- 
  [EMAIL PROTECTED]  http://simon.budig.de/
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


RE: How to judge if GtkWindow is on top of hildon desktop or NOT

2007-07-18 Thread Zhu, Peter J
I get what I want with hildon_window_get_is_topmost.



Zhu, Peter J wrote on Thursday, July 19, 2007 1:48 AM:

> I tried to use both gdk_window_is_visible and gtk_window_is_active to
> judge if GtkWindow is on top of hildon desktop or not. But
> unfortunately both fail to get correct result.
> 
> For example, I launch my window and lauch another window on top of
> mine. Then I judge if mine is still on top of desktop. But both
> methods return TRUE. That's not correct. Anyone knows how to?
> 
> Thanks.
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


How to judge if GtkWindow is on top of hildon desktop or NOT

2007-07-18 Thread Zhu, Peter J
I tried to use both gdk_window_is_visible and gtk_window_is_active to
judge if GtkWindow is on top of hildon desktop or not. But unfortunately
both fail to get correct result. 

For example, I launch my window and lauch another window on top of mine.
Then I judge if mine is still on top of desktop. But both methods return
TRUE. That's not correct. Anyone knows how to?

Thanks.
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers