Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » ON_TOP, setVisible(true) Shell that doesn't steal window focus from parent shell when clicked
ON_TOP, setVisible(true) Shell that doesn't steal window focus from parent shell when clicked [message #452362] Fri, 18 March 2005 08:35 Go to next message
Emil Crumhorn is currently offline Emil CrumhornFriend
Messages: 169
Registered: July 2009
Senior Member
I've tried every way thinkable and unthinkable to do this, as well as
reading through the old news postings and going through most of the bugs
relating to focus. I can't find anything that works. I'm beginning to think
there is no way to do this, or the Eclipse platform would've done it for the
CCombo class and content assist etc. (I'm using SWT 3.1M5).

Scenario:
A button is clicked, and a new Shell with (NO_TRIM | ON_TOP) is created and
opened via setVisible(true). This shell contains a composite that's plain
(meaning there's no SWT widgets on it). So far everything is great, the
shell does not steal window focus from the parent (same effect as content
assist opened in Eclipse but _not_ clicked on with the mouse)

Problem:
When the composite (or shell if you will) is clicked, the shell gains focus,
causing the parent shell to become "inactive". (same effect as clicking the
content assist window in Eclipse with the mouse, the sub-window grabs
window-focus and the eclipse window goes inactive)

Desired effect:
The sub-window getting focus does not make the parent window inactive.

Examples:
Look at MS Outlooks date combo dropdown (for example), when clicking around
on various dates and what not the parent shell never loses focus. Or just a
normal combo, same deal when dropping down and picking items.

Java Swing can do this just fine, but of course, Swing isn't native like SWT
so it's not really comparable, apart from the desired effect.

I guess this could be associated with bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=19396 .. which has been open
since 2002.

If this is OS specific I don't know, but since I can't find any previous
questions regarding this, I figured I'd ask. I'm sure I'm not the only one
hunting for a way to do this.

Thanks in advance,
Emil
Re: ON_TOP, setVisible(true) Shell that doesn't steal window focus from parent shell when clicked [message #453016 is a reply to message #452362] Tue, 29 March 2005 23:44 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Enter a bug report for this and let's see if we can fix it.

"Emil Crumhorn" <crumhorn@speakeasy.net> wrote in message
news:d1e3so$3l0$1@www.eclipse.org...
> I've tried every way thinkable and unthinkable to do this, as well as
> reading through the old news postings and going through most of the bugs
> relating to focus. I can't find anything that works. I'm beginning to
think
> there is no way to do this, or the Eclipse platform would've done it for
the
> CCombo class and content assist etc. (I'm using SWT 3.1M5).
>
> Scenario:
> A button is clicked, and a new Shell with (NO_TRIM | ON_TOP) is created
and
> opened via setVisible(true). This shell contains a composite that's plain
> (meaning there's no SWT widgets on it). So far everything is great, the
> shell does not steal window focus from the parent (same effect as content
> assist opened in Eclipse but _not_ clicked on with the mouse)
>
> Problem:
> When the composite (or shell if you will) is clicked, the shell gains
focus,
> causing the parent shell to become "inactive". (same effect as clicking
the
> content assist window in Eclipse with the mouse, the sub-window grabs
> window-focus and the eclipse window goes inactive)
>
> Desired effect:
> The sub-window getting focus does not make the parent window inactive.
>
> Examples:
> Look at MS Outlooks date combo dropdown (for example), when clicking
around
> on various dates and what not the parent shell never loses focus. Or just
a
> normal combo, same deal when dropping down and picking items.
>
> Java Swing can do this just fine, but of course, Swing isn't native like
SWT
> so it's not really comparable, apart from the desired effect.
>
> I guess this could be associated with bug:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=19396 .. which has been open
> since 2002.
>
> If this is OS specific I don't know, but since I can't find any previous
> questions regarding this, I figured I'd ask. I'm sure I'm not the only one
> hunting for a way to do this.
>
> Thanks in advance,
> Emil
>
>
Re: ON_TOP, setVisible(true) Shell that doesn't steal window focus from parent shell when clicked [message #453241 is a reply to message #453016] Fri, 01 April 2005 17:43 Go to previous message
Brian Hudson is currently offline Brian HudsonFriend
Messages: 17
Registered: July 2009
Junior Member
I have created a lot of custom combos (like those seen in Power Point)
and have the same problem. It seems like an issue with Shell to me
(versus and issue with the Composites etc within that Shell).

I found the same bug report Emil found, so I haven't entered another bug
report.

Brian Hudson

Steve Northover wrote:
> Enter a bug report for this and let's see if we can fix it.
>
> "Emil Crumhorn" <crumhorn@speakeasy.net> wrote in message
> news:d1e3so$3l0$1@www.eclipse.org...
>
>>I've tried every way thinkable and unthinkable to do this, as well as
>>reading through the old news postings and going through most of the bugs
>>relating to focus. I can't find anything that works. I'm beginning to
>
> think
>
>>there is no way to do this, or the Eclipse platform would've done it for
>
> the
>
>>CCombo class and content assist etc. (I'm using SWT 3.1M5).
>>
>>Scenario:
>>A button is clicked, and a new Shell with (NO_TRIM | ON_TOP) is created
>
> and
>
>>opened via setVisible(true). This shell contains a composite that's plain
>>(meaning there's no SWT widgets on it). So far everything is great, the
>>shell does not steal window focus from the parent (same effect as content
>>assist opened in Eclipse but _not_ clicked on with the mouse)
>>
>>Problem:
>>When the composite (or shell if you will) is clicked, the shell gains
>
> focus,
>
>>causing the parent shell to become "inactive". (same effect as clicking
>
> the
>
>>content assist window in Eclipse with the mouse, the sub-window grabs
>>window-focus and the eclipse window goes inactive)
>>
>>Desired effect:
>>The sub-window getting focus does not make the parent window inactive.
>>
>>Examples:
>>Look at MS Outlooks date combo dropdown (for example), when clicking
>
> around
>
>>on various dates and what not the parent shell never loses focus. Or just
>
> a
>
>>normal combo, same deal when dropping down and picking items.
>>
>>Java Swing can do this just fine, but of course, Swing isn't native like
>
> SWT
>
>>so it's not really comparable, apart from the desired effect.
>>
>>I guess this could be associated with bug:
>>https://bugs.eclipse.org/bugs/show_bug.cgi?id=19396 .. which has been open
>>since 2002.
>>
>>If this is OS specific I don't know, but since I can't find any previous
>>questions regarding this, I figured I'd ask. I'm sure I'm not the only one
>>hunting for a way to do this.
>>
>>Thanks in advance,
>>Emil
>>
>>
>
>
>
Previous Topic:Where can I found more snippets/example/tutor of JFace?
Next Topic:How to code accessibility relations (e.g. rel of Text field inside a Group Composite to the Group) i
Goto Forum:
  


Current Time: Sun Aug 25 10:13:51 GMT 2019

Powered by FUDForum. Page generated in 0.02116 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top