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 #574340] Mon, 13 October 2008 09:52
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
Previous Topic:Context Help in SwingControl
Next Topic:Slightly OT - focus problems raising a Frame as part of StackLayout
Goto Forum:
  


Current Time: Sat Dec 20 21:49:22 GMT 2014

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

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