Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Albireo » Slightly OT - focus problems raising a Frame as part of StackLayout
Slightly OT - focus problems raising a Frame as part of StackLayout [message #8633] Mon, 13 October 2008 09:52 Go to next message
Adrian Skehill is currently offline Adrian SkehillFriend
Messages: 55
Registered: July 2009
Member
Hi Guys,

I hope you can help me. I'm not using albireo yet and it certainly looks
like I should investigate it more. But given that you'd be the experts
in this area I thought I'd ask!

I'm producing an SWT based application (using only minimal pieces of
eclipse) that needs to offer the user a choice of video files to play
(all displayed on a standard SWT composite) and when they click on the
file, it does something like the following:

> playbackPage = new Composite(cp.getShell(), SWT.EMBEDDED);
> awtFrame = SWT_AWT.new_Frame(playbackPage);
>
> canvas = new Canvas();
>
> awtFrame.add(canvas);
> awtFrame.setFocusable(true);
> StackLayout sl = (StackLayout)cp.getShell().getLayout();
> sl.topControl = playbackPage;
> cp.getShell().layout();


The shell in this case is on a stack layout, so the other composite is
pushed back, and the playback page is brought to the front.

The Video player then uses the canvas as its output device.

This works, mostly! What I get is a black screen with a frame from the
video show every couple of seconds. If I hit Alt-Tab, then Alt-Tab back
to my application it plays fine on full screen. So I guess it's
something to do with focus.

I came across the following bug at [1] and was wondering if it was related?

Any advice or guidance you'd have on this would be greatly appreciated.

Many Thanks,
Adrian.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=60967
Re: Slightly OT - focus problems raising a Frame as part of StackLayout [message #8646 is a reply to message #8633] Mon, 13 October 2008 15:38 Go to previous messageGo to next message
Gordon Hirsch is currently offline Gordon HirschFriend
Messages: 100
Registered: July 2009
Senior Member
Adrian Skehill wrote:
>
> This works, mostly! What I get is a black screen with a frame from the
> video show every couple of seconds. If I hit Alt-Tab, then Alt-Tab back
> to my application it plays fine on full screen. So I guess it's
> something to do with focus.
>
> I came across the following bug at [1] and was wondering if it was related?
>
....
>
> [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=60967

Possibly, but my first guess would be that you are seeing something like
the problem fixed in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=216431, at least if you
are using Eclipse 3.3 or earlier.
Re: Slightly OT - focus problems raising a Frame as part of StackLayout [message #8654 is a reply to message #8646] Mon, 13 October 2008 20:52 Go to previous message
Adrian Skehill is currently offline Adrian SkehillFriend
Messages: 55
Registered: July 2009
Member
Gordon Hirsch wrote:
> Adrian Skehill wrote:
>>
>> This works, mostly! What I get is a black screen with a frame from the
>> video show every couple of seconds. If I hit Alt-Tab, then Alt-Tab
>> back to my application it plays fine on full screen. So I guess it's
>> something to do with focus.
>>
>> I came across the following bug at [1] and was wondering if it was
>> related?
>>
> ...
>>
>> [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=60967
>
> Possibly, but my first guess would be that you are seeing something like
> the problem fixed in
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=216431, at least if you
> are using Eclipse 3.3 or earlier.

Thanks for the reply Gordon,

I'm using Eclipse 3.4 with jdk 1.6 so I should have the bug fix since it
went in Jan. I'm running this on Vista but I will take it for a spin on
a Linux box tomorrow to see if the behaviour is the same there.

Thanks Again,

Adrian.
Re: Slightly OT - focus problems raising a Frame as part of StackLayout [message #574384 is a reply to message #8633] Mon, 13 October 2008 15:38 Go to previous message
Gordon Hirsch is currently offline Gordon HirschFriend
Messages: 100
Registered: July 2009
Senior Member
Adrian Skehill wrote:
>
> This works, mostly! What I get is a black screen with a frame from the
> video show every couple of seconds. If I hit Alt-Tab, then Alt-Tab back
> to my application it plays fine on full screen. So I guess it's
> something to do with focus.
>
> I came across the following bug at [1] and was wondering if it was related?
>
....
>
> [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=60967

Possibly, but my first guess would be that you are seeing something like
the problem fixed in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=216431, at least if you
are using Eclipse 3.3 or earlier.
Re: Slightly OT - focus problems raising a Frame as part of StackLayout [message #574413 is a reply to message #8646] Mon, 13 October 2008 20:52 Go to previous message
Adrian Skehill is currently offline Adrian SkehillFriend
Messages: 55
Registered: July 2009
Member
Gordon Hirsch wrote:
> Adrian Skehill wrote:
>>
>> This works, mostly! What I get is a black screen with a frame from the
>> video show every couple of seconds. If I hit Alt-Tab, then Alt-Tab
>> back to my application it plays fine on full screen. So I guess it's
>> something to do with focus.
>>
>> I came across the following bug at [1] and was wondering if it was
>> related?
>>
> ...
>>
>> [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=60967
>
> Possibly, but my first guess would be that you are seeing something like
> the problem fixed in
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=216431, at least if you
> are using Eclipse 3.3 or earlier.

Thanks for the reply Gordon,

I'm using Eclipse 3.4 with jdk 1.6 so I should have the bug fix since it
went in Jan. I'm running this on Vista but I will take it for a spin on
a Linux box tomorrow to see if the behaviour is the same there.

Thanks Again,

Adrian.
Previous Topic:Slightly OT - focus problems raising a Frame as part of StackLayout
Next Topic:JOptionPane and dispose() problems
Goto Forum:
  


Current Time: Sat Dec 20 21:39:10 GMT 2014

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

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