Re: Another libosso bug?

2007-09-19 Thread Kimmo Hämäläinen
On Mon, 2007-09-17 at 21:15 +0100, ext David Hazel wrote:
 Within my application, I am trying to bring the browser to the front
 in response to a certain user action. The call I am using is:
  
 osso_application_top(mvarAppCtx, osso_browser, NULL);
  
 However, nothing is happening in response to this call. My application
 remains visible, and the browser does not come to the front of the
 display. The question is, am I using the above call correctly (in
 particular, is the application name correct for the browser)? Are
 there any restrictions on the circumstances where I can expect this
 call to bring another application in front of mine?

This works for me:

-
#include stdio.h
#include glib.h
#include libosso.h

static GMainLoop *loop;

int main(int argc, char* argv[])
{
osso_context_t *context;

loop = g_main_loop_new(NULL, 1);
context = osso_initialize(toptest, 0.1, 0,
  g_main_loop_get_context(loop));

osso_application_top(context, osso_browser, NULL);

g_main_loop_run(loop);
return 0;
}
--

BR, Kimmo

  
  
 David Hazel
 ___
 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: Another libosso bug?

2007-09-19 Thread David Hazel
The logic is comparable to what I'm doing. However, in my case I'm calling
osso_application_top in response to a user clicking on a button on my
application. When I first found it not working, it occurred to me that this
might be because the fact that the button was being clicked at that point
meant that my application was being forced to the front by the OS. To get
around this, I placed the call to osso_application_top inside a callback
function, which is activated by a 300ms timeout from the button-click
routine. In other words, a 300ms timeout is triggered by the button click,
and the callback routine that handles the timeout invokes
osso_application_top to bring the browser to the front. However, it still
doesn't work.

This is why I asked whether there were conditions under which
osso_application_top would not work. Presumably, if the application that
calls it is in the process of doing something that makes it the top
application, this would override the attempt to bring another application to
the front. The problem is, I can't think of any other way to trigger such an
event in response to a user action. By definition, this must be an action
that does something to my application's window, which means my application
has to be in front to deal with it.

Any suggestions as to what might be going wrong?


David Hazel

-Original Message-
From: Kimmo Hämäläinen [mailto:[EMAIL PROTECTED]
Sent: 19 September 2007 12:39
To: ext David Hazel
Cc: maemo-dev
Subject: Re: Another libosso bug?


On Mon, 2007-09-17 at 21:15 +0100, ext David Hazel wrote:
 Within my application, I am trying to bring the browser to the front
 in response to a certain user action. The call I am using is:

 osso_application_top(mvarAppCtx, osso_browser, NULL);

 However, nothing is happening in response to this call. My application
 remains visible, and the browser does not come to the front of the
 display. The question is, am I using the above call correctly (in
 particular, is the application name correct for the browser)? Are
 there any restrictions on the circumstances where I can expect this
 call to bring another application in front of mine?

This works for me:

-
#include stdio.h
#include glib.h
#include libosso.h

static GMainLoop *loop;

int main(int argc, char* argv[])
{
osso_context_t *context;

loop = g_main_loop_new(NULL, 1);
context = osso_initialize(toptest, 0.1, 0,
  g_main_loop_get_context(loop));

osso_application_top(context, osso_browser, NULL);

g_main_loop_run(loop);
return 0;
}
--

BR, Kimmo



 David Hazel
 ___
 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


Another libosso bug?

2007-09-17 Thread David Hazel
Within my application, I am trying to bring the browser to the front in
response to a certain user action. The call I am using is:

osso_application_top(mvarAppCtx, osso_browser, NULL);

However, nothing is happening in response to this call. My application
remains visible, and the browser does not come to the front of the display.
The question is, am I using the above call correctly (in particular, is the
application name correct for the browser)? Are there any restrictions on the
circumstances where I can expect this call to bring another application in
front of mine?


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