Embedding LibreOffice in SWT on Linux

classic Classic list List threaded Threaded
11 messages Options
Vik Tara Vik Tara
Reply | Threaded
Open this post in threaded view
|

Embedding LibreOffice in SWT on Linux

Hi,

I am using the officebean approach to embed LibreOffice in an SWT application on Linux.

I am facing a problem where the embedded window cannot get focus and so you cannot type into it.

If you select window -> new window and type in the new window, the text appears in the new window and the embedded window (not a very nice work around).

The same issue exists in ooo:
http://openoffice.org/bugzilla/show_bug.cgi?id=97007

Any pointers on how to debug  or help fix this would be greatly appreciated.

TIA
Vik Tara Vik Tara
Reply | Threaded
Open this post in threaded view
|

Re: Embedding LibreOffice in SWT on Linux

Would it be best to file a similar bug in LibreOffice?

On Wed, Mar 23, 2011 at 12:43 PM, bt10000 <[hidden email]> wrote:
Hi,

I am using the officebean approach to embed LibreOffice in an SWT
application on Linux.

I am facing a problem where the embedded window cannot get focus and so you
cannot type into it.

If you select window -> new window and type in the new window, the text
appears in the new window and the embedded window (not a very nice work
around).

The same issue exists in ooo:
http://openoffice.org/bugzilla/show_bug.cgi?id=97007

Any pointers on how to debug  or help fix this would be greatly appreciated.

TIA

--
View this message in context: http://nabble.documentfoundation.org/Embedding-LibreOffice-in-SWT-on-Linux-tp2720123p2720123.html
Sent from the Dev mailing list archive at Nabble.com.
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Michael Meeks Michael Meeks
Reply | Threaded
Open this post in threaded view
|

Re: Embedding LibreOffice in SWT on Linux

In reply to this post by Vik Tara
Hi there,

On Wed, 2011-03-23 at 05:43 -0700, bt10000 wrote:
> I am using the officebean approach to embed LibreOffice in an SWT
> application on Linux.

        What fun :-) you are treading well away from the beaten path I think.

> I am facing a problem where the embedded window cannot get focus and so you
> cannot type into it.

        Sounds like a nightmare. Then again - if you're using XEmbed across
processes, there will be all sorts of problems I'm afraid; keyboard
navigation is just not going to work eg. global keybindings are just not
there (cf. the problems you get with flash inside mozilla etc).

> If you select window -> new window and type in the new window, the text
> appears in the new window and the embedded window (not a very nice work
> around).
..
> Any pointers on how to debug  or help fix this would be greatly appreciated.

        You'll prolly need a build of libreoffice, and a build debug=true of
vcl/ - that might spew some helpful looking warning. Also I'd try to
isolate it to the widget plugin; do: export SAL_USE_VCLPLUGIN=gen vs.
gtk to check that it is not some widget integration / backend problem.

        Here be dragons though :-)

        HTH,

                Michael.

--
 [hidden email]  <><, Pseudo Engineer, itinerant idiot


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
cbosdonnat cbosdonnat
Reply | Threaded
Open this post in threaded view
|

Re: Embedding LibreOffice in SWT on Linux

In reply to this post by Vik Tara
Hello,

First, I apologies for answering that late... but my SWT experience in
OpenOffice.org (and thus LibreOffice) is quite old.

On Wed, 2011-03-23 at 05:43 -0700, bt10000 wrote:
> I am using the officebean approach to embed LibreOffice in an SWT
> application on Linux.
>
> I am facing a problem where the embedded window cannot get focus and so you
> cannot type into it.

Did you test on several platforms / Window managers? I remember having a
grey window with GTK several years ago.

> If you select window -> new window and type in the new window, the text
> appears in the new window and the embedded window (not a very nice work
> around).
>
> The same issue exists in ooo:
> http://openoffice.org/bugzilla/show_bug.cgi?id=97007
>
> Any pointers on how to debug  or help fix this would be greatly appreciated.

That sounds like some VCL issue... I'm not an expert in that area, maybe
thorsten or caolan have a more precise idea of the problem.

Regards,
--
Cédric Bosdonnat
LibreOffice hacker
http://documentfoundation.org
OOo Eclipse Integration developer
http://cedric.bosdonnat.free.fr

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Vik Tara Vik Tara
Reply | Threaded
Open this post in threaded view
|

Re: Embedding LibreOffice in SWT on Linux

In reply to this post by Michael Meeks
Hi,

Michael Meeks wrote
        You'll prolly need a build of libreoffice, and a build debug=true of
vcl/ - that might spew some helpful looking warning. Also I'd try to
isolate it to the widget plugin; do: export SAL_USE_VCLPLUGIN=gen vs.
gtk to check that it is not some widget integration / backend problem.
Great, I have a place to start!

Thanks
Vik Tara Vik Tara
Reply | Threaded
Open this post in threaded view
|

Re: Embedding LibreOffice in SWT on Linux

In reply to this post by cbosdonnat
Cedric Bosdonnat wrote
Did you test on several platforms / Window managers? I remember having a
grey window with GTK several years ago.
Have tested on Fedora and Ubuntu 32 and 64 bit both running Gnome.

According to the bug entry on ooo the issue does not occur on KDE - but I haven't verified that.

I'll test in KDE and post back here.


Thanks
Thorsten Behrens Thorsten Behrens
Reply | Threaded
Open this post in threaded view
|

Re: Embedding LibreOffice in SWT on Linux

In reply to this post by cbosdonnat
Cedric Bosdonnat wrote:
> > The same issue exists in ooo:
> > http://openoffice.org/bugzilla/show_bug.cgi?id=97007
> >
> > Any pointers on how to debug  or help fix this would be greatly appreciated.
>
> That sounds like some VCL issue... I'm not an expert in that area, maybe
> thorsten or caolan have a more precise idea of the problem.
>
Some pointers - you'll have to add some tracing and/or debug what's
going wrong:

bean/com/sun/star/comp/beans/LocalOfficeWindow.java
toolkit/source/awt/vclxtoolkit.cxx

when running with the SAL_USE_VCLPLUG=gen, you may want to poke at
the places that handle m_bXEmbed in
vcl/unx/source/window/salframe.cxx

(or vcl/unx/gtk/window/gtkframe.cxx for gtk)

HTH,

-- Thorsten

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

attachment0 (205 bytes) Download Attachment
peter.jentsch peter.jentsch
Reply | Threaded
Open this post in threaded view
|

Re: Embedding LibreOffice in SWT on Linux

In reply to this post by Vik Tara
Hi,

have you had a look at http://wiki.services.openoffice.org/wiki/OOoBean#nofocus
?

It seems to be related to your problem.


Cheers,
Peter

Am 29.03.2011 um 10:30 schrieb bt10000 <[hidden email]>:

>
> Cedric Bosdonnat wrote:
>>
>> Did you test on several platforms / Window managers? I remember having a
>> grey window with GTK several years ago.
>>
>
> Have tested on Fedora and Ubuntu 32 and 64 bit both running Gnome.
>
> According to the bug entry on ooo the issue does not occur on KDE - but I
> haven't verified that.
>
> I'll test in KDE and post back here.
>
>
> Thanks
>
> --
> View this message in context: http://nabble.documentfoundation.org/Embedding-LibreOffice-in-SWT-on-Linux-tp2720123p2747373.html
> Sent from the Dev mailing list archive at Nabble.com.
> _______________________________________________
> LibreOffice mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Vik Tara Vik Tara
Reply | Threaded
Open this post in threaded view
|

Re: Embedding LibreOffice in SWT on Linux

Peter Jentsch wrote
Hi,

have you had a look at http://wiki.services.openoffice.org/wiki/OOoBean#nofocus
?

It seems to be related to your problem.
Yes - did try that - but doesn't seem to help.

That option is also discussed in the ooo bug I posted above - but it doesn't seem to help at all.
peter.jentsch peter.jentsch
Reply | Threaded
Open this post in threaded view
|

Re: Embedding LibreOffice in SWT on Linux

The whole issue somehow makes me think of Martin Fowlers first law of
embedding open office (don't embed).

So, sorry for the redundant hint, and good luck!

Peter

Am Sonntag, den 03.04.2011, 05:50 -0700 schrieb bt10000:

> Peter Jentsch wrote:
> >
> > Hi,
> >
> > have you had a look at
> > http://wiki.services.openoffice.org/wiki/OOoBean#nofocus
> > ?
> >
> > It seems to be related to your problem.
> >
>
> Yes - did try that - but doesn't seem to help.
>
> That option is also discussed in the ooo bug I posted above - but it doesn't
> seem to help at all.
>
> --
> View this message in context: http://nabble.documentfoundation.org/Embedding-LibreOffice-in-SWT-on-Linux-tp2720123p2771052.html
> Sent from the Dev mailing list archive at Nabble.com.
> _______________________________________________
> LibreOffice mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Vik Tara Vik Tara
Reply | Threaded
Open this post in threaded view
|

Re: Embedding LibreOffice in SWT on Linux

In reply to this post by Vik Tara

Cedric Bosdonnat wrote:
Did you test on several platforms / Window managers? I remember having a
grey window with GTK several years ago.
Have tested on Fedora and Ubuntu 32 and 64 bit both running Gnome.

According to the bug entry on ooo the issue does not occur on KDE - but I haven't verified that.

I'll test in KDE and post back here.
I had time to test on KDE today and confirmed that the problem seems to be limited to Gnome.

I plan to test Gnome 3 shortly to see if it exists there.

Regards



Vik