Slightly OT - focus problems raising a Frame as part of StackLayout [message #8633] |
Mon, 13 October 2008 05:52  |
Eclipse User |
|
|
|
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 #8654 is a reply to message #8646] |
Mon, 13 October 2008 16:52  |
Eclipse User |
|
|
|
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 #574413 is a reply to message #8646] |
Mon, 13 October 2008 16:52  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.04278 seconds