Discussion:
Activating a wxApplication, was Re: How to bring window to foreground on Mac OS
Stefan Csomor
2014-02-20 08:33:44 UTC
Permalink
Hi

I have an app running in the background and only having an icon on system status bar. When users plug in certain usb hardware, the main window should pop up and get user input. I think this behavior is not abrupt and expected by users. Here's the code.

yes, I see, this probably is the only situation where a bring to front is also accepted from mac user's standpoint, otherwise the attitude of apps 'I'm important, I want to talk to the general manager of this computer' is very annoying and frowned upon on macs.

Right now I have implemented that functionality in a private objective-c++ part only, what is the method on the other platforms - is calling Raise on the main window enough ? I'd like to use a rather specific API, so that not suddenly all wx-apps start to push in front on osx ...

Thanks,

Stefan
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
leo.zhou
2014-02-20 14:59:33 UTC
Permalink
Post by Stefan Csomor
Hi
I have an app running in the background and only having an icon on
Post by Stefan Csomor
system status bar. When users plug in certain usb hardware, the main window
should pop up and get user input. I think this behavior is not abrupt and
expected by users. Here's the code.
yes, I see, this probably is the only situation where a bring to front
is also accepted from mac user's standpoint, otherwise the attitude of apps
'I'm important, I want to talk to the general manager of this computer' is
very annoying and frowned upon on macs.
Right now I have implemented that functionality in a private
objective-c++ part only, what is the method on the other platforms – is
calling Raise on the main window enough ? I'd like to use a rather specific
API, so that not suddenly all wx-apps start to push in front on osx 

Thanks,
Stefan
Hi,
I'm really glad to hear that. Have you implemented the functionality
already in the latest trunk version? I tried Raise() but it doesn't work.
Thanks!

Leo
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
David Connet
2014-02-20 15:23:36 UTC
Permalink
Post by Stefan Csomor
Hi
I have an app running in the background and only having an
icon on system status bar. When users plug in certain usb
hardware, the main window should pop up and get user input. I
think this behavior is not abrupt and expected by users. Here's
the code.
yes, I see, this probably is the only situation where a bring to front
is also accepted from mac user's standpoint, otherwise the attitude of
apps 'I'm important, I want to talk to the general manager of this
computer' is very annoying and frowned upon on macs.
Not just macs! As a Windows user, it's very annoying too! Can't say how
many times I've been typing away and an application does that. ("What
the ^$% did I just answer yes/no/cancel/etc to???")
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Kobus Grobler
2014-02-21 08:42:25 UTC
Permalink
Post by Stefan Csomor
Hi
I have an app running in the background and only having an
icon on system status bar. When users plug in certain usb
hardware, the main window should pop up and get user input. I
think this behavior is not abrupt and expected by users.
Here's the code.
yes, I see, this probably is the only situation where a bring to front
is also accepted from mac user's standpoint, otherwise the attitude of
apps 'I'm important, I want to talk to the general manager of this
computer' is very annoying and frowned upon on macs.
The other use case (and I'm sure there are many more) is that you cannot
"Cmd-Tab" to a frame opened by a status bar app. So if you have an open
frame you need to bring it to the foreground when the user clicks on the
status bar icon (or other menu action).
See for example Google Drive's Preferences window.

Currently I hack in a bit of objective-c ("[NSApp
activateIgnoringOtherApps:YES];") to do that and send some custom
message on Windows.

Would be nice to have it in the wx framework though.

Best
Kobus
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
leo.zhou
2014-02-21 11:29:43 UTC
Permalink
Post by Stefan Csomor
Hi
I have an app running in the background and only having an icon on
Post by Stefan Csomor
system status bar. When users plug in certain usb hardware, the main window
should pop up and get user input. I think this behavior is not abrupt and
expected by users. Here's the code.
yes, I see, this probably is the only situation where a bring to front
is also accepted from mac user's standpoint, otherwise the attitude of apps
'I'm important, I want to talk to the general manager of this computer' is
very annoying and frowned upon on macs.
The other use case (and I'm sure there are many more) is that you cannot
"Cmd-Tab" to a frame opened by a status bar app. So if you have an open
frame you need to bring it to the foreground when the user clicks on the
status bar icon (or other menu action).
See for example Google Drive's Preferences window.
Currently I hack in a bit of objective-c ("[NSApp
activateIgnoringOtherApps:YES];") to do that and send some custom message
on Windows.
Would be nice to have it in the wx framework though.
Best
Kobus
Yes, you're absolutely right! Hope some update to wx framework very soon :)
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
leo.zhou
2014-02-26 08:32:17 UTC
Permalink
Post by Stefan Csomor
Hi
I have an app running in the background and only having an icon on
Post by Stefan Csomor
system status bar. When users plug in certain usb hardware, the main window
should pop up and get user input. I think this behavior is not abrupt and
expected by users. Here's the code.
yes, I see, this probably is the only situation where a bring to front
is also accepted from mac user's standpoint, otherwise the attitude of apps
'I'm important, I want to talk to the general manager of this computer' is
very annoying and frowned upon on macs.
Right now I have implemented that functionality in a private
objective-c++ part only, what is the method on the other platforms – is
calling Raise on the main window enough ? I'd like to use a rather specific
API, so that not suddenly all wx-apps start to push in front on osx 

Thanks,
Stefan
Hi,
I just want to check if any progress has been made to support this
functionality. Thanks!!

Leo
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...