Re: How do I create a non-focused window?
- From: Paul Davis <paul linuxaudiosystems com>
- To: Tom Machinski <tom machinski gmail com>
- Cc: gtk-list gnome org
- Subject: Re: How do I create a non-focused window?
- Date: Mon, 26 May 2008 19:28:31 -0400
On Thu, 2008-05-22 at 17:36 -0700, Tom Machinski wrote:
> Hi,
>
> I wrote a simple GTK+ application that displays a popup window.
>
> The problem is that whenever the window is displayed, it immediately
> gets ("steals") the focus. I would like to prevent that from
> happening: i.e., the window should be created and displayed, but it
> should not be focused, while focus was instead retained by whatever
> window had it before the the new window was created.
>
> The only way I know to do that is by calling
> window.set_accept_focus(False) before window.show(). There's a serious
> flaw in that method: the resulting window, while being prevented from
> stealing the focus, also can not receive focus at any later time, even
> by intentional user action.
>
> Any ideas about solving this?
AFAIK, this is largely a function of your window manager rather than
GTK. GTK does not "grab focus" for a new window, but the WM may move
focus to the new window if that is its policy for that window type.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]