Active Topics

 


Reply
Thread Tools
tz1's Avatar
Posts: 716 | Thanked: 236 times | Joined on Dec 2007
#1
I have not been able to figure out how to have my application bring its window to the top. I tried application_top, but it seems to be ignoring my messages (I did put the service file, but it isn't clear if I also need a desktop, or what the fields need to be exactly). window_show doesn't do it.

The application runs in the background normally until it sees something and then it enables the display (this is working), but it needs to bring itself to the foreground.

Any ideas?
 
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#2
Maybe one of these might work:

anyWidget.get_toplevel().show_all()
anyWidget.get_toplevel().window.raise_()

OR

anyWidget.get_toplevel().show_all()
anyWidget.get_root_window().raise_()

They should be equivalent.

Here's a link to the doc.
__________________
N9: Go white or go home
 

The Following 2 Users Say Thank You to daperl For This Useful Post:
Johnx's Avatar
Posts: 643 | Thanked: 628 times | Joined on Mar 2007 @ Seattle (or thereabouts)
#3
As a personal request: Please think long and hard before you "steal focus" from another app. Maybe set the window manager urgent hint or sometthing. One of my biggest pet peeves is apps stealing focus/rising the top when I'm in the middle of using another app.

-John
 

The Following User Says Thank You to Johnx For This Useful Post:
tz1's Avatar
Posts: 716 | Thanked: 236 times | Joined on Dec 2007
#4
The correct method is present, e.g. get the window, then do "window.present()".

It was nearby.

The application is a radar detector (the Valentine V1, which I've supported in minigpsd). When it detects something I really, really want it to come to the top and turn the display on. It will also likely be captive in my waterproof box on my motorcycle, so I won't be doing much fingering.

I'm close to simulating the signaling tones, but first needed to get the display working properly.

(side note - the converse is window.iconify() )

Last edited by tz1; 2009-06-08 at 00:40. Reason: iconify
 

The Following 3 Users Say Thank You to tz1 For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 14:52.